oracle重新使用spfile后无法mount数据库

http://www.powersite.cn/?q=node/104

今天在解决一个oracle数据库问题时,需要通过pfile生成spfile,create后,先是报memory pool设置的太小,改完后,再次启动oracle,结果报控制文件找不到,从原来的pfile文件中找到control_file一行,将内容拷贝过去,再次重新启动,虽然数据库可以启动,但是无法挂载,报ora-00201,ora-01103错误,在网上搜索了一圈,在itpub上找到了解决办法,报的错误都是一模一样,只要根据以下步骤操作即可。

[oracle@rdas3 log]$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.1.0.3.0 - Production on Tue Dec 6 10:37:26 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> alter system set control_files='/opt/app/oracle/oradata/orcl/control01.ctl' scope=spfile;
alter system set control_files='/opt/app/oracle/oradata/orcl/control01.ctl' scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup

SQL> create spfile from pfile;

File created.

SQL> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 88080384 bytes
Fixed Size 777812 bytes
Variable Size 87040428 bytes
Database Buffers 0 bytes
Redo Buffers 262144 bytes
ORA-00205: error in identifying controlfile, check alert log for more info

SQL> alter system set control_files='/opt/app/oracle/oradata/orcl/control01.ctl' scope=spfile;

System altered.

SQL> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 88080384 bytes
Fixed Size 777812 bytes
Variable Size 87040428 bytes
Database Buffers 0 bytes
Redo Buffers 262144 bytes
ORA-00201: controlfile version 10.1.0.2.0 incompatible with ORACLE version
10.0.0.0.0
ORA-00202: controlfile: '/opt/app/oracle/oradata/orcl/control01.ctl'

SQL> show parameter com

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
commit_point_strength integer 1
compatible string 10.0.0
max_commit_propagation_delay integer 700
nls_comp string
plsql_compiler_flags string INTERPRETED, NON_DEBUG
plsql_v2_compatibility boolean FALSE
SQL> alter system set compatible='10.1.0.3.0' scope=spfile;

System altered.

SQL> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 88080384 bytes
Fixed Size 777812 bytes
Variable Size 87040428 bytes
Database Buffers 0 bytes
Redo Buffers 262144 bytes
ORA-01103: database name 'ORCL' in controlfile is not 'DEFAULT'

SQL> oerr ora 1103
SP2-0734: unknown command beginning "oerr ora 1..." - rest of line ignored.
SQL> host oerr ora 1103
01103, 00000, "database name '%s' in controlfile is not '%s'"
// *Cause: The database name in the controlfile does not match your
// database name.
// *Action: Either find the correct controlfile or change your database name.

SQL> show parameter db_name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string DEFAULT
SQL> alter system set db_name=ORCL scope=spfile;

System altered.

SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01103: database name 'ORCL' in controlfile is not 'DEFAULT'

SQL> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 88080384 bytes
Fixed Size 777812 bytes
Variable Size 87040428 bytes
Database Buffers 0 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL> exit

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20570073/viewspace-563187/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/20570073/viewspace-563187/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值