FOR DATA GARD
step 1 primary
write service name in tnsname Standby machine and primary machine
createpfile from spfile
updatepfile
*.log_archive_dest_1='location=/archive'
*.log_archive_dest_2='service=erpstdblgwr sync affirm'
log_archive_dest_state_1='enable'
log_archive_dest_state_2='enable'
fal_server='erpstdb'
fal_client='proddb'
db_file_name_convert=('primary location', 'standby location')
log_file_name_convert=('primary location', 'standby location')
shutdown immediate;
createspfile from pfile;
startup mount;
alter database noarchivelog;
delete all archive files
shutdown immediate;
startup mount;
alter database archivelog;
alter database create standby controlfile as '/oracle/db/apps_st/data/standby.ctl';
shutdown immediate;
create tar file
stand by setting
*.log_archive_dest_1='location=/archive'
*.log_archive_dest_2='service=proddblgwr sync affirm'
log_archive_dest_state_1='enable'
log_archive_dest_state_2='enable'
#standby_archive_dest='LOCATION=/archive'
standby_file_management=auto
fal_server='proddb'
fal_client='erpstdb'
db_file_name_convert=('primary location', 'standby location')
log_file_name_convert=('primary location', 'standby location')
changestandby.ctl into control01.ctl control02.ctl control03.ctl
createspfile from pfile;
startup mount
Alter Database Recover Managed Standby Database Disconnect;
diagnostic script
PRODDB
Select Status, Error from v$Archive_dest where dest_id=2;
STDB
select sequence#, applied from v$archived_log;
Select sequence#, Applied, Archived from v$Archived_log;
select dest_id,dest_name,status,ERROR,type,database_mode,recovery_mode,protection_mode,destination from v$ARCHIVE_DEST_STATUS;
Select Database_role ,switchover_status from v$Database;
sqlplus '/ as sysdba' <<EOF
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE OPEN READ ONLY;
SHUTDOWN IMMEDIATE;
STARTUP NOMOUNT
ALTER DATABASE MOUNT STANDBY DATABASE;
ALTER DATABASE OPEN READ ONLY;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DELAY 120 DISCONNECT FROM SESSION;
Select Status, Error from v$Archive_dest where dest_id=2;
select sequence#, applied from v$archived_log;
Select sequence#, Applied, Archived from v$Archived_log;
select dest_id,dest_name,status, ERROR,type,database_mode, recovery_mode,protection_mode, destination from v$ARCHIVE_DEST_STATUS;
Select Database_role ,switchover_status from v$Database;
---------------
lsnrctl start
startup nomount
alter database mount standby database
alter database open read only;
alter database recover managed standby database delay 120 disconnect from session
Please Subscribe my blog Qamar Zahoor, YouTube Channel YouTube, Join the Facebook group
Facebook Group and do follow on Twitter Twitter to get knowledge of Oracle EBS, Database, Ecommerce, Amazon, Ebay and Digital Marketing. Keep learning.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.