Create Physical Standby
startup mount
alter database flashback on;
select flashback_on from v$database;

ora_12514
startup nomount pfile='/home/oracle/works/initcompany.ora'
create spfile from pfile='/home/oracle/works/initcompany.ora';
perl -e "while(true){system('ls -lhs' );sleep(2000);}"

Step 1:

SQL> archive log list
alter system set db_unique_name='company' scope=spfile;
alter database force logging;

Step 2:
SQL>alter database create standby controlfile as '/home/oracle/works/controlfile01.ctl';
create pfile='/home/oracle/works/initcompany.ora' from spfile;

Step 3:
DB:company(primary)
#-------LOG CONFIG--------#
DB_UNIQUE_NAME=company
LOG_ARCHIVE_CONFIG='DG_CONFIG=(company,home)'
LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/archivelog/company/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=company'
LOG_ARCHIVE_DEST_2='SERVICE=home LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=home'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
#-------CONFIG FOR STANDBY--------#
FAL_SERVER=home
FAL_CLIENT=company
#DB_FILE_NAME_CONVERT='oradata/home',/oradata/company'
#LOG_FILE_NAME_CONVERT='oradata/home',/oradata/company'
STANDBY_FILE_MANAGEMENT=AUTO

DB:home(standby)
#-------LOG CONFIG--------#
DB_UNIQUE_NAME=home
LOG_ARCHIVE_CONFIG='DG_CONFIG=(company,home)'
#DB_FILE_NAME_CONVERT='oradata/company',/oradata/home'
#LOG_FILE_NAME_CONVERT='oradata/company',/oradata/home'
#LOG_ARCHIVE_FORMAT=
LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/archivelog/home/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=home'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
#-------CONFIG FOR PRIMARY--------#
LOG_ARCHIVE_DEST_2='SERVICE=company LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=company'
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
FAL_SERVER=company
FAL_CLIENT=home
STANDBY_FILE_MANAGEMENT=AUTO
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License