change db name by recreating control file
来源:互联网 发布:保温杯 知乎 编辑:程序博客网 时间:2024/05/18 02:23
1.Use SQL "alter database backup controlfile to trace" to backup the controlfile-created script.
2.shutdown database
3.backup all datafile/controlfile/redofile to a new place in order to prevent the option from mistake.
4.Delete the old controlfile,open tracefile created in step 1 ,update the scripts,I met the 2 errors as the following:
---------------OldName:PROD, New DB Name: TEST ------------------
ERROR 1.CREATE CONTROLFILE reuse DATABASE "TEST" NORESETLOGS NOARCHIVELOG==>error
ERROR 2.CREATE CONTROLFILE set DATABASE "TEST" NORESETLOGS NOARCHIVELOG ==>error
RECOVER DATABASE
# Database can now be opened normally.
ALTER DATABASE OPEN;
Right One is:
CREATE CONTROLFILE set DATABASE "TEST" RESETLOGS NOARCHIVELOG /*Attention point 1*/
RECOVER DATABASE USING BACKUP CONTROLFILE /*Attention point 2*/
# Database can now be opened zeroing the online logs./*Attention point 3*/
ALTER DATABASE OPEN RESETLOGS;/*Attention point 4*/
Following is the detail:
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
SQL> RECOVER DATABASE using backup controlfile until cancel;
ORA-00279: change 9747475574288 generated at 12/14/2007 00:19:43 needed for
thread 1
ORA-00289: suggestion : /home/oracle/9.2.0/dbs/arch/arch_1_2.arc
ORA-00280: change 9747475574288 for thread 1 is in sequence #2
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/disk1/oradata/prod/log01b.dbf
Log applied.
Media recovery complete.
SQL> alter database open resetlogs;
Database Altered;
5.You can restart use the PLSQL"show parameter db_name" to confirm the actions.
- change db name by recreating control file
- batch change file name
- mongodb gridfs delete file by name
- How to start a DB job by batch file
- File Change
- XDB: Utility package to change the HTTP and FTP ports used by XML DB
- XDB: Utility package to change the HTTP and FTP ports used by XML DB.
- Refer to a file by its object name
- linux下found a swap file by the name
- Found a swap file by the name “.git/.MERGE_MSG.swp”
- Found a swap file by the name ".jsidInspector.py.swp"
- E325: ATTENTION Found a swap file by the name
- Found a swap file by the name “.git/.MERGE_MSG.swp”
- 关于 Found a swap file by the name xx
- DB server name OR DB cluster name?
- Iphone Change Application Name
- Java - Change Suffix Name
- Change Oracle Service Name
- 简单的存储过程
- DIV+CSS布局基础:HTML标记(一)
- 在struts中使用Validator框架
- DIV+CSS布局基础:HTML标记(二)
- DIV+CSS布局基础:HTML标记(三)
- change db name by recreating control file
- 如何在静态HTM页面中实现无刷新的更换CSS样式
- 星期天
- Linux或Unix下怎样修改系统时间
- test
- 简单的xml数据岛
- 字符编码
- eclipse3.3(Europa)+lomboz插件,编辑jsp
- 在使用ORACLE时常用到的命令和脚本