今天在设置归档模式的时候遇到了这个问题:
在open的情况下设置归档路径:
SQL>alter system set log_archive_dest_1='location=/u01/app/oracle/arch_prod'scope=spfile;
SQL>starup mount force;
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1262140 bytes
Variable Size 134221252 bytes
Database Buffers 281018368 bytes
Redo Buffers 292860 bytes
Database mounted.
SQL>alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265:instance recovery required,cannot set ARCHIVELOG mode
报这个错误,我想了想,原来是刚才启动的太暴力了,用了FORCE,相当于shutdown abort,然后再启。
这次温柔一点吧
SQL>shutdown immediate;
ORA-01109:database not open
SQL>startup mount ;
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1262140 bytes
Variable Size 134221252 bytes
Database Buffers 281018368 bytes
Redo Buffers 292860 bytes
Database mounted.
SQL>alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265:instance recovery required,cannot set ARCHIVELOG mode
还报这个错误,哦,想起来了,可能必须要在OPEN的状态下安全关闭才行,因为刚才也报了01109的错。
SQL>alter database open;
SQL>shutdown immediate;
SQL>startup mount;
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1262140 bytes
Variable Size 134221252 bytes
Database Buffers 281018368 bytes
Redo Buffers 292860 bytes
Database mounted.
SQL>alter database archivelog;
Database altered.
成功了。我们查看一下。
SQL>archive log list;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25116248/viewspace-1059077/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25116248/viewspace-1059077/