分类: Oracle
2015-10-22 09:48:07
修改oracle为归档模式
1,查看是否为归档模式
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 31
Current log sequence 33
2,关闭数据库
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
3,启动数据库到mount模式
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 2020384 bytes
Variable Size 318770144 bytes
Database Buffers 889192448 bytes
Redo Buffers 14753792 bytes
Database mounted.
4,修改数据库为归档模式
SQL> alter database archivelog;
Database altered.
5,打开数据库库
SQL> alter database open;
SQL> SELECT NAME,created,log_mode FROM v$database;
NAME CREATED LOG_MODE
--------- --------- ------------
ORCL 04-JUN-12 ARCHIVELOG