重装系统Oracle数据库恢复

  1.首先百度了下,重装系统之后怎么恢复Oracle数据库,看到一篇博客比较好弄,于是参照这篇博客来点击打开链接

  2.重启电脑之后,连接不上。查找几个重要的路径

Oracle日志文件记录位置
F:\app\chengdu\diag\rdbms\orcl\orcl\trace\alert_orcl.log


F:\app\chengdu\product\11.2.0\dbhome_1\dbs\init.ora
F:\app\chengdu\admin\orcl\pfile\init.ora.172018115615


F:\app\chengdu\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
F:\app\chengdu\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora
F:\app\chengdu\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora


查看Oracle表空间文件位置
 select t1.name,t2.name  from v$tablespace t1,v$datafile t2 where t1.ts# = t2.ts#;


H:\APP\CHENGDU\ORADATA\ORCL\SYSTEM01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\SYSAUX01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\UNDOTBS01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\USERS01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\EXAMPLE01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\GZF_SOAR_DATA01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\GZF_SOAR_INDEX_DATA01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\GZF_COMMON_DATA01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\GZF_COMMON_INDEX_DATA01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\GZF_ZFBZ_DATA01.DBF
H:\APP\CHENGDU\ORADATA\ORCL\GZF_ZFBZ_INDEX_DATA01.DBF


修该表空间位置
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\SYSTEM01.DBF'                 to 'F:\APP\CHENGDU\ORADATA\ORCL\SYSTEM01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\SYSAUX01.DBF'                 to 'F:\APP\CHENGDU\ORADATA\ORCL\SYSAUX01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\UNDOTBS01.DBF'                to 'F:\APP\CHENGDU\ORADATA\ORCL\UNDOTBS01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\USERS01.DBF'                  to 'F:\APP\CHENGDU\ORADATA\ORCL\USERS01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\EXAMPLE01.DBF'                to 'F:\APP\CHENGDU\ORADATA\ORCL\EXAMPLE01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\GZF_SOAR_DATA01.DBF'          to 'F:\APP\CHENGDU\ORADATA\ORCL\GZF_SOAR_DATA01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\GZF_SOAR_INDEX_DATA01.DBF'    to 'F:\APP\CHENGDU\ORADATA\ORCL\GZF_SOAR_INDEX_DATA01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\GZF_COMMON_DATA01.DBF'        to 'F:\APP\CHENGDU\ORADATA\ORCL\GZF_COMMON_DATA01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\GZF_COMMON_INDEX_DATA01.DBF'  to 'F:\APP\CHENGDU\ORADATA\ORCL\GZF_COMMON_INDEX_DATA01.DBF';
alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\GZF_ZFBZ_DATA01.DBF'          to 'F:\APP\CHENGDU\ORADATA\ORCL\GZF_ZFBZ_DATA01.DBF';

alter database rename file 'H:\APP\CHENGDU\ORADATA\ORCL\GZF_ZFBZ_INDEX_DATA01.DBF'    to 'F:\APP\CHENGDU\ORADATA\ORCL\GZF_ZFBZ_INDEX_DATA01.DBF';


修改几个重要位置就OKay了


你可能感兴趣的:(数据库)