Oracle Maintenance and Monitoring Dataguard (Standby) Database [Thai Version]

** Myself
Environment Standby Database
Primary DB information :
- hostname=hp01 or hp02,virtual ip= 10.1.144.67, Replication ip of hp01=10.1.144.65, Replication ip of hp02=10.1.144.66
- oracle sid = EEDB
- listener = LISTENER port 1521
Standby DB information : hostname=hpstb01, Replication ip =10.2.144.65
- oracle sid = EEDB
- listener for failover = LISTENER port 1521
- listener for receive log= EEDB_DRC port 1522
*หมายเหตุ ที่ต้นทาง สร้าง oracle instance แล้ว ส่วนปลายทางต้องทำการ ลง oracle software ให้เสร็จสิ้นแล้ว และเป็น version เดียวกัน
มีขั้นตอนดังนี้
1. Case listener not start
2. Case database not start
3. Case last log not apply
4. Case sent new standby controlfile then not automatic recovery

Case listener not start

1. ตรวจสอบว่า listener start อยู่หรือไม่ โดยใช้ tool oracle หรือ check process หรือ check 1522 (ทำ ฝั่ง DR)su – oracle
lsnrctl status EEDB_DRC

--or--

ps –ef|grep –i tns

--or--

netstat –an |grep 1522



Case database not start

1. ตรวจสอบว่า standby database start อยู่หรือไม่ เป็น mount mode หรือเปล่า(ทำ ฝั่ง DR)su – oracle
export ORACLE_SID=EEDB
sqlplus “/ as sysdba”
Sql > select status from v$instance;

2. ถ้าไม่อยู่ใน mount mode ให้ทำการ start (ทำ ฝั่ง DR)su – oracle
export ORACLE_SID=EEDB
sqlplus “/ as sysdba”
startup nomount;
Sql > alter database mount standby database;
Sql > alter database recover managed standby database DISCONNECT from session;

--# if status = nomount then alter database mount standby database -- #


Case last log not apply

1. chek last log apply to standby เทียบกัน (ทำทั้ง 2 ฝั่ง)su – oracle
export ORACLE_SID=EEDB
sqlplus “/ as sysdba”
Sql > select max(sequence#) from v$log_history;
# if same status is normal case

2. ถ้า last log ไม่เท่ากันให้chek ว่าขาดตัวใดบ้าง (ทำ ฝั่ง DR)su – oracle
export ORACLE_SID=EEDB
sqlplus “/ as sysdba”
Sql > select sequence# seq#, applied from v$archived_log order by 1;

3. ถ้า last log ไม่เท่ากันให้chek ว่าไฟล์มาถึงหรือไม่ (ทำ ฝั่ง DR)su – oracle
export ORACLE_SID=EEDB
sqlplus “/ as sysdba”
Sql > archive log list;
# check Archive destination path
Sql >!ls <Archive destination path>;



Case sent new standby controlfile then not automatic recovery


1. ถ้า จำเป็นต้อง recovery เองในกรณี นำ standby controlfile มาใหม่ (ทำ ฝั่ง DR)su – oracle
export ORACLE_SID=EEDB
sqlplus “/ as sysdba”
Sql > recover automatic standby database;

0 comments:

Loading