欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

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

程序员文章站 2022-06-12 16:22:57
...

Oracle 11g数据库维护中错误总结 开启归档日志失败SQLgt; alter database archivelog; alter database archivelog * ERROR at l

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

首页 → 数据库技术

背景:

阅读新闻

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

[日期:2014-02-24] 来源:Linux社区 作者:tongcheng [字体:]

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>