自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle數(shù)據(jù)庫RMAN不完全恢復(fù)之基于時(shí)間恢復(fù)

數(shù)據(jù)庫 Oracle
本文我們主要介紹了Oracle數(shù)據(jù)庫RMAN不完全恢復(fù)之基于時(shí)間恢復(fù)的一個(gè)示例,通過這個(gè)示例讓我們一起來了解一下基于時(shí)間恢復(fù)的過程吧,希望能夠?qū)δ兴斋@!

Oracle數(shù)據(jù)庫RMAN不完全恢復(fù)基于時(shí)間恢復(fù)的相關(guān)知識(shí)是本文我們主要要介紹的內(nèi)容,需要注意的是RMAN不完全恢復(fù)只適用于archivelog模式,只能在mount狀態(tài)下完成?;跁r(shí)間恢復(fù)是指當(dāng)出現(xiàn)用戶錯(cuò)誤(例如誤刪除表、誤截?cái)啾恚r(shí),恢復(fù)到指定時(shí)間點(diǎn)的恢復(fù)。

示例:

模擬誤截?cái)啾韙_user。

在終端設(shè)置環(huán)境變量nls_date_format指定日期時(shí)間格式。

執(zhí)行RMAN,啟動(dòng)數(shù)據(jù)庫到mount狀態(tài)。

使用set until time命令指定要恢復(fù)到的時(shí)間點(diǎn)。

轉(zhuǎn)儲(chǔ)、恢復(fù)數(shù)據(jù)庫,并使用resetlogs選項(xiàng)打開數(shù)據(jù)庫。

--模擬誤截?cái)啾韙_user。   

 

  1. SQL> host date    
  2. 2011年 08月 29日 星期一 21:01:29 CST    
  3. SQL> truncate table t_user;    
  4. Table truncated.   

 

--在終端設(shè)置環(huán)境變量nls_date_format指定日期時(shí)間格式。   

 

  1. [oracle@localhost ~]$ export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'  

 

--恢復(fù)   

 

  1. [oracle@localhost ~]$ RMAN target sys/oracle@oralife nocatalog    
  2. RMAN> run {    
  3. 2> startup force mount;    
  4. 3> set until time='2011-08-29 21:01:00';    
  5. 4> restore database;    
  6. 5> recover database;    
  7. 6> sql 'alter database open resetlogs';    
  8. 7> }   

 

--已恢復(fù)   

 

  1. SQL> conn sys/oracle@oralife as sysdba    
  2. Connected.    
  3. SQL> select count(*) from t_user;    
  4. COUNT(*)    
  5. ----------     
  6. 2  

 

在實(shí)際環(huán)境下,應(yīng)該使用LogMiner確定誤操作時(shí)間點(diǎn)。

在執(zhí)行了不完全恢復(fù)之后,推薦刪除早期所有備份,重新備份數(shù)據(jù)庫。如:

  1. run {  
  2.  delete noprompt backup;  
  3.  delete noprompt copy;  
  4.  backup database format='/oracle/10g/oracle/RMAN/%d_%s.dbf';  
  5.  sql 'alter system archive log current';  
  6.  } 

 

以上就是Oracle數(shù)據(jù)庫RMAN不完全恢復(fù)之基于時(shí)間恢復(fù)的實(shí)例的全部內(nèi)容,本文我們就介紹到這里了,希望本次的介紹能夠?qū)δ兴斋@!

【編輯推薦】

  1. Oracle數(shù)據(jù)庫PL/SQL快捷鍵設(shè)置詳解
  2. Oracle數(shù)據(jù)庫學(xué)習(xí)筆記之表的聯(lián)合查詢
  3. 一個(gè)Oracle數(shù)據(jù)庫執(zhí)行存儲(chǔ)過程的錯(cuò)誤解決
  4. Oracle數(shù)據(jù)庫日期范圍搜索的兩種方法簡介
  5. Oracle數(shù)據(jù)庫RMAN恢復(fù)之?dāng)?shù)據(jù)文件的恢復(fù)詳解
責(zé)任編輯:趙鵬 來源: CSDN博客
相關(guān)推薦

2011-08-30 09:50:22

OracleRMAN不完全恢復(fù)基于SCN恢復(fù)

2011-08-30 10:02:18

OracleRMAN不完全恢復(fù)基于日志序列號恢復(fù)

2017-04-13 08:46:41

oracle數(shù)據(jù)挖掘

2011-08-23 11:09:36

Oraclerman恢復(fù)system表空間恢復(fù)

2011-08-29 16:41:14

OracleRMAN恢復(fù)數(shù)據(jù)文件的恢復(fù)

2011-08-29 17:00:47

Oracle數(shù)據(jù)庫RM表空間數(shù)據(jù)塊介質(zhì)

2010-03-31 10:39:40

RMANOracle

2011-08-03 18:42:21

Oracle數(shù)據(jù)庫重做日志

2011-05-18 11:19:37

Oracle優(yōu)化停機(jī)時(shí)間

2009-11-20 13:29:59

Oracle數(shù)據(jù)庫恢復(fù)

2011-02-28 13:31:17

Oracle數(shù)據(jù)庫

2011-05-26 09:36:07

Oracle數(shù)據(jù)庫Redo故障

2011-08-01 12:44:25

Oracle基于用戶管理備份與恢復(fù)

2011-03-04 14:59:16

Raidoracle數(shù)據(jù)庫

2009-04-03 10:54:49

Oracle備份恢復(fù)

2011-03-24 17:21:42

Oracle數(shù)據(jù)庫Redo故障

2011-05-11 13:25:57

Oracle數(shù)據(jù)庫后備恢復(fù)

2021-05-20 11:45:16

數(shù)據(jù)庫中間件架構(gòu)

2024-01-02 16:43:58

2021-02-09 00:46:45

區(qū)塊鏈加密貨幣工具
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號