1. 程式人生 > >Oracle RMAN異機恢復歸檔RMAN-07518(供日誌挖掘使用)及修改dbid步驟

Oracle RMAN異機恢復歸檔RMAN-07518(供日誌挖掘使用)及修改dbid步驟

Recovery Manager: Release 11.2.0.4.0 - Production on Sat Jul 16 15:35:06 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: LKDB (DBID=1488801557)
RMAN> catalog start with '/u01/orcl_arch_full_gprangja_1_1';
using target database control file instead of recovery catalog
searching for all files that match the pattern /u01/orcl_arch_full_gprangja_1_1
List of Files Unknown to the Database
=====================================
File Name: /u01/orcl_arch_full_gprangja_1_1
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
no files cataloged
List of Files Which Where Not Cataloged
=======================================
File Name: /u01/orcl_arch_full_gprangja_1_1
  RMAN-07518: Reason: Foreign database file DBID: 1460399894  Database Name: LKDB
  
SQL> select dbid from v$database;
      DBID
----------
1488801557

SQL> exec dbms_backup_restore.nidbegin('lkdb','LKDB','1460399894','1488801557',0,0,10);
PL/SQL procedure successfully completed.

SQL> variable a number;
SQL> variable b number
SQL> variable c number;
SQL> exec dbms_backup_restore.nidprocessdf(0,0,:a,:b,:c);
PL/SQL procedure successfully completed.

SQL> print a;
         A
----------
         0
SQL> print b
         B
----------
         1
SQL> print c
         C
----------
         1
SQL> exec dbms_backup_restore.nidprocesscf(:a,:b);
PL/SQL procedure successfully completed.
SQL> print a
         A
----------
         1
SQL> print b
         B
----------
         1
SQL> print c
         C
----------
         1
SQL> exec dbms_backup_restore.nidend;
PL/SQL procedure successfully completed.
SQL> select dbid from v$database;
      DBID
----------
1460399894
SQL> shutdown immediate;
ORA-03113: end-of-file on communication channel
Process ID: 4509
Session ID: 22 Serial number: 9

SQL> startup
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area  413372416 bytes
Fixed Size                  2253784 bytes
Variable Size             327158824 bytes
Database Buffers           79691776 bytes
Redo Buffers                4268032 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 1120700 generated at 07/16/2016 15:36:37 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/product/11.2.0/db_1/dbs/arch/1_10_917364373.dbf
ORA-00280: change 1120700 for thread 1 is in sequence #10
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00308: cannot open archived log
'/u01/app/oracle/product/11.2.0/db_1/dbs/arch/1_10_917364373.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

ORA-00308: cannot open archived log
'/u01/app/oracle/product/11.2.0/db_1/dbs/arch/1_10_917364373.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/lkdb/system01.dbf'
SQL>  alter system set undo_management='manual' scope=spfile;
System altered.

SQL>  shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL>  startup mount;
ORACLE instance started.
Total System Global Area  413372416 bytes
Fixed Size                  2253784 bytes
Variable Size             318770216 bytes
Database Buffers           88080384 bytes
Redo Buffers                4268032 bytes
Database mounted.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/lkdb/system01.dbf'

SQL>  alter system set "_allow_resetlogs_corruption"=true scope=spfile;
System altered.

SQL>  shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area  413372416 bytes
Fixed Size                  2253784 bytes
Variable Size             318770216 bytes
Database Buffers           88080384 bytes
Redo Buffers                4268032 bytes
Database mounted.
SQL>  alter database open resetlogs;
Database altered.

SQL> alter system set undo_management='auto' scope=spfile;
System altered.

SQL>  alter system set "_allow_resetlogs_corruption"=false scope=spfile;
System altered.

SQL>  shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>  startup
ORACLE instance started.
Total System Global Area  413372416 bytes
Fixed Size                  2253784 bytes
Variable Size             327158824 bytes
Database Buffers           79691776 bytes
Redo Buffers                4268032 bytes
Database mounted.
Database opened.

SQL> select name,dbid from v$database;
NAME            DBID
--------- ----------
lkdb   1460399894

[
[email protected]
u01]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Jul 16 15:42:21 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

相關推薦

Oracle RMAN恢復歸檔RMAN-07518日誌挖掘使用修改dbid步驟

Recovery Manager: Release 11.2.0.4.0 - Production on Sat Jul 16 15:35:06 2016 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

oracle 12c RMAN恢復還原RAC叢集(ASM)為單例項庫(檔案系統)記錄

CONFIGURE CONTROLFILE AUTOBACKUP ON備份集準備 backup database format '/home/databak/whole_%d_%U'; backup spfile format '/home/databak/spfile_%

Oracle 單例項 遷移到 RAC 例項 -- 使用RMAN 恢復

Oracle 官網有關單例項遷移到RAC的一個步驟說明: How to Convert 10g Single-Instance database to 10g RAC using Manua

RMAN恢復資料庫

      RMAN> list backup;   RMAN-00571: ===========================================================   RMAN-00569: =============== ERROR MESSAGE STACK FOL

ORACLE 11G 中採用rman備份恢復資料庫詳細過程

場景:        有一個生產庫的使用者下面所有的表都不見了,懷疑人為被刪除了,現在需要用備份去恢復下,找出原來的表,線上是oracle dataguard環境,有全庫備份檔案,準備去測試庫恢復一下。1,從生產庫上copy好全備份檔案恢復資料庫需要準備的檔案:rman完整備

ORACLE 只有rman 完整備份恢復

恢復資料庫需要準備的檔案:rman完整備份(包括資料檔案、日誌檔案、控制檔案、引數檔案),記錄源資料庫的DBID 一、安裝資料庫ORACLE資料庫軟體並建立跟源資料庫同名和資料庫SID並修改資料庫DBID跟源資料庫DBID一樣,建立跟源資料庫伺服器相同的資料檔案目錄、日誌檔

Rman備份恢復

最後更新時間:2018/12/29 前置條件 已準備一臺安裝好Centos6+oracle11gr2 軟體的伺服器; 只安裝了 oracle 資料庫軟體,需要手工建立以下目錄: #環境變數 export ORACLE_SID=orcl #由於只安裝軟體未建立資料庫所以需建立對應資料夾 mkdir -p $

rac環境rman備份恢復至單機

2、將rac環境的rman備份拷貝到單機。並就rac環境pfile copy到單機,根據單機主機資源,修改叢集引數,例項名,檔案路徑以及sga和pga等引數。修改如下: [[email protected] trace]$ more /backup/test1.ora binbin1.__db_ca

oracle 恢復 從asm到檔案系統成功例項

1.1   確實 源資料庫與目標庫版本一致  語句:select * from v$version; 源庫: 1.2   確認源資料庫名與目標庫資料庫名一致  查詢資料庫名語句:select name fromv$database; 如果不一致通過恢復spfile檔

oracle恢復參考官方文檔

ocata backups class sta eat ndb done online diff How to use Rman Duplicate on ASM/RAC/OMF/Single Instance (Doc ID 840647.1) How to perfo

oracle恢復測試

(一)問題背景 最近在生產環境中,開發人員誤操作,使用truncate將oracle資料庫某個表的資料全部刪除了,在刪除之後,開發人員發現自己闖禍了,於是聯絡值班的DBA進行緊急資料恢復。 經過分析,表被truncate後,使用一般的閃回表、閃回查詢、閃回事物等方法,是不可能將資料找回來的,可以使用閃回資料庫

NBU 恢復 SQL Server

nbu7 netbackup7 備份 sql server ms-sql 異機恢復創建SQL恢復腳本在SQL Server服務器上打開NBU SQL Client選擇Restore SQL Server Objects3、SQL HOST寫本機4、選擇需要還原的庫,並保存腳本創建SQL恢復策略1、類型選擇MS

RAC+ADG 恢復報錯-ORA-16072

orm port tran sql tin ict 可用 protect store 1、環境描述11g RAC+ADG 最大可用模式 2、異機恢復告警日誌報錯如下:ORA-16072: a minimum of one standby database destinati

VirtualBox虛擬網絡設置四種方式

總結 virtual 上網 模式 頁面 進行 虛擬機上網 conf ans VirtualBox的提供了四種網絡接入模式,它們分別是: 1、NAT 網絡地址轉換模式(NAT,Network Address Translation) 2、Bridged Adap

Oracle & MySQL 老司機說我們要使用延遲復制

oracle & mysql 老司機說我們要使用(延遲復制)最近工作中又遇到生產環境數據庫的表被刪除的情況,其實這樣的事情本不該發生。幾個小建議:生產環境數據庫開發人員只能有查詢權限,甚至級別低的開發根本沒權限查生產系統,類似表的刪除交給專業的DBA來操作,當然有些單位沒有所謂的DBA.專職的DBA基本都具備

python步編程之asyncio百萬並發

多核 邏輯 http響應 get 微服務框架 time time() www. 標準庫 前言:python由於GIL(全局鎖)的存在,不能發揮多核的優勢,其性能一直飽受詬病。然而在IO密集型的網絡編程裏,異步處理比同步處理能提升成百上千倍的效率,彌補了python性能方面的

Python 與下位交流字串轉化方式大小端模式

1、說在前面的話    博主這個篇部落格想要說明的是,一個將整數型別轉化成一個可用於傳輸的16進位制字串流的形式 2、具體方法   方法一: 採用python中自帶的  hex() 函式,這個函式用於簡單的轉換可以,但是用用於轉換負數的時候,就不在是我們希望的能夠按照補

oracle高版本遷移資料到低版本12c至11g方法

1.12c版本資訊:2.11g版本資訊:3.檢視12c的字符集編碼:select userenv('language') from dual;要遷移的兩個資料庫字符集編碼要保持一致。如果不一致請手工修改,修改方法另行百度。4.檢視11g資料庫字符集編碼:5.檢視12c資料庫,

全功能智慧車之PC上位藍芽遙控起步第七篇

PC上位機藍芽遙控起步: 在網上找到一個串列埠MFC程式,實現了藍芽串列埠的收發功能 開發環境:Visual Studio 2013 語言:MFC C++ 注意:開啟工程升級之後不要馬上就生成可執行程

關於oracle的基礎增刪改查操作總結共32條

① 進入資料庫: sqlplus“/as sysdba” 或者sqlplus / as sysdba 注:完整格式:  sqlplus“使用者名稱/密碼@資料庫名as sysdba” 注:請注意,sqlplus非常撇腳,沒能回刪,沒有方向鍵,等等,最好安裝一個rlwra