Tags

,

Some fast and easy configuration scripts for Physical Dataguard installation…

PRIMARY Site
ALTER SYSTEM SET db_unique_name = DATABASE;
ALTER SYSTEM SET log_archive_dest_1 = ‘location=/DATABASEHOME/arch/ mandatory reopen=60 valid_for=(all_logfiles,all_roles) db_unique_name=DATABASE’;
ALTER SYSTEM SET log_archive_dest_2 = ‘service=DRC_DATABASE lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=DATABASE_DRC’;
ALTER SYSTEM SET log_archive_dest_state_1 = enable;
ALTER SYSTEM SET log_archive_dest_state_2 = enable;
ALTER SYSTEM SET fal_client = PRM_DATABASE;
ALTER SYSTEM SET fal_server = DRC_DATABASE;
ALTER SYSTEM SET standby_file_management = auto;
ALTER SYSTEM SET standby_archive_dest = ‘/DATABASEHOME/arch/’;
ALTER SYSTEM SET remote_login_passwordfile = exclusive;

STANDBY Site
db_unique_name = DATABASE_DRC
ALTER SYSTEM SET log_archive_dest_1 = ‘location=/DATABASEHOME/arch/ mandatory reopen=60 valid_for=(all_logfiles,all_roles) db_unique_name=DATABASE_DRC’;
ALTER SYSTEM SET log_archive_dest_2 = ‘service=PRM_DATABASE lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=DATABASE’;
ALTER SYSTEM SET log_archive_dest_state_1 = enable;
ALTER SYSTEM SET log_archive_dest_state_2 = enable;
ALTER SYSTEM SET fal_client = DRC_DATABASE;
ALTER SYSTEM SET fal_server = PRM_DATABASE;
ALTER SYSTEM SET standby_file_management = auto;
ALTER SYSTEM SET standby_archive_dest = ‘/DATABASEHOME/arch/’;
ALTER SYSTEM SET remote_login_passwordfile = exclusive;

Both on Primary & Standby site –> ! Redo + 1
alter database add STANDBY LOGFILE GROUP 21 ‘/DATABASEHOME/data/stbyredo1a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 22 ‘/DATABASEHOME/data/stbyredo2a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 23 ‘/DATABASEHOME/data/stbyredo3a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 24 ‘/DATABASEHOME/data/stbyredo4a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 25 ‘/DATABASEHOME/data/stbyredo5a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 26 ‘/DATABASEHOME/data/stbyredo6a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 27 ‘/DATABASEHOME/data/stbyredo7a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 28 ‘/DATABASEHOME/data/stbyredo8a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 29 ‘/DATABASEHOME/data/stbyredo9a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 30 ‘/DATABASEHOME/data/stbyredo10a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 31 ‘/DATABASEHOME/data/stbyredo11a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 32 ‘/DATABASEHOME/data/stbyredo12a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 33 ‘/DATABASEHOME/data/stbyredo13a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 34 ‘/DATABASEHOME/data/stbyredo14a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 35 ‘/DATABASEHOME/data/stbyredo15a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 36 ‘/DATABASEHOME/data/stbyredo16a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 37 ‘/DATABASEHOME/data/stbyredo17a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 38 ‘/DATABASEHOME/data/stbyredo18a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 39 ‘/DATABASEHOME/data/stbyredo19a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 40 ‘/DATABASEHOME/data/stbyredo20a.log’ size 500m;
alter database add STANDBY LOGFILE GROUP 41 ‘/DATABASEHOME/data/stbyredo21a.log’ size 500m;

Both on Primary & Standby site – Configure Listener
###########################################################
##Primary Listeners
LISTENER_DATABASE=
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= DATABASE))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = PORT#))
)
)
)
SID_LIST_LISTENER_DATABASE =
( SID_LIST=
(SID_DESC =
(ORACLE_HOME = /DATABASEHOME/oracle/11203)
(SID_NAME =DATABASE)
)
)
ADMIN_RESTRICTIONS_LISTENER_DATABASE=ON
LOGGING_LISTENER_DATABASE=OFF

LISTENER_DATABASE_DGP =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = PORT#) (SEND_BUF_SIZE=255000) (RECV_BUF_SIZE=255000))
)
)
)
SID_LIST_LISTENER_DATABASE_DGP=
( SID_LIST=
(SID_DESC =
(SDU=32767)
(ORACLE_HOME = /DATABASEHOME/oracle/11203)
(SID_NAME =DATABASE)
)
)
ADMIN_RESTRICTIONS_LISTENER_DATABASE_DGP=ON
LOGGING_LISTENER_DATABASE_DGP=OFF
########################################################
###DRC Listeners
LISTENER_DATABASE_DRC=
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= DATABASE))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = PORT#))
)
)
)
SID_LIST_LISTENER_DATABASE_DRC =
( SID_LIST=
(SID_DESC =
(ORACLE_HOME = /DATABASEHOME/oracle/11203)
(SID_NAME =DATABASE)
)
)
ADMIN_RESTRICTIONS_LISTENER_DATABASE_DRC=ON
LOGGING_LISTENER_DATABASE_DRC=OFF

LISTENER_DATABASE_DGO =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = PORT#) (SEND_BUF_SIZE=255000) (RECV_BUF_SIZE=255000))
)
)
)
SID_LIST_LISTENER_DATABASE_DGO=
( SID_LIST=
(SID_DESC =
(SDU=32767)
(ORACLE_HOME = /DATABASEHOME/oracle/11203
(SID_NAME =DATABASE)
)
)
ADMIN_RESTRICTIONS_LISTENER_DATABASE_DGO=ON
LOGGING_LISTENER_DATABASE_DGO=OFF

P.S. Do not forget to copy the password file & modify the init.ora…

Advertisements