Chinaunix首页 | 论坛 | 博客
  • 博客访问: 249399
  • 博文数量: 91
  • 博客积分: 2016
  • 博客等级: 大尉
  • 技术积分: 820
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-08 23:25
文章分类

全部博文(91)

文章存档

2011年(6)

2010年(6)

2009年(34)

2008年(45)

我的朋友

分类:

2009-04-25 19:34:42

更改log_archive_format
重新启动报错ORA-19905: log_archive_format must contain %s, %t


做一个测试想把非归档改为归档


SQL> select log_mode from v$database;

LOG_MODE
------------
NOARCHIVELOG

SQL> alter system set log_archive_dest = 'E:\oracle\product\10.2.0\oradata\orcl\archive\' scope=spfile;

系统已更改

SQL> alter system set log_archive_format='arch_%t_%s.arc' scope=spfile;

系统已更改


SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库

oracle例程已经关闭。

SQL> startup mount;
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORA-19905: log_archive_format must contain %s, %t and %r


根据提示很容易知道是由于log_archive_format必须包含 %s, %t and %r

于是通过pfile文件重新启动实例

SQL>startup pfile='d:\xxx\init.ora';

Total System Global Area  612368384 bytes
Fixed Size                  1250428 bytes
Variable Size             167775108 bytes
Database Buffers          436207616 bytes
Redo Buffers                7135232 bytes
数据库装载完毕。
数据库已经打开。


SQL> create spfile from pfile='d:\xxx\init.ora';

文件已创建。


SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库

oracle例程已经关闭。


SQL> startup

Total System Global Area  612368384 bytes
Fixed Size                  1250428 bytes
Variable Size             167775108 bytes
Database Buffers          436207616 bytes
Redo Buffers                7135232 bytes
数据库装载完毕。
数据库已经打开。


此问题得到解决

注:如果没找到pfile文件,可以到alert.log里面去找一段,然后新建一个pfile



阅读(1716) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~