In Oracle 11g, the standby library can be read-only and synchronized application log, 10g and its previous versions, in the Application log library is not open to read only mode, for some real-time requirements is not particularly high application, For example, they can be implemented in the daytime only read, query business, night Application log. If you do a similar amount of work every day, because there are friends need to write a similar function based on the win platform script, by scheduling task calls to achieve daytime read-only, night Application log function
Database conversion from application archive mode to read-only mode
The code is as follows |
Copy Code |
--change_open.bat Sqlplus/as SYSDBA @c:\oracle\product\script\change_open.sql
--change_open.sql ALTER database RECOVER MANAGED STANDBY database cancel; ALTER DATABASE open read only; Exit
|
Database conversion from read-only mode to application archive mode
code is as follows |
copy code |
--change_ Mount.bat Sqlplus/as sysdba @c:\oracle\product\script\change_mount.sql --change_mount.sql Shutdown immediate; Startup Mount; The alter system register; The alter system register; ALTER database RECOVER MANAGED STANDBY database USING current LOGFILE DISCONNECT to session; Conn Sys/orac Le@ntsy as SYSDBA alter system set LOG_ARCHIVE_DEST_STATE=DEFER; alter system set log_archive_dest_state=enable; ALTER system switch logfile; Exit; |