1. at old db ,run sql: alter database backup controlfile to trace 2. find the trace at udump folder, edit the trace file: delele the duplicate scripts, replacing the SID to new SID in the control file, replace from "resuse" to "set" new SID , alter database open resetlogs 3. create new folder that you want to place db files and new initSID.ora parameter file. 4. move the datafile to new folder. 5. nomount db use this new initSID.ora file 6. run the trace file. 7. change the global db name. 8. change the listener.ora & tnsnames.ora
我英语学的不好,请Petergepeter 用汉语回复~
1. 跑sql在原来DB里: alter database backup controlfile to trace 2. 到udump文件夹, 编辑刚才产生的TRACE文件,看产生时间好了: 有两端是一样的,删除掉,还有一些注解,以及其它没有的也去掉:(下面是一部分). 替换旧的SID到新的SID, 替换"resuse"到"set" , 最后alter database open resetlogs 3. 新的文件夹,或改变原来文件夹的名字,当然不改也可以.同时改写新的initSID.ora,以便通过这个启动DB. 4. 拷贝文件. 5. nomount db 用刚才新的initSID.ora file 6. 跑trace 文件里的sql. 7. 改global db name. 8. 改listener.ora & tnsnames.ora里的SID.建议你先看看如何手动建立DB.
2. find the trace at udump folder, edit the trace file:
delele the duplicate scripts,
replacing the SID to new SID in the control file,
replace from "resuse" to "set" new SID ,
alter database open resetlogs
3. create new folder that you want to place db files and new initSID.ora parameter file.
4. move the datafile to new folder.
5. nomount db use this new initSID.ora file
6. run the trace file.
7. change the global db name.
8. change the listener.ora & tnsnames.ora
2. 到udump文件夹, 编辑刚才产生的TRACE文件,看产生时间好了:
有两端是一样的,删除掉,还有一些注解,以及其它没有的也去掉:(下面是一部分).
替换旧的SID到新的SID,
替换"resuse"到"set" ,
最后alter database open resetlogs
3. 新的文件夹,或改变原来文件夹的名字,当然不改也可以.同时改写新的initSID.ora,以便通过这个启动DB.
4. 拷贝文件.
5. nomount db 用刚才新的initSID.ora file
6. 跑trace 文件里的sql.
7. 改global db name.
8. 改listener.ora & tnsnames.ora里的SID.建议你先看看如何手动建立DB.