熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

oracleRAC--歸檔日志的開啟方法

2022-06-13   來源: Oracle 

  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

  ===========================================


From:http://tw.wingwit.com/Article/program/Oracle/201311/18379.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.