RMAN恢複資料庫ORA-01861錯誤

來源:互聯網
上載者:User

在一個新環境中恢複Database Backup。在資料檔案還原階段,就出現了錯誤。

環境說明:Oracle 10.2.0.3 for solaris 10,備份資料庫是RAC,恢複則在單一實例上進行。

操作出現過程如下:

第一步,將資料庫恢複到某個時間點,恢複出錯。

RMAN> run
2> {
3> allocate channel ch01 type disk;
4> allocate channel ch02 type disk;
5> set until time "to_date('2012-06-25 23:00:00','yyyy-mm-dd hh24:mi:ss')";
6> set newname for datafile 1 to '/stor2T/app/oracle/oradata/urpdb/system01.dbf';
7> set newname for datafile 2 to '/stor2T/app/oracle/oradata/urpdb/undotbs1.dbf';
8> restore datafile 1;
9> restore datafile 2;
10> switch datafile all;
11> release channel ch01;
12> release channel ch02;
13> }

using target database control file instead of recovery catalog
allocated channel: ch01
channel ch01: sid=155 devtype=DISK

allocated channel: ch02
channel ch02: sid=156 devtype=DISK

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 27-JUN-12

released channel: ch01
released channel: ch02
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/27/2012 16:09:51
ORA-01861: literal does not match format string

我想,這可能是時間格式問題,先迴避它吧。

第二步,換成成UNTIL SCN去還原資料檔案。

RMAN> run
2> {
3> allocate channel ch01 type disk;
4> allocate channel ch02 type disk;
5> set until scn 3054150330;
6> set newname for datafile 1 to '/stor2T/app/oracle/oradata/urpdb/system01.dbf';
7> restore datafile 1;
8> switch datafile all;
9> release channel ch01;
10> release channel ch02;
11> }

allocated channel: ch01
channel ch01: sid=155 devtype=DISK

allocated channel: ch02
channel ch02: sid=156 devtype=DISK

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 27-JUN-12

released channel: ch01
released channel: ch02
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/27/2012 16:12:38
ORA-01861: literal does not match format string

RMAN>

即使使用SCN也是報錯。

第三步,檢查備份結果集,也報錯。

RMAN> list backupset summary;

using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 06/27/2012 16:29:18
ORA-01861: literal does not match format string

這下麻煩了。難道問題是出在環境變數上嗎?

檢查環境變數設定,和資料庫初始化參數設定。

env|grep NLS_DATE_FORAMT

結果顯示的已經是'yyyy-mm-dd hh24:mi:ss'格式了。

再查metalink,發現有bug

 

  • 1
  • 2
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.