文章詳情頁
快速理解Oracle歸檔模式的命令及參數(shù)
瀏覽:109日期:2023-11-26 18:31:54
Oracle數(shù)據(jù)庫可以運行在兩種模式下:歸檔模式(archivelog)和非歸檔模式(noarchivelog)。 檢查歸檔模式命令: SQL> archive log listDatabase log mode No Archive ModeAutomatic archival DisabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 15Current log sequence 17設(shè)置歸檔模式: ;SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startup mountORACLE instance started.Total System Global Area 1258291200 bytesFixed Size 1219160 bytesVariable Size 318768552 bytesDatabase Buffers 922746880 bytesRedo Buffers 15556608 bytesDatabase mounted.SQL> alter database archivelog;Database altered.SQL> alter database open;Database altered.SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 15Next log sequence to archive 17Current log sequence 17假如需要停止歸檔模式,使用:alter database noarchivelog 命令。Oracle10g之前,你還需要修改初始化參數(shù)使數(shù)據(jù)庫處于自動歸檔模式。在pfile/spfile中設(shè)置如下參數(shù): log_archive_start = true重啟數(shù)據(jù)庫此參數(shù)生效,此時數(shù)據(jù)庫處于自動歸檔模式。也可以在數(shù)據(jù)庫啟動過程中,手工執(zhí)行: archive log start使數(shù)據(jù)庫啟用自動歸檔,但是重啟后數(shù)據(jù)庫仍然處于手工歸檔模式。10g使用db_recovery_file_dest來作為歸檔日志的存放地。 SQL> show parameter db_recoveryNAME TYPE VALUEdb_recovery_file_dest string /home/oracle/ora10g/flash_recovery_area/db_recovery_file_dest_size big integer 20G可以修改db_recovery_file_dest_size參數(shù)的大小 alter system set db_recovery_file_dest_size=21474836480
標簽:
Oracle
數(shù)據(jù)庫
排行榜
