RAC 資料庫恢復到單例項下並且基於時間點恢復
RAC 下基於時間點的恢復
1、源庫進行備份 我這裡進行了2次備份
2、複製2次的備份集到目標機器上,在目標機器上建立好SPFILE.
3、使用recover controlfile from 進行控制檔案恢復,這個沒什麼好說的確定好控制檔案所在備份集進行恢復就可以了。
4、重新命名進行恢復
run {
set newname for datafile '+DATA/rac/datafile/system.270.790795355' to '/home/oradba/db/rac/system.dbf';
set newname for datafile '+DATA/rac/datafile/sysaux.271.790795355' to '/home/oradba/db/rac/sysaux.dbf';
set newname for datafile '+DATA/rac/datafile/undotbs1.272.790795355' to '/home/oradba/db/rac/undotbs1.dbf';
set newname for datafile '+DATA/rac/datafile/users.273.790795355' to '/home/oradba/db/rac/users.dbf';
set newname for datafile '+DATA/rac/datafile/undotbs2.278.790795443' to '/home/oradba/db/rac/undotbs2.dbf';
restore database from tag='TAG20120921T224531';
}
完成後可以用report schema看一下
5、重命令控制檔案中記錄的檔案包括資料檔案和日誌檔案
alter database rename file '+DATA/rac/datafile/system.270.790795355' to '/home/oradba/db/rac/system.dbf';
alter database rename file '+DATA/rac/datafile/sysaux.271.790795355' to '/home/oradba/db/rac/sysaux.dbf';
alter database rename file '+DATA/rac/datafile/undotbs1.272.790795355' to '/home/oradba/db/rac/undotbs1.dbf';
alter database rename file '+DATA/rac/datafile/users.273.790795355' to '/home/oradba/db/rac/users.dbf';
alter database rename file '+DATA/rac/datafile/undotbs2.278.790795443' to '/home/oradba/db/rac/undotbs2.dbf';
alter database rename file '+DATA/rac/datafile/logfile1.dbf' to '/home/oradba/db/rac/logfile1.dbf';
...........
6、確定時間點
run {
set until time "to_date('2012-09-22 18:59:40','yyyy-mm-dd hh24:mi:ss')";
recover database;
}
7、alter database open resetlogs;
8、重建臨時表空間
SQL> create temporary tablespace temp1 tempfile '/home/oradba/db/rac/temp1.dbf' size 100m autoextend on;
Tablespace created.
SQL> alter database default temporary tablespace temp1;
Database altered.
SQL> drop tablespace temp;
Tablespace dropped.
9、刪除無用的日誌組
THREAD# STATUS ENABLED GROUPS INSTANCE
---------- ------ -------- ---------- ------------------------------------------
1 OPEN PUBLIC 2 rac
2 CLOSED PUBLIC 2 rac2
SQL> alter database disable thread 2;
Database altered.
QL> select * from v$log;
truncating (as requested) before column FIRST_CHANGE#
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRS
---------- ---------- ---------- ---------- ---------- --- ---------------- ----
1 1 3 52428800 1 YES INACTIVE 22-S
2 1 4 52428800 1 NO CURRENT 22-S
3 2 1 52428800 1 YES INACTIVE 22-S
4 2 2 52428800 1 NO INACTIVE 22-S
SQL> alter database drop logfile group 3;
Database altered.
SQL> lter database drop logfile group 4;
SP2-0734: unknown command beginning "lter datab..." - rest of line ignored.
SQL> alter database drop logfile group 4;
alter database drop logfile group 4
*
ERROR at line 1:
ORA-00350: log 4 of instance rac2 (thread 2) needs to be archived
ORA-00312: online log 4 thread 2: '/home/oradba/db/rac/redo4.log'
SQL> alter database clear unarchived logfile group 4;
Database altered.
SQL>
SQL> alter database drop logfile group 4;
Database altered.
10、刪除不用的UNDO tablespace
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> drop tablespace undotbs2 including contents and datafiles;
Tablespace dropped.
至此完成。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-744792/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rac恢復到單例項單例
- 備份與恢復:Polardb資料庫資料基於時間點恢復資料庫
- 將RAC備份集恢復為單例項資料庫單例資料庫
- oracle資料庫跨平臺(AIX)從RAC恢復至(linux)下的單例項Oracle資料庫AILinux單例
- ORACLE資料庫基於時間點的不完全恢復Oracle資料庫
- 從nub備份恢復(同平臺)恢復RAC至單例項單例
- RAC恢復到單機
- 基於percona xtrabackup之innobackupex實現基於時間點資料庫恢復資料庫
- mongodb 基於oplog的時間點恢復MongoDB
- 【資料庫資料恢復】ASM例項不能掛載的Oracle資料庫資料恢復案例資料庫資料恢復ASMOracle
- 【資料庫資料恢復】Oracle ASM例項無法掛載的資料恢復案例資料庫資料恢復OracleASM
- DM8 基於時間點的恢復
- Networker恢復oracle rac到單機Oracle
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- DM7使用DMRMAN恢復資料庫到指定時間點/LSN資料庫
- DM7 RAC資料庫恢復成單機資料庫資料庫
- PostgreSQL 時間點恢復SQL
- 【資料庫資料恢復】windows server下SqlServer資料庫的資料恢復資料庫資料恢復WindowsServerSQL
- 寶塔資料庫恢復 mysql資料庫丟失恢復 mysql資料庫刪除庫恢復 寶塔mysql資料庫恢復資料庫MySql
- 【資料庫資料恢復】linux系統下MYSQL資料庫資料恢復案例資料庫資料恢復LinuxMySql
- MySQL binlog基於時間點恢復資料失敗是什麼鬼?MySql
- 【資料庫資料恢復】SAP資料庫資料恢復案例資料庫資料恢復
- (Les16 執行資料庫恢復)-表空間恢復資料庫
- mysql資料庫恢復一例MySql資料庫
- 7.5 使用binary log 做基於時間點的恢復
- 【資料庫資料恢復】透過恢復NDF檔案修復資料庫的資料恢復過程資料庫資料恢復
- mysqldump 恢復單個資料庫MySql資料庫
- 【資料庫資料恢復】SQL Server資料庫磁碟空間不足的資料恢復案例資料庫資料恢復SQLServer
- 【資料庫資料恢復】Sql Server資料庫資料恢復案例資料庫資料恢復SQLServer
- 資料庫修復資料恢復資料庫資料恢復
- 大事務導致資料庫恢復時間長資料庫
- Sybase ASE資料庫恢復,Sybase資料恢復,資料誤刪除恢復工具READSYBDEVICE資料庫資料恢復dev
- PostgreSQL啟動恢復期間,恢復到的時間線的確定SQL
- 【資料庫資料恢復】LINUX環境下ORACLE資料庫誤刪除的資料恢復資料庫資料恢復LinuxOracle
- 3.1.5.7 啟動例項、掛載資料庫並啟動完整的媒體恢復資料庫
- 【資料庫資料恢復】EXT3檔案系統下MYSQL資料庫恢復案例資料庫資料恢復MySql
- 【資料庫資料恢復】如何恢復Oracle資料庫truncate表的資料資料庫資料恢復Oracle
- 伺服器資料恢復—透過拼接資料庫碎片恢復SqlServer資料庫資料的資料恢復案例伺服器資料恢復資料庫SQLServer
- sybase資料庫恢復資料庫