SQL> Select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
PRIM MOUNTED PHYSICAL STANDBY
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database recover managed standby database finish;
Database altered.
SQL> alter database activate standby database;
Database altered.
SQL> Select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
PRIM MOUNTED PRIMARY
SQL> shut immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 780140544 bytes
Fixed Size 2929256 bytes
Variable Size 557845912 bytes
Database Buffers 213909504 bytes
Redo Buffers 5455872 bytes
Database mounted.
Database opened.
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
PRIM READ WRITE PRIMARY
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
PRIM MOUNTED PHYSICAL STANDBY
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database recover managed standby database finish;
Database altered.
SQL> alter database activate standby database;
Database altered.
SQL> Select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
PRIM MOUNTED PRIMARY
SQL> shut immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 780140544 bytes
Fixed Size 2929256 bytes
Variable Size 557845912 bytes
Database Buffers 213909504 bytes
Redo Buffers 5455872 bytes
Database mounted.
Database opened.
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
PRIM READ WRITE PRIMARY
You might need to recreate standby from current primary.
No comments:
Post a Comment