Tuesday, December 2, 2008

Dataguard switchover on 10g

After doing a dataguard switchover (not using dgmgrl ) these were few common cases you might come across.

1- switch_over status in primary was NOT ALLOWED

I found that the log shipping was stopped to the new standby and
select database_role,switchover_status from v$database;
PRIMARY , NOT ALLOWED .

It did not put any alerts in alert.log or any message on v$dataguard_status . I was totally clueless about what is going on here. then I found that the log_archive_dest_state_2 which was originally set as defer was still defer after the switchover . as soon as I turn it into enable at the new primary it started sending the logs.

2- temp files were recreated on the new primary.

Errors in file /u1/app/oracle/admin/dtrt/bdump/dtrt_dbw0_8307.trc:
ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '/rgwt/u6/oradata/dtrt/temp01.dbf'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
File 201 not verified due to error ORA-01157
Tue Dec 2 14:31:12 2008
Dictionary check complete
Tue Dec 2 14:31:12 2008
SMON: enabling tx recovery
Tue Dec 2 14:31:12 2008
Re-creating tempfile /rgwt/u6/oradata/dtrt/temp01.dbf

3-standby redo log on the new standby.

if you have configured the standby redo log on the old standby and then you did not configured on the old primary then you might as well create it

startup nomount;
alter database mount standby database;
alter database add standby logfile group 4 ('/rgwt/u2/oradata/dtrt/sredo41.rlog') size 50M;
alter database recover managed standby database disconnect from session;

then verify v$standby_log ,v$logfile

4- client tns .

i had to cut paste the old standby address to top .

dtrt_dg =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(Host = xt33db002)
(Port = 2483)
)
(ADDRESS =
(PROTOCOL = TCP)
(Host = xt33db003)
(Port = 1521)
)
)
(CONNECT_DATA = (SERVICE_NAME = dtrt)
)
)