1.安装一个和原系统一致的oracle 环境,主要包括版本、数据名sid、实例名、路径和数据库编码一致
2.修改listener.ora的参数
<span style="color:#455353;">SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = D:\oracle\product.1.0\db_1) (PROGRAM = extproc) ) </span><span style="color:#ff0000;"> (SID_DESC = (GLOBAL_DBNAME = orcl) //如果已经有这个orcl了,这个文件就不用修改 (ORACLE_HOME = D:\oracle\product.1.0\db_1) //这里要根据你的实际路径来 (SID_NAME = orcl) )</span><span style="color:#455353;"> ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = lypch )(PORT = 1521)) ) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) ) )</span>
3.修改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) ) )
4.SQL>shutdown immediate 停止服务,将新安装的oracle的dbf备份后删除,将原dbf拷贝到新安装的目录下F:\app\toshiba\oradata\orcl
5.原oracle库主目录下的FLASH_RECOVERY_AREA目录全部覆盖到新安装的oracle对应目录下
6. SQL>startup 再次启动服务