oracle 9i\10gr1\10gr2归档模式切换
Single InstanceOracle 9iOn a single node 9i instance the archive log mode is reset as follows. ALTER SYSTEM SET log_archive_start=TRUE SCOPE=spfile; ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYSID/archive/' SCOPE=spfile; ALTER SYSTEM SET log_archive_format='arch_%t_%s.arc' SCOPE=spfile; SHUTDOWN IMMEDIATE; STARTUP MOUNT; ARCHIVE LOG START; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;Oracle 10g Upward In Oracle 10g the ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYSID/archive/' SCOPE=spfile; ALTER SYSTEM SET log_archive_format='arch_%t_%s_%r.arc' SCOPE=spfile; SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN; Real Application Clusters (RAC) The ALTER SYSTEM SET log_archive_start=TRUE SCOPE=spfile; ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYDB/archive/' SCOPE=spfile; ALTER SYSTEM SET log_archive_format='arch_%t_%s.arc' SCOPE=spfile; Since we need to mount the database in exclusive mode we must also alter the following parameter. ALTER SYSTEM SET cluster_database=FALSE SCOPE=spfile; From the command line we can stop the entire clustered database using the following. $ srvctl stop database -d MYDB With the cluster down we can connect to a single node and issue the following commands. STARTUP MOUNT; ARCHIVE LOG START; ALTER DATABASE ARCHIVELOG; ALTER SYSTEM SET cluster_database=TRUE SCOPE=spfile; SHUTDOWN IMMEDIATE; Notice that the From the command line we can now start the clustered database again using the following. $ srvctl start database -d MYDB The current settings place all archive logs in the same directory. This is acceptable since the thread (%t) is part of the archive format preventing any name conflicts between instances. If node-specific locations are required the If the ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYDB/archive/' SCOPE=spfile; ALTER SYSTEM SET log_archive_format='arch_%t_%s_%r.arc' SCOPE=spfile; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER SYSTEM SET cluster_database=TRUE SCOPE=spfile; SHUTDOWN IMMEDIATE; $ srvctl start database -d MYDB Oracle 10gR2 From 10gR2,you no longer need to reset the From the command line we can stop the entire clustered database and start it in mount mode using the following. $ srvctl stop database -d MYDB $ srvctl start database -d MYDB -o mount With the database mounted issue the following commands. sqlplus / as sysdba ALTER DATABASE ARCHIVELOG; EXIT; Since the datafiles and spfile are shared between all instances this operation only has to be done from a single node. From the command line we stop and start the clustered database again using the following commands. $ srvctl stop database -d MYDB $ srvctl start database -d MYDB (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |