Skip to content

Instantly share code, notes, and snippets.

alter database recover to logical standby testdg;
shutdown
startup mount
alter system set log_archive_dest_1 = 'location=use_db_recovery_file_dest db_unique_name=testdg_dg02' scope = both;
exec dbms_logstdby.build
alter database recover managed standby database cancel;
alter table user1.table1 add primary key(colonne1) rely disable;
select owner,table_name from dba_logstdby_not_unique
where (owner,table_name) not in
(select distinct owner,table_name from dba_logstdby_unsupported)
and bad_column = 'Y'
DGMGRL> add database testdg_dg02 as connect identifier is testdg_dg02 maintained as physical;
Database "testdg_dg02" added
DGMGRL> enable database testdg_dg02
Enabled.
DGMGRL> show configuration
Configuration - testdg
Protection Mode: MaxPerformance
Databases:
[oracle@dataguard02 trace]$ rman target sys/xxxxxxx@testdg_dg01_dg auxiliary sys/xxxxxxx@testdg_dg02_dg
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Dec 7 11:24:57 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTDG (DBID=2861418430)
connected to auxiliary database: TESTDG (not mounted)
RMAN> duplicate target database for standby from active database dorecover nofilenamecheck;
[oracle@dataguard02 trace]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 7 11:23:26 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
create spfile from pfile = '/tmp/initTESTDG.ora.forstdby';
TESTDG.__db_cache_size=771751936
TESTDG.__java_pool_size=16777216
TESTDG.__large_pool_size=16777216
TESTDG.__oracle_base='/oracle'#ORACLE_BASE set from environment
TESTDG.__pga_aggregate_target=369098752
TESTDG.__sga_target=1107296256
TESTDG.__shared_io_pool_size=0
TESTDG.__shared_pool_size=285212672
TESTDG.__streams_pool_size=0
*.archive_lag_target=0