10g启动归档模式及报ORA-00265错处理

1)问题原因及现象简单说明:
因虚拟机非正常关机(数据库也非正常关机),再次启动startup mount,修改为archivel模式的时候提示
SQL> alter database archivelog;    
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
2)正常启动数据库,然后再正常关闭
SQL> alter database open;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
3)mount数据库,再alter为archivel模式则恢复正常
SQL> alter database archivelog;

Database altered.

SQL> select log_mode from v$database;

LOG_MODE
------------------------
ARCHIVELOG

SQL>
4)查看归档信息
SQL> archive log list
Database log mode                            Archive Mode
Automatic archival                         Enabled
Archive destination                        USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence         4
Next log sequence to archive     6
Current log sequence                     6
SQL>
5)修改归档位置
SQL> alter system set log_archive_dest_1='location=/opt/oracle/archive_log/archive_log';

System altered.

SQL>show parameter log_archive_dest_1

NAME                                                                 TYPE                                     VALUE
------------------------------------ ---------------------- ------------------------------
log_archive_dest_1                                     string                                 location=/opt/oracle/archive_l
                                                                                                                        og/archive_log
log_archive_dest_10                                    string
SQL>
SQL> archive log list
Database log mode                            Archive Mode
Automatic archival                         Enabled
Archive destination                        /opt/oracle/archive_log/archive_log
Oldest online log sequence         4
Next log sequence to archive     6
Current log sequence                     6
SQL>
6)修改最大log_archive个数
SQL> alter system set log_archive_max_processes = 5;

System altered.

SQL>
7)修改log_archive格式
SQL> show parameter log_archive_format

NAME                                                                 TYPE             VALUE
------------------------------------ ---------- ------------------------------
log_archive_format                                     string         %t_%s_%r.dbf
SQL> alter system set log_archive_format = "archive_%t_%s_%r.log" scope=spfile;

System altered.
SQL> show parameter log_archive_format

NAME                                                                 TYPE             VALUE
------------------------------------ ---------- ------------------------------
log_archive_format                                     string         %t_%s_%r.log
SQL>


本文出自 “Focus on Oracle” 博客,请务必保留此出处http://alexy.blog.51cto.com/6115453/1072670

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值