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

Oracle設置歸檔模式的命令

2022-06-13   來源: Oracle 

  Oracle數據庫可以運行在兩種模式下:歸檔模式(archivelog)和非歸檔模式(noarchivelog)

  檢查歸檔模式命令

  SQL> archive log list

  Database log mode No Archive Mode

  Automatic archival Disabled

  Archive destination USE_DB_RECOVERY_FILE_DEST

  Oldest online log sequence

  Current log sequence

  設置歸檔模式

  SQL> shutdown immediate;

  Database closed

  Database dismounted

  ORACLE instance shut down

  SQL> startup mount

  ORACLE instance started

  Total System Global Area bytes

  Fixed Size bytes

  Variable Size bytes

  Database Buffers bytes

  Redo Buffers bytes

  Database mounted

  SQL> alter database archivelog;

  Database altered

  SQL> alter database open;

  Database altered

  SQL> archive log list;

  Database log mode Archive Mode

  Automatic archival Enabled

  Archive destination USE_DB_RECOVERY_FILE_DEST

  Oldest online log sequence

  Next log sequence to archive

  Current log sequence

  如果需要停止歸檔模式使用alter database noarchivelog 命令Oracleg之前你還需要修改初始化參數使數據庫處於自動歸檔模式在pfile/spfile中設置如下參數

  log_archive_start = true

  重啟數據庫此參數生效此時數據庫處於自動歸檔模式也可以在數據庫啟動過程中手工執行

  archive log start

  使數據庫啟用自動歸檔但是重啟後數據庫仍然處於手工歸檔模式g使用db_recovery_file_dest來作為歸檔日志的存放地

  SQL> show parameter db_recovery

  NAME TYPE VALUE

  db_recovery_file_dest string /home/oracle/orag/flash_reco

  very_area/

  db_recovery_file_dest_size big integer G

  可以修改db_recovery_file_dest_size參數的大小

  alter system set db_recovery_file_dest_size=


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