hawre
hawre

Reputation: 172

How to set PHYSICAL STANDBY to "READ ONLY WITH APPLY" mode

I have standby database(version : Oracle Database 11g Enterprise Edition Release 11.2.0.1.0) in "MOUNTED" mode.

SQL> select database_role,open_mode from v$database;

DATABASE_ROLE    OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY MOUNTED

when i want to change OPEN_MODE from "MOUNTED" to "READ ONLY WITH APPLY" mode, the error(ORA-01093) will be occurred.

SQL> SHUTDOWN IMMEDIATE;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.

Total System Global Area 2.7793E+10 bytes
Fixed Size                  2189008 bytes
Variable Size            1.1207E+10 bytes
Database Buffers         1.6576E+10 bytes
Redo Buffers                7385088 bytes
Database mounted.
SQL> ALTER DATABASE OPEN READ ONLY;

Database altered.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
*
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected

how to fix the error, in other words how to kill other sessions?

Upvotes: 0

Views: 40336

Answers (3)

Arqui Smith
Arqui Smith

Reputation: 1

you are starting db in normal mount

Let us say you are in auto recovery with session disconnect mode...

Then you will stop recovery then open in read only mode

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE OPEN READ ONLY;

Then place auto recovery on

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Upvotes: 0

hawre
hawre

Reputation: 172

we have previously upgraded our database from Version 10g(10.2.0.4.0) to 11gR2(11.2.0.1.0) then in order to use Active Data Guard the compatible parameter must at least be set to 11.0.0. the current value of compatible parameter is 10.2.0.4.0 as shown in the following query:

SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      10.2.0.4.0

Upvotes: 0

RGO
RGO

Reputation: 4737

The correct syntax is as shown below:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT USING CURRENT LOGFILE;

Upvotes: 0

Related Questions