|
本帖最后由 botang 于 2016-3-11 10:13 编辑
2016-03-09a.sql:
- select * from v$flashback_Database_log;
- --2033347
- select bytes/1024/1024, file_name
- from dba_data_files where tablespace_name='USERS';
-
- select bytes/1024/1024
- from dba_free_space where tablespace_name='USERS';
-
- alter database datafile '+DATA/orcl/datafile/users.259.816169553' resize 97M;
-
- --2056303
-
- select * from v$restore_point;
-
复制代码
2016-03-09b.sql:
- select * from v$transaction;
- --00000001EAEAEE78
-
- ---
- select s.USERNAME,
- s.RESOURCE_CONSUMER_GROUP
-
- from v_$session s
- where s.TERMINAL ='pts/1';
- select * from dba_rsrc_plan_directives d where d.plan='PLAN1';
- ---
-
- select bytes/1024/1024 from dba_segments s
- where s.owner='HR' and s.segment_name ='T04209_UNAME';
- ---
-
- alter tablespace users add datafile '/home/oracle/users02.dbf' size 1G autoextend on;
-
- ---
- SELECT begin_time, consumer_group_name, cpu_consumed_time, cpu_wait_time
- FROM v$rsrcmgrmetric_history
- ORDER BY begin_time;
- ---
- SELECT name, consumed_cpu_time, cpu_wait_time
- FROM v$rsrc_consumer_group;
- ---
- select * from dba_rsrc_mapping_priority;
- begin
- dbms_resource_manager.clear_pending_area;
- dbms_resource_manager.create_pending_area();
- dbms_resource_manager.set_consumer_group_mapping_pri(
- client_os_user => 2,
- explicit => 1,
- oracle_user =>3 ,
- service_name => 4,
- client_program =>5 ,
- client_machine =>6 ,
- module_name => 7,
- module_name_action =>8 ,
- service_module =>9 ,
- service_module_action =>10
- );
- dbms_resource_manager.submit_pending_area();
- end;
-
- select * from dba_rsrc_group_mappings;
- begin
- dbms_resource_manager.create_simple_plan(simple_plan =>'PLAN4' ,
- consumer_group1 =>'GROUP1' ,group1_cpu =>55 ,
- consumer_group2 => 'GROUP2',group2_cpu => 45,
- group1_percent => 70,group2_percent =>60 );
- end;
- --
- alter user sh identified by sh account unlock;
-
- ---
- select s.USERNAME,
- s.RESOURCE_CONSUMER_GROUP
-
- from v_$session s
- where s.TERMINAL ='pts/7';
- grant execute on jobclass1 to hr;
复制代码
|
|