ITPub博客

首页 > Linux操作系统 > Linux操作系统 > logical_standby_managed

logical_standby_managed

原创 Linux操作系统 作者:golden_zhou 时间:2011-03-10 10:09:26 0 删除 编辑

1)DML
SQL> alter database stop logical standby apply;
Database altered.

SQL> exec dbms_logstdby.skip('DML','DFMS','WIP_D_SHIP_BIN_DETAIL');
PL/SQL procedure successfully completed.

SQL> alter database start logical standby apply;
Database altered.

SQL> alter database stop logical standby apply;
Database altered.

SQL> exec dbms_logstdby.unskip('DML','DFMS','WIP_D_SHIP_BIN_DETAIL');
PL/SQL procedure successfully completed.

SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE ('DFMS','WIP_D_SHIP_BIN_DETAIL','DELLL10');
PL/SQL procedure successfully completed.

SQL> alter database start logical standby apply;
Database altered.


PRIMARY:
ALTER TABLE WIP_D_SHIP_BIN_DETAIL ADD SUPPLEMENTAL LOG GROUP TDUP  2  (empno,ename,job,mgr,hiredate,sal,comm,deptno) ALWAYS;


ALTER TABLE DFMS.WIP_D_SHIP_BIN_DETAIL ADD SUPPLEMENTAL LOG GROUP TDUP(SERIAL_NUMBER,BIN_ID,  INTERNAL_ID,
    GROUP_ID,  BUILDING_ID,  SO_NO, ALLOCATE_DATE,  ALLOCATE_EMP, RELEASE_DATE, RELEASE_EMP) ALWAYS;
   
   
    SELECT * FROM DBA_LOG_GROUPS;


exec dbms_logstdby.skip('DML','DFMS','WIP_S_MCID_SCACID_RELATION');

exec dbms_logstdby.skip('DDL','DFMS','WIP_S_MCID_SCACID_RELATION');


exec dbms_logstdby.unskip('DDL','DFMS','WIP_S_MCID_SCACID_RELATION');


exec dbms_logstdby.unskip('NON_SCHEMA_DDL');

2) DDL
Fri Aug 27 10:11:30 2010
LOGSTDBY status: ORA-02443: Cannot drop constraint  - nonexistent constraint
LOGSTDBY Apply process P004 pid=35 OS id=28329 stopped

SQL> alter database stop logical standby apply;

exec dbms_logstdby.skip(stmt=>'SCHEMA_DDL',schema_name=>'DFMS',object_name=>'WIP_S_MCID_SCACID_RELATION',proc_name=>null);

SQL> alter database start logical standby apply;

SQL> alter database stop logical standby apply;

exec dbms_logstdby.unskip(stmt=>'SCHEMA_DDL',schema_name=>'DFMS',object_name=>'WIP_S_MCID_SCACID_RELATION');

SQL> alter database start logical standby apply;


alter session disable guard;
alter session enable guard;

alter database guard none;
compile invalid objects
alter database guard all ;

LOGSTDBY status: ORA-01031: insufficient privileges
ORA-16111: log mining and apply setting up

SQL> alter database stop logical standby apply;
SQL> exec dbms_logstdby.skip('NON_SCHEMA_DDL');
SQL> alter database start logical standby apply;


SQL> alter database stop logical standby apply;
SQL> exec dbms_logstdby.unskip('NON_SCHEMA_DDL');
SQL> alter database start logical standby apply;


SQL> alter database stop logical standby apply; 
Database altered.

SQL> execute dbms_logstdby.apply_set('PREPARE_SERVERS', 4); 
PL/SQL procedure successfully completed.

SQL> execute dbms_logstdby.apply_set('APPLY_SERVERS', 20); 
PL/SQL procedure successfully completed.

SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('MAX_SGA', 1500);
PL/SQL procedure successfully completed.

SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('PRESERVE_COMMIT_ORDER', 'FALSE');     這種設置可能導致讀出不一致數據。但是可以提高效能50% 。可以作為臨時追趕production使用。
PL/SQL procedure successfully completed.

SQL> execute dbms_logstdby.skip('DML','DFMS','SYS_D_ERROR_TRACE') ;
PL/SQL procedure successfully completed.

SQL> shutdown immediate 
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1.6106E+10 bytes
Fixed Size                  2112048 bytes
Variable Size            2130707920 bytes
Database Buffers         1.3959E+10 bytes
Redo Buffers               14663680 bytes
Database mounted.

SQL> alter database noarchivelog ;
Database altered.

SQL> alter database open ;
Database altered.

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /ocfs_data/mxdell/arch
Oldest online log sequence     13
Current log sequence           18

SQL> alter database start logical standby apply;
Database altered.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25198367/viewspace-688896/,如需转载,请注明出处,否则将追究法律责任。

上一篇: dbms_stats_all
下一篇: exp&expdb example
请登录后发表评论 登录
全部评论

注册时间:2011-03-09

  • 博文量
    238
  • 访问量
    301020