Here's a top to bottom template I used for a 12c customer recently. Hope this helps
primserver/sbyserver - the database servers
MYPRIM/MYSBY - the databases (primary and standby)
1) OS preliminaries
on sbyserver
=============
mkdir /u01/oradata/MYSBY
mkdir /u01/oraflash/MYSBY
mkdir /u01/oraarch/MYSBY
mkdir -p /u01/app/oracle/admin/MYSBY/adump
add MYSBY to listener.ora as explicit SID, and issue "lsnrctl reload"
- add these for the one-off duplication
add DUP_MYSBY to tnsnames.ora with ORACLE_SID= not SERVICE=
add DUP_MYPRIM to tnsnames.ora with ORACLE_SID= not SERVICE=
on primserver
=============
add MYSBY to tnsnames.ora (this is what the archive shipper will use)
- add these for the one-off duplication
add DUP_MYSBY to tnsnames.ora with ORACLE_SID= not SERVICE=
add DUP_MYPRIM to tnsnames.ora with ORACLE_SID= not SERVICE=
verification
============
copy password file primserver from to sbyserver, and rename accordingly
- on each server
tnsping DUP_MYSBY, DUP_MYPRIM to confirm connectivity
- on each server
connect target sys/xxxxxxxxxx@dup_myprim
connect auxiliary sys/xxxxxxxxxx@dup_mysby
2) Database
On MYPRIM
=========
sqlplus
ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/MYSBY.ctl';
CREATE PFILE='/tmp/initMYSBY.ora' FROM SPFILE;
Set the following parameters to transfer archive logs to the dataguard node: (all done with: alter system scope=both sid='*')
log_archive_config = 'DG_CONFIG=(MYPRIM,MYSBY)'
log_archive_dest_1 =
'LOCATION=/u01/oraarch/MYPRIM
REOPEN=60
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=MYPRIM'
log_archive_dest_2 =
'SERVICE=MYSBY ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=MYSBY'
log_archive_dest_state_1 = ENABLE
log_archive_dest_state_2 = ENABLE
LOG_ARCHIVE_MAX_PROCESSES = 8
On MYSBY
=========
Transfer the init.ora created above to primserver, and edit. This is based on the standard DataGuard documentation (Data Guard Concepts and Administration)
sqlplus
startup nomount
create spfile from system;
alter system set fal_server='MYPRIM';
alter system set fal_client='MYSBY';
Now use RMAN to duplicate the database from MYPRIM:
rman
connect target sys/xxxxxxxxxx@dup_myprim
connect auxiliary sys/xxxxxxxxxx@dup_mysby
run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate auxiliary channel stby1 type disk;
allocate auxiliary channel stby2 type disk;
duplicate target database for standby from active database;
}
(where dup_myprim is a tnsnames.ora entries to one of the database instances)
Once duplication is finished, add standby redo logs
sqlplus
ALTER DATABASE ADD STANDBY LOGFILE ('/u01/oradata/MYSBY/sby_redo01.dbf') SIZE 500M;
etc etc
alter system register;
Continuous recovery
===================
sqlplus
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;