archive啟用歸檔模式

ocpDBAboy發表於2014-03-26
SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 26 15:41:16 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list; --檢視歸檔狀態
Database log mode No Archive Mode --未啟用歸檔模式
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 65
Current log sequence 67
SQL> shutdown immediate; --立即關閉資料庫
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount; --開啟資料到mount狀態
ORACLE instance started.
Total System Global Area 613797888 bytes
Fixed Size 2178216 bytes
Variable Size 192938840 bytes
Database Buffers 411041792 bytes
Redo Buffers 7639040 bytes
Database mounted.
SQL> select status from v$instance; --檢視資料庫開啟狀態
STATUS
------------
MOUNTED
SQL> alter database archivelog; --啟用歸檔模式
Database altered.
SQL> alter database open; --開啟資料庫到open狀態
Database altered.
SQL> select status from v$instance; --檢視資料庫開啟狀態
STATUS
------------
OPEN
SQL> archive log list; --檢視是否歸檔
Database log mode Archive Mode --歸檔模式已啟用
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 65
Next log sequence to archive 67
Current log sequence 67
SQL>


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29267792/viewspace-1130006/,如需轉載,請註明出處,否則將追究法律責任。

相關文章