用备份控制文件的恢复

用备份控制文件的恢复,控制文件中不包含数据文件,但联机日志中有
           alter database backup controlfile to ‘D:\control.ctl‘;
           create tablespace tp1 datafile ‘D:/tp1.dbf‘ size 10M;
           create table t1(id int,name varchar2(10)) tablespace tp1;
           insert into t1 values(1,‘pl1‘);
           commit;

停服务==>services.msc==>停oracle进程
           rm -rf control*
           shutdown abort;
           拷贝 D:\control.ctl  D:\app\administrator\oradata\orcl\control01.ctl
           startup mount;
           select file#,checkpoint_change# from v$datafile;
           select file#,checkpoint_change# from v$datafile_header;
           alter database open; //提示控制文件旧了
           recover database using backup controlfile;

select * from v$log 找current的log

输入D:\oradata\orcl\redo02.log  --状态是current

提示有一个文件不识别

select file#,name from v$datafile;

alter database rename file‘D:\app/administrator\product\11.2.0\dbhome_1\database\UNNAMED00005‘ to ‘D:\tp1.dbf‘;

recover database using backup controlfile;
          输入:/oradata/orcl/redo02.log  --一select * from v$log;
          alter database open resetlogs;

时间: 2024-08-24 08:28:37

用备份控制文件的恢复的相关文章

Oracle RMAN 备份控制文件/恢复控制文件

--备份控制文件 rman target / RMAN> startup RMAN> configure controlfile autobackup on; --启动自动备份 RMAN> show CONTROLFILE AUTOBACKUP;  --显示是否自动备份控制文件 RMAN> configure controlfile autobackup format for device type disk to '/backup/%F'; --设置控制文件备份路径 RMAN&g

RMAN备份之丢失数据文件及控制文件的恢复

About Recovery with a Backup Control FileIf all copies of the current control file are lost or damaged, then you must restore and mount a backup control file. You must then run the RECOVER command, even if no data files have been restored, and open t

手动不完全恢复测试使用备份控制文件

手动不完全恢复测试使用备份控制文件 备份数据库 SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/prod/system01.dbf /u01/app/oracle/oradata/prod/sysaux01.dbf /u01/app/oracle/oradat

linux备份mysql文件并恢复的脚本,以及其中出现的错误:ERROR: ASCII '\0' appeared in the statement

首先是在网上找了一下教程,代码很简单 #!/bin/bash folder=~/test time=`date +%Y%m%d` mysqldump -u user -p pwd -hlocalhost databasename | gzip > $folder/databasename_$time.sql.gz # find $folder -name 'databasename_*.sql.gz' -type f -mtime +7 -exec rm {} \; # gunzip < $f

控制文件手工恢复

所有的控制文件坏了,有备份进行恢复 (1)备份control fileSQL> alter database backup controlfile to '/orcl_backup/hot/control.bin'; Database altered. 查看 检查点情况SQL> col name for a35SQL> select file#,name ,checkpoint_change# from v$datafile; FILE# NAME CHECKPOINT_CHANGE#-

【控制文件丢失-恢复-1】

控制文件恢复: [[email protected] ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 10:35:08 2014 Copyright (c) 1982, 2010, Oracle.  All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 -

手工备份控制文件和参数文件

备份二进制控制文件 SQL> alter database backup controlfile to 'd:\contronfile01.bkp'; 数据库已更改. 创建文本的控制文件内容 SQL> alter database backup controlfile to trace; 数据库已更改. 具体文件目录:查看参数:USER_DUMP_DEST oracle 9i以后采用spfile,服务端参数文件是一个二进制的参数文件.二进制文件跟文本文件之间的转换 SQL> create

oracle 使用备份的控制文件恢复,并且之后新建了表空间的恢复

1.备份的控制文件之后创建表空间,控制文件全部丢失,使用备份控制文件如何恢复 步骤如下: 1.备份数据库 rman target / catalog RC_ADMIN/[email protected] backup database plus archivelog delete all input; 2.创建表空间 [email protected]>create tablespace indx 2  datafile '/u01/app/oracle/oradata/PROD2/indx01

Oracle DB备份恢复篇之丢失控制文件

实验目的 本篇主要模拟控制文件丢失后,如何根据实际情况恢复数据库,才能使数据库尽可能不丢失数据. 实验环境 1)Linux系统环境 [[email protected] ~]$ lsb_release -a LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Ente