昨天在用cif2cow库建一个测试库hscif2的时候,数据库本来是正常可以open的,由于要修改dbname选择了使用nid修改
但是在执行nid的时候由于temp表空间的文件数据字典中存在的信息是生产库中的地址和文件,在测试库上没有加temp文件
Nid失败之后尝试open、重建控制文件、还是继续NID或者NID回退都失败了,open数据库会提示你NID没有做完,要继续做完或者回退
Nid或nid回退会提示你临时文件不存在,因为数据库没有open,所以数据库不能加临时文件,重建控制文件会提示你undo或者system表空间的dbname不一致
上面所有尝试都失败之后在/paic目录下建了hq/cif2/oradata/cif2 子目录,然后把原来cow库的temp文件全部拷贝过来(cow库已重新同步还在open的状态)
然后在/paic/hq/cif2/oradata/cif2下面做了连接,即所有几个temp文件都在/paic/hq/cif2/oradata/cif2目录下貌似存在了
使用NID进行回退,结果NID顺利通过,数据库可以open了,综上oracle被骗了
个人还有一个经验在使用nid的时候千万不能在sqlplus里面用host或者!退出进行修改dbid,dbname的操作,因为nid结束了之后要shutdown数据库
这时候它发现有local=YES的进程,无法结束会厂商kill,结果把自己kill掉nid结束不了,可能也会出现数据库open不了的情况
g4cs2031[hscif2r2]node2> sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Sep 5 14:44:51 2011
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1048576000 bytes
Fixed Size 2035432 bytes
Variable Size 289411352 bytes
Database Buffers 700448768 bytes
Redo Buffers 56680448 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
g4cs2031[hscif2r2]node2> nid target=sys/paic1234 dbname=hscif2 setname=yes
DBNEWID: Release 10.2.0.3.0 - Production on Mon Sep 5 14:45:38 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to database CIF2 (DBID=4058322385)
Connected to server version 10.2.0
Control Files in database:
/paic/stg/hscif2/data/oradata/cif2/q1/control01.ctl
/paic/stg/hscif2/data/oradata/cif2/q1/control02.ctl
/paic/stg/hscif2/data/oradata/cif2/q1/control03.ctl
Change database name of database CIF2 to HSCIF2? (Y/[N]) => Y
Proceeding with operation
Changing database name from CIF2 to HSCIF2
Control File /paic/stg/hscif2/data/oradata/cif2/q1/control01.ctl - modified
Control File /paic/stg/hscif2/data/oradata/cif2/q1/control02.ctl - modified
Control File /paic/stg/hscif2/data/oradata/cif2/q1/control03.ctl - modified
Datafile /paic/stg/hscif2/data/oradata/cif2/q1/system01.dbf - wrote new name
Datafile /paic/stg/hscif2/data/oradata/cif2/q1/undotbs101.dbf - wrote new name
Datafile /paic/stg/hscif2/data/oradata/cif2/q1/sysaux01.dbf - wrote new name
Datafile /paic/stg/hscif2/data/oradata/cif2/q1/pausers02.dbf - wrote new name
…………….
Datafile /paic/stg/hscif2/data/oradata/cif2/q2/cifdatapart1214.dbf - wrote new name
NID-00111: Oracle error reported from target database while executing
begin dbms_backup_restore.nidprocessdf(:fno, :istemp, :skipped, :idchged, :nmchged); end;
ORA-01116: error in opening database file /paic/hq/cif2/oradata/cif2/temp01.dbf
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 6164
ORA-06512: at line 1
Change of database name failed.
Must finish change or REVERT changes before attempting any database operation.
DBNEWID - Completed with errors.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15779287/viewspace-706747/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15779287/viewspace-706747/
本文记录了一次使用Oracle的cif2cow库进行数据库名称修改时遇到的问题及解决过程。在尝试使用NID工具更改数据库名字时,由于临时表空间文件路径配置错误导致的一系列问题,包括数据库无法打开、控制文件重建失败等。最终通过复制正确的临时文件并调整文件路径解决了问题。
2626

被折叠的 条评论
为什么被折叠?



