duplicate在线迁移数据库
1.重启主库并开启归档模式(如已开启归档模式忽略此步骤)
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> alter database open;
SQL> alter system set log_archive_dest_1=‘location=/oradata/topcard/ARCH’;
System altered.
2.创建pfile并修改相关参数
SQL>create pfile=’/tmp/topcard.ora’ from spfile;
3.新建的pfile中添加相关参数,
vi /tmp/topcard.ora
db_file_name_convert=(’/oradata/topcard’,’/oradata/topcard’)
log_file_name_convert=(’/oradata/topcard/ONLINELOG/’,’/oradata/topcard/ONLINELOG/’)
db_unique_name=topcarda
注意修改controlfile路径,此处路径应为目标库控制文件路径。
*.control_files=’/oradata/topcard/CONTROLFILE/control01.ctl’,’/oradata/topcard/CONTROLFILE/control02.ctl’
4.传输密码文件以及参数文件