Oracle 11g数据库维护中错误总结


Oracle 11g数据库维护中错误总结

开启归档日志失败
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode    --上欠数据库意外中止才会出现这种情况,千万不要用shutdown abort终止数据库

解决方法:
SQL> shutdown immediate    --停止数据库
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup    --打开数据库
ORACLE instance started.
Total System Global Area  661209088 bytes
Fixed Size          1338560 bytes
Variable Size        486540096 bytes
Database Buffers      167772160 bytes
Redo Buffers            5558272 bytes
Database mounted.
Database opened.
SQL> shutdown immediate    --正常停止数据库
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount    --数据库启动到挂载状态
ORACLE instance started.
Total System Global Area  661209088 bytes
Fixed Size          1338560 bytes
Variable Size        486540096 bytes
Database Buffers      167772160 bytes
Redo Buffers            5558272 bytes
Database mounted.
SQL> alter database archivelog;    --修改成功
Database altered.
SQL>

测试:
SQL> select log_mode from v$database;    --查看数据库是否为归档模式
LOG_MODE
------------
ARCHIVELOG
SQL>

相关内容