oracle RAC——归档日志的开启方法
==================================
g R 要修改cluster_database参数 G R和以后的版本就不需要了
例子(g R或之前)srvctl stop database d RAC节点 sql>startup mount SQL> alter system set log_archive_dest_=location=/racdb_arch scope=spfile sid=RACSQL> alter system set log_archive_dest_=location=/racdb_arch scope=spfile sid=RACSQL> alter system set log_archive_dest_=service=rac scope=spfile sid=RACSQL> alter system set log_archive_dest_=service=rac scope=spfile sid=RACSQL> alter system set standby_archive_dest=/racdb_arch scope=spfile sid=RACSQL> alter system set standby_archive_dest=/racdb_arch scope=spfile sid=RACsql>alter system set cluster_database=false scope=spfilesql>shutdown immediate sql>startup mount sql>alter database archivelog sql>alter database open sql>alter system set cluster_database=true scope=spfilesql>shutdown immediate srvctl start database d RAC
例子(g R或之后)节点 SQL>startup mountSQL> alter system set log_archive_dest_=location=/racdb_arch scope=spfile sid=RACSQL> alter system set log_archive_dest_=location=/racdb_arch scope=spfile sid=RACSQL> alter system set log_archive_dest_=service=rac scope=spfile sid=RACSQL> alter system set log_archive_dest_=service=rac scope=spfile sid=RACSQL> alter system set standby_archive_dest=/racdb_arch scope=spfile sid=RACSQL> alter system set standby_archive_dest=/racdb_arch scope=spfile sid=RACsrvctl stop database d RAC节点 SQL> startup mount SQL> alter database archivelogsrvctl start database d RAC
测试归档日志的切换
节点一二上分别执行切换日志操作如下SQL> alter system switch logfile 操作执行这条语句次
节点一查询SQL> !ls l /racdb* /racdb_archtotal rwr—— oracle oinstall Oct __dbf rwr—— oracle oinstall Oct __dbf rwr—— oracle oinstall Oct __dbf rwr—— oracle oinstall Oct __dbf rwr—— oracle oinstall Oct __dbf /racdb_archtotal rwrw—— oracle oinstall Oct __dbf rwrw—— oracle oinstall Oct __dbf rwrw—— oracle oinstall Oct __dbf rwrw—— oracle oinstall Oct __dbf rwrw—— oracle oinstall Oct __dbf
节点二查询
SQL> !ls l /racdb* /racdb_archtotal rwrw—— oracle oinstall Oct __dbf rwrw—— oracle oinstall Oct __dbf rwrw—— oracle oinstall Oct __dbf rwrw—— oracle oinstall Oct __dbf rwrw—— oracle oinstall Oct __dbf /racdb_archtotal rwr—— oracle oinstall Oct __dbf rwr—— oracle oinstall Oct __dbf rwr—— oracle oinstall Oct __dbf rwr—— oracle oinstall Oct __dbf rwr—— oracle oinstall Oct __dbf
节点一SQL> show parameter archive_dest NAME TYPE VALUE
log_archive_dest string log_archive_dest_ string location=/racdb_arch log_archive_dest_ string log_archive_dest_ string service=rac log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable standby_archive_dest string /racdb_arch
节点二
SQL> show parameter archive_dest NAME TYPE VALUE
log_archive_dest string log_archive_dest_ string location=/racdb_arch log_archive_dest_ string log_archive_dest_ string service=rac log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_ string log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable log_archive_dest_state_ string enable standby_archive_dest string /racdb_arch
===========================================