视窗
loading...
您现在的位置:首页 > IT认证 > oracle认证 >

Oracle备份恢复:oracle用老的控制文件备份恢复新建的数据文件


Oracle备份恢复:oracle用老的控制文件备份恢复新建的数据文件

备份控制文件并在备份后新建表空间和数据:

  SQL> alter database backup controlfile to trace as '/home/oracle/ctl.sql';

  Database altered.

  SQL> create tablespace tbs_tbs datafile '/database/oradata/skyread/tbs_tbs.dbf' size 10M;

  Tablespace created.

  SQL> create table t02 tablespace tbs_tbs as select * from dict;

  Table created

  干净关闭数据库,模拟控制文件损坏:

  SQL> shutdown immediate;

  oracle@readerlogdb-> mv tbs_tbs.dbf tbs_tbs.dbf.bak

  oracle@readerlogdb-> mv control01.ctl control01.ctl.bak

  oracle@readerlogdb-> mv control02.ctl control02.ctl.bak

  oracle@readerlogdb-> mv control03.ctl control03.ctl.bak

  SQL> startup;

  ORACLE instance started.

  Total System Global Area 5049942016 bytes

  Fixed Size 2090880 bytes

  Variable Size 1375733888 bytes

  Database Buffers 3657433088 bytes

  Redo Buffers 14684160 bytes

  ORA-00205: error in identifying control file, check alert log for more info

  这个门用的是刚才备份的脚本新建,可见里面无 tbs_tbs这个数据文件:

  SQL>CREATE CONTROLFILE REUSE DATABASE "SKYREAD" NORESETLOGS FORCE LOGGING ARCHIVELOG

  MAXLOGFILES 20

  MAXLOGMEMBERS 5

  MAXDATAFILES 1000

  MAXINSTANCES 8

  MAXLOGHISTORY 2337

  LOGFILE

  GROUP 1 '/database/oradata/skyread/redo01.log' SIZE 512M,

  GROUP 2 '/database/oradata/skyread/redo02.log' SIZE 512M,

  GROUP 3 '/database/oradata/skyread/redo03.log' SIZE 512M,

  GROUP 4 '/database/oradata/skyread/redo04.log' SIZE 512M,

  GROUP 5 '/database/oradata/skyread/redo05.log' SIZE 512M

銆€

銆€

銆愬厤璐e0鏄庡拰鐗堟潈璇存槑銆�
鏈珯閮ㄥ垎淇℃伅鏉ユ簮浜庝簰鑱旂綉锛�瀵硅浆杞界殑淇℃伅鎴戜滑鍔涙眰鏍囨槑淇℃伅鐨勫嚭澶勶紝鎴戜滑灏婇噸浣滆€呯殑鐗堟潈钁椾綔鏉冿紝瀵规垜浠浆杞界殑淇℃伅濡傛湁寮傝鎴栨湁渚垫潈鎴栬繚娉曚俊鎭鍙婃椂鑱旂郴鎴戜滑锛屾湰绔欎細绔嬪嵆鍒犻櫎锛�瀵瑰師鍒涘唴瀹规垜浠効鎰忔敮浠橀€傚綋鐨勭ǹ閰紝鑱旂郴鏂瑰紡锛氶偖浠�:webmaster@jscj.com銆€鐢佃瘽锛�4008816886

相关文章

无相关信息
更新时间2022-03-13 11:18:59【至顶部↑】
联系我们 | 邮件: webmaster@jscj.com | 客服热线电话:4008816886(QQ同号) |  娣诲姞瀹㈡湇寰俊

付款方式留言簿投诉中心网站纠错二维码手机版

客服电话: