Question: I get the ORA-01155
error during primary(old standby) to standby(old primary)
switchover. I am using this command when I get the
ORA-01155 error:
ALTER DATABASE
COMMIT TO
SWITCHOVER TO PHYSICAL STANDBY
WITH SESSION SHUTDOWN;
I have 11.2.0.1 environment with standby and when
performing switch over - it was hanging for more than 2
hours and I had to cancel the alter database command.
This is the text of the ORA-01155 error message from
the alert log:
Errors in file /u02/app/oracle/diag/rdbms/drpdb/drpdb1/trace/drpdb1_m000_15160.trc:
ORA-01155: the database is being
opened, closed, mounted or dismounted
Answer:
Here is what the oerr utility has to say about the ORA-01155
error:
ORA-01155: the database is being
opened, closed, mounted or dismounted
Cause: The
requested operation needs the instance to be in a particular
state but the state is being changed.
Action: Wait
for the open, close, mount, or dismount to complete then
retry the operation. If necessary, a SHUTDOWN ABORT will
always work.
To diagnose the ORA-01155 error, you
can run this query:
select switchover_status from v$database;
select
SID,
PROCESS,
PROGRAM
from
v$session
where
type = 'USER'
and
SID (select DISTINCT SID from v$mystat);
If the second query returns data, then re-run
the switchover command:
SQL>ALTER DATABASE COMMIT TO
SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;