查看是否为归档模式:
SQL> archive log list;
Database log mode No Archive Mode --非归档模式
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Current log sequence 11
Automatic archival Disabled //Disabled表示数据库为非归档模式
修改数据库为归档模式步骤:
1.关闭数据库
2.启动数据库到mount状态
3.修改数据库为归档模式
4.open数据库
1)关闭数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
2)启动数据库到mount状态
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 1006636072 bytes
Database Buffers 637534208 bytes
Redo Buffers 7094272 bytes
Database mounted.
3)修改数据库为归档模式
SQL> alter database archivelog;
Database altered.
4)open数据库
SQL> alter database open;
Database altered.
5)验证
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 11
Current log sequence 11
SQL> archive log list;
Database log mode No Archive Mode --非归档模式
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Current log sequence 11
Automatic archival Disabled //Disabled表示数据库为非归档模式
修改数据库为归档模式步骤:
1.关闭数据库
2.启动数据库到mount状态
3.修改数据库为归档模式
4.open数据库
1)关闭数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
2)启动数据库到mount状态
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 1006636072 bytes
Database Buffers 637534208 bytes
Redo Buffers 7094272 bytes
Database mounted.
3)修改数据库为归档模式
SQL> alter database archivelog;
Database altered.
4)open数据库
SQL> alter database open;
Database altered.
5)验证
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 11
Current log sequence 11
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28282660/viewspace-1403543/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28282660/viewspace-1403543/