Hello,
I'd like to know if there's a way to make a standby read-only while it's still applying
the logs shipped from its primary.
Thru sqlplus it is easily done with:
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database open;
Database altered.
SQL> alter database recover managed standby database using current logfile disconnect;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
but all examples I found online show return tickets between dgmgrl and sqlplus, kind of:
DGMGRL> edit database 'GOLD' set state='APPLY-OFF';
SQL> alter database open read only;
DGMGRL> edit database 'GOLD' set state='APPLY-ON';
(sometimes also with the extra [and useless ?]:
DGMGRL> edit database 'GOLD' set state='ONLINE';)
=> 1/ Is there a way to do that from within the dgmgrl utility alone ?
2/ what's the meaning of specifying OPEN READ ONLY instead of OPEN alone ? Does it make sense ?
Thanks.
Regards,
Seb