【准备】完全一致:两个系统的数据库版本的版本、数据名sid、实例名、路径和数据库编码完全一致。
【监听器】修改listener.ora的参数
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl) //如果已经有这个orcl了,这个文件就不用修改
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1) //这里要根据你的实际路径来
(SID_NAME = orcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lypch )(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)
【本地服务名】修改tnsnames.ora的参数
AMMICLY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lypch )(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(UR=A) //参数允许只进行管理性的连接,数据库nomount,mount或者restricted时,动态监听显示状态为BLOCKED时,客户端配置UR=A进行连接。
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
【DBF拷贝】SQL>shutdown immediate 停止服务,将新安装的oracle的dbf备份后删除,将原dbf拷贝到新安装的目录下F:\app\toshiba\oradata\orcl
【覆盖】原oracle库主目录下的FLASH_RECOVERY_AREA目录全部覆盖到新安装的oracle对应目录下
【重启】SQL>startup 再次启动服务
【完成】END