Solaris 10下遷移10G RAC (六)

space6212發表於2019-03-29

最近做了一個rac資料庫的遷移,中間涉及到很多部分內容,包括rac環境的搭建、ASM的設定、資料庫的遷移、升級等。
本文是這次遷移工作的第六部分:恢復資料庫。


恢復資料庫

備份資料庫

首先需要從原來資料庫備份,過程不說了,備份完成後將備份集傳送到本地上。

準備相關目錄並授權

由於源庫的目錄結構與當前庫不一致,為了可以正常用rman恢復,需要做一個link來保持兩邊路徑的一致性。

在其中一個節點建立如下目錄和連結(pre1):

mkdir –p /data/backup
ln -s  /backup /data/backup/tradedb

在所有節點建立相關目錄並授權:

mkdir -p /oracle/app/admin/pre/{bdump,udump,adump}

ASM中建立對應目錄

pre1上以oracle使用者執行:
bash-3.00$ export ORACLE_SID=+ASM1
bash-3.00$ asmcmd
ASMCMD> ls
DATA/
ASMCMD> cd data
ASMCMD> mkdir onlinelog
ASMCMD> mkdir archivelog
ASMCMD> mkdir datafile
ASMCMD> mkdir pfile
ASMCMD> mkdir controlfile
ASMCMD> ls
archivelog/
controlfile/
datafile/
onlinelog/
pfile/

建立密碼檔案

分別在兩個節點建立密碼檔案:

pre1:
bash-3.00$ cd $ORACLE_HOME/dbs
bash-3.00$ orapwd file=orapwprerac1 password=testpass entries=10
pre2:
bash-3.00$ cd $ORACLE_HOME/dbs
bash-3.00$ orapwd file=orapwprerac2 password=testpass entries=10

兩端密碼保持一致。

配置tnsnames檔案

在所有節點的tnsnames.ora都新增如下內容:

LISTENER_PRE2 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = vip-pre1)(PORT = 1521))
LISTENER_PRE1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = vip-pre2)(PORT = 1521))
LISTENERS_PRE =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = vip-pre1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = vip-pre2)(PORT = 1521))
  )
PRE2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = vip-pre1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pre.us.oracle.com)
      (INSTANCE_NAME = prerac2)
    )
  )
PRE1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = vip-pre2)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pre.us.oracle.com)
      (INSTANCE_NAME = prerac1)
    )
  )

建立引數檔案

首先從源庫建立一個pfile
create pfile from spfile;
然後把建立得到的pfile傳送到其中一個節點上(pre1)
bash-3.00$ sftp 172.0.2.11
Connecting to 172.0.2.11...
Password: 
sftp> get  pfile.ora
Fetching /export/home/oracle/pfile.ora to pfile.ora
sftp> exit
編輯pfile.ora,修改後的引數如下:
*.audit_file_dest='/oracle/app/admin/pre/adump'
*.background_dump_dest='/oracle/app/admin/pre/bdump'
*.cluster_database=true
*.cluster_database_instances=2
*.compatible='10.2.0.1.0'
*.control_files='+DATA/controlfile/control1','+DATA/controlfile/control2','+DATA/controlfile/control3'
*.core_dump_dest='/opt/oracle/admin/prerac/cdump'
*.db_block_size=16384
*.db_domain='us.oracle.com'
*.db_file_multiblock_read_count=16
*.db_name='tradedb'
*.global_names=TRUE
prerac1.instance_number=1
prerac2.instance_number=2
*.job_queue_processes=50
#填寫VIP地址
prerac1.local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 172.0.2.2)(PORT = 1521))'
prerac2.local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 172.0.2.4)(PORT = 1521))'
*.log_archive_dest_1='LOCATION=+DATA//archivelog'
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=5000
*.pga_aggregate_target=495630592
*.processes=300
*.remote_listener='LISTENERS_PRE'
*.remote_login_passwordfile='EXCLUSIVE'
*.session_max_open_files=20
*.sessions=335
*.sga_target=1474836480
*.streams_pool_size=50331648
prerac1.thread=1
prerac2.thread=2
*.undo_management='AUTO'
*.undo_retention=10800
prerac1.undo_tablespace='UNDOTBS1'
prerac2.undo_tablespace='UNDOTBS2'
*.user_dump_dest='/oracle/app/admin/pre/udump'
把該引數檔案放到ASM上,讓所有節點共享一個spfile
在其中一個節點上執行如下命令(prerac1)
bash-3.00$ export ORACLE_SID=prerac1
bash-3.00$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on 星期三 9 26 23:10:35 2007
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
Connected to an idle instance.
SQL> create spfile='+DATA/pfile/spfile.ora' from pfile='/export/home/oracle/pfile.ora';
File created.
在所有節點新增一個pfile,指向剛才建立的spfile
Prerac1
bash-3.00$ more initprerac1.ora 
spfile=+DATA/pfile/spfile.ora
prerac2:
bash-3.00$ more initprerac2.ora
spfile=+DATA/pfile/spfile.ora
這樣就實現了多個節點共享一個spfile了。

還原資料庫:

下面就可以正式還原資料庫了:
還原資料庫的時候需要啟動例項,並且只需要啟動一個就可以:
Ø         prerac1上啟動例項:
bash-3.00$ export ORACLE_SID=prerac1
bash-3.00$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on 星期四 9 27 00:10:17 2007
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1476395008 bytes
Fixed Size                  2030200 bytes
Variable Size             385877384 bytes
Database Buffers         1073741824 bytes
Redo Buffers               14745600 bytes
SQL> exit
Ø         RMAN還原控制檔案
bash-3.00$ export ORACLE_SID=prerac1
bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on 星期四 9 27 00:35:47 2007
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: tradedb (not mounted)
--還原控制檔案
RMAN> restore controlfile from '/data/backup/tradedb/62isntt2_1_1';
Starting restore at 27-9 -07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=316 instance=prerac1 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:17
output filename=+DATA/controlfile/control1
output filename=+DATA/controlfile/control2
output filename=+DATA/controlfile/control3
Finished restore at 27-9 -07
RMAN>      
--mount資料庫
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
Ø        修改聯機日誌路徑和名稱
退出RMAN,在sqlplus中修改聯機日誌的路徑和名稱,以免在後面的open resetlogs報錯:
具體命令如下:
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo1_1_1_1g' to  '+DATA/onlinelog/redo1_1_1.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo1_1_2_1g' to  '+DATA/onlinelog/redo1_1_2.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo1_2_1_1g' to  '+DATA/onlinelog/redo1_2_1.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo1_2_2_1g' to  '+DATA/onlinelog/redo1_2_2.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo1_3_1_1g' to  '+DATA/onlinelog/redo1_3_1.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo1_3_2_1g' to  '+DATA/onlinelog/redo1_3_2.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo1_4_1_1g' to  '+DATA/onlinelog/redo1_4_1.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo1_4_2_1g' to  '+DATA/onlinelog/redo1_4_2.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo2_1_1_1g' to  '+DATA/onlinelog/redo2_1_1.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo2_1_2_1g' to  '+DATA/onlinelog/redo2_1_2.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo2_2_1_1g' to  '+DATA/onlinelog/redo2_2_1.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo2_2_2_1g' to  '+DATA/onlinelog/redo2_2_2.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo2_3_1_1g' to  '+DATA/onlinelog/redo2_3_1.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo2_3_2_1g' to  '+DATA/onlinelog/redo2_3_2.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo2_4_1_1g' to  '+DATA/onlinelog/redo2_4_1.log';
alter database rename file '/dev/vx/rdsk/datadg/tradedb_redo2_4_2_1g' to  '+DATA/onlinelog/redo2_4_2.log';
Ø         在源資料庫中生成重新命名資料檔案的rman指令碼
SQL> SELECT 'set newname for datafile ''' || FILE_NAME ||
  2  ''' to ''+DATA/datafile/' ||lower(TABLESPACE_NAME)||
  3  row_number() over (partition by tablespace_name order by file_id)|| '.ora'';' sql
  4  FROM DBA_DATA_FILES;
SQL
------------------------------------------------------------------------------------------------------------------------
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_anhui_1' to '+DATA/datafile/anhui1.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_anhui_2' to '+DATA/datafile/anhui2.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_anhui_3' to '+DATA/datafile/anhui3.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_anhui_4' to '+DATA/datafile/anhui4.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_gpo_1_4g' to '+DATA/datafile/gpo1.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_gpo_2_4g' to '+DATA/datafile/gpo2.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_ndmain_1_4g' to '+DATA/datafile/ndmain1.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_ndmain_2_4g' to '+DATA/datafile/ndmain2.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_ndmain_3_4g' to '+DATA/datafile/ndmain3.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_sysaux_1_1g' to '+DATA/datafile/sysaux1.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_sysaux_2_1g' to '+DATA/datafile/sysaux2.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_system_1_4g' to '+DATA/datafile/system1.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_1_4g' to '+DATA/datafile/undotbs11.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_2_4g' to '+DATA/datafile/undotbs12.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_3_4g' to '+DATA/datafile/undotbs13.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_4_4g' to '+DATA/datafile/undotbs14.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_5_4g' to '+DATA/datafile/undotbs15.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_1_4g' to '+DATA/datafile/undotbs21.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_2_4g' to '+DATA/datafile/undotbs22.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_3_4g' to '+DATA/datafile/undotbs23.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_4_4g' to '+DATA/datafile/undotbs24.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_5_4g' to '+DATA/datafile/undotbs25.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_users_1_200m' to '+DATA/datafile/users1.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_1_4g' to '+DATA/datafile/zhejiang1.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_2_4g' to '+DATA/datafile/zhejiang2.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_3_4g' to '+DATA/datafile/zhejiang3.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_4_4g' to '+DATA/datafile/zhejiang4.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_5_4g' to '+DATA/datafile/zhejiang5.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_6_4g' to '+DATA/datafile/zhejiang6.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_7_4g' to '+DATA/datafile/zhejiang7.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_8_4g' to '+DATA/datafile/zhejiang8.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_9_4g' to '+DATA/datafile/zhejiang9.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_10_4g' to '+DATA/datafile/zhejiang10.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_11_4g' to '+DATA/datafile/zhejiang11.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_12_4g' to '+DATA/datafile/zhejiang12.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_13_4g' to '+DATA/datafile/zhejiang13.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_14_4g' to '+DATA/datafile/zhejiang14.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_15_4g' to '+DATA/datafile/zhejiang15.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_16_4g' to '+DATA/datafile/zhejiang16.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_17_4g' to '+DATA/datafile/zhejiang17.ora';
set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_18_4g' to '+DATA/datafile/zhejiang18.ora';
Ø         prerac1上註冊備份資訊
由於備份的時候出了點問題,導致還原的控制檔案中沒有最新一次備份的資訊,這裡利用10g rman的新功能把最近一次備份集的資訊寫到控制檔案中,使恢復可以正常進行:
bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on 星期四 9 27 01:38:39 2007
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: TRADEDB (DBID=4181457554, not open)
RMAN> catalog start with '/data/backup/tradedb/6*';
using target database control file instead of recovery catalog
searching for all files that match the pattern /data/backup/tradedb/6*
no files found to be unknown to the database
RMAN> catalog start with '/data/backup/tradedb/6';
searching for all files that match the pattern /data/backup/tradedb/6
List of Files Unknown to the Database
=====================================
File Name: /data/backup/tradedb/61isntt1_1_1
File Name: /data/backup/tradedb/62isntt2_1_1
File Name: /data/backup/tradedb/64isnvm0_1_1
File Name: /data/backup/tradedb/65iso00i_1_1
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /data/backup/tradedb/61isntt1_1_1
File Name: /data/backup/tradedb/62isntt2_1_1
File Name: /data/backup/tradedb/64isnvm0_1_1
File Name: /data/backup/tradedb/65iso00i_1_1
Ø         正式還原
RMAN>  run
2> {
3> ALLOCATE CHANNEL c1 TYPE DISK CONNECT sys/testpass@pre1;
4> ALLOCATE CHANNEL c2 TYPE DISK CONNECT sys/testpass@pre2;
5> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_anhui_1' to '+DATA/datafile/anhui1.ora';
6> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_anhui_2' to '+DATA/datafile/anhui2.ora';
7> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_anhui_3' to '+DATA/datafile/anhui3.ora';
8> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_anhui_4' to '+DATA/datafile/anhui4.ora';
9> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_gpo_1_4g' to '+DATA/datafile/gpo1.ora';
10> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_gpo_2_4g' to '+DATA/datafile/gpo2.ora';
11> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_ndmain_1_4g' to '+DATA/datafile/ndmain1.ora';
12> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_ndmain_2_4g' to '+DATA/datafile/ndmain2.ora';
13> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_ndmain_3_4g' to '+DATA/datafile/ndmain3.ora';
14> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_sysaux_1_1g' to '+DATA/datafile/sysaux1.ora';
15> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_sysaux_2_1g' to '+DATA/datafile/sysaux2.ora';
16> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_system_1_4g' to '+DATA/datafile/system1.ora';
17> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_1_4g' to '+DATA/datafile/undotbs11.ora';
18> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_2_4g' to '+DATA/datafile/undotbs12.ora';
19> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_3_4g' to '+DATA/datafile/undotbs13.ora';
20> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_4_4g' to '+DATA/datafile/undotbs14.ora';
21> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs1_5_4g' to '+DATA/datafile/undotbs15.ora';
22> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_1_4g' to '+DATA/datafile/undotbs21.ora';
23> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_2_4g' to '+DATA/datafile/undotbs22.ora';
24> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_3_4g' to '+DATA/datafile/undotbs23.ora';
25> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_4_4g' to '+DATA/datafile/undotbs24.ora';
26> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_undotbs2_5_4g' to '+DATA/datafile/undotbs25.ora';
27> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_users_1_200m' to '+DATA/datafile/users1.ora';
28> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_1_4g' to '+DATA/datafile/zhejiang1.ora';
29> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_2_4g' to '+DATA/datafile/zhejiang2.ora';
30> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_3_4g' to '+DATA/datafile/zhejiang3.ora';
31> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_4_4g' to '+DATA/datafile/zhejiang4.ora';
32> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_5_4g' to '+DATA/datafile/zhejiang5.ora';
33> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_6_4g' to '+DATA/datafile/zhejiang6.ora';
34> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_7_4g' to '+DATA/datafile/zhejiang7.ora';
35> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_8_4g' to '+DATA/datafile/zhejiang8.ora';
36> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_9_4g' to '+DATA/datafile/zhejiang9.ora';
37> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_10_4g' to '+DATA/datafile/zhejiang10.ora';
38> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_11_4g' to '+DATA/datafile/zhejiang11.ora';
39> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_12_4g' to '+DATA/datafile/zhejiang12.ora';
40> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_13_4g' to '+DATA/datafile/zhejiang13.ora';
41> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_14_4g' to '+DATA/datafile/zhejiang14.ora';
42> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_15_4g' to '+DATA/datafile/zhejiang15.ora';
43> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_16_4g' to '+DATA/datafile/zhejiang16.ora';
44> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_17_4g' to '+DATA/datafile/zhejiang17.ora';
45> set newname for datafile '/dev/vx/rdsk/datadg/tradedb_zhejiang_18_4g' to '+DATA/datafile/zhejiang18.ora';
46> restore database;
47> switch datafile all;
48> recover database;
49> release channel c1;
50> release channel c2;
51> }
allocated channel: c1
channel c1: sid=316 instance=prerac1 devtype=DISK
allocated channel: c2
channel c2: sid=310 instance=prerac2 devtype=DISK
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 27-9 -07
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to +DATA/datafile/undotbs11.ora
restoring datafile 00003 to +DATA/datafile/undotbs12.ora
restoring datafile 00005 to +DATA/datafile/undotbs14.ora
restoring datafile 00007 to +DATA/datafile/sysaux1.ora
restoring datafile 00008 to +DATA/datafile/undotbs21.ora
restoring datafile 00010 to +DATA/datafile/undotbs23.ora
restoring datafile 00012 to +DATA/datafile/undotbs25.ora
restoring datafile 00013 to +DATA/datafile/users1.ora
restoring datafile 00015 to +DATA/datafile/ndmain2.ora
restoring datafile 00017 to +DATA/datafile/anhui1.ora
restoring datafile 00019 to +DATA/datafile/anhui3.ora
restoring datafile 00021 to +DATA/datafile/zhejiang1.ora
restoring datafile 00023 to +DATA/datafile/zhejiang3.ora
restoring datafile 00025 to +DATA/datafile/zhejiang5.ora
restoring datafile 00027 to +DATA/datafile/zhejiang7.ora
restoring datafile 00029 to +DATA/datafile/zhejiang9.ora
restoring datafile 00031 to +DATA/datafile/zhejiang11.ora
restoring datafile 00033 to +DATA/datafile/zhejiang13.ora
restoring datafile 00035 to +DATA/datafile/zhejiang15.ora
restoring datafile 00037 to +DATA/datafile/zhejiang17.ora
restoring datafile 00040 to +DATA/datafile/gpo1.ora
channel c1: reading from backup piece /data/backup/tradedb/61isntt1_1_1
                                                                   channel c1: restored backup piece 1
piece handle=/data/backup/tradedb/61isntt1_1_1 tag=TAG20070924T093632
channel c1: restore complete, elapsed time: 02:15:44
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to +DATA/datafile/system1.ora
restoring datafile 00004 to +DATA/datafile/undotbs13.ora
restoring datafile 00006 to +DATA/datafile/undotbs15.ora
restoring datafile 00009 to +DATA/datafile/undotbs22.ora
restoring datafile 00011 to +DATA/datafile/undotbs24.ora
restoring datafile 00014 to +DATA/datafile/ndmain1.ora
restoring datafile 00016 to +DATA/datafile/ndmain3.ora
restoring datafile 00018 to +DATA/datafile/anhui2.ora
restoring datafile 00020 to +DATA/datafile/anhui4.ora
restoring datafile 00022 to +DATA/datafile/zhejiang2.ora
restoring datafile 00024 to +DATA/datafile/zhejiang4.ora
restoring datafile 00026 to +DATA/datafile/zhejiang6.ora
restoring datafile 00028 to +DATA/datafile/zhejiang8.ora
restoring datafile 00030 to +DATA/datafile/zhejiang10.ora
restoring datafile 00032 to +DATA/datafile/zhejiang12.ora
restoring datafile 00034 to +DATA/datafile/zhejiang14.ora
restoring datafile 00036 to +DATA/datafile/zhejiang16.ora
restoring datafile 00038 to +DATA/datafile/zhejiang18.ora
restoring datafile 00039 to +DATA/datafile/sysaux2.ora
restoring datafile 00041 to +DATA/datafile/gpo2.ora
channel c1: reading from backup piece /data/backup/tradedb/62isntt2_1_1
                                                           channel c1: restored backup piece 1
piece handle=/data/backup/tradedb/62isntt2_1_1 tag=TAG20070924T093632
channel c1: restore complete, elapsed time: 01:57:55
Finished restore at 27-9 -07
datafile 17 switched to datafile copy
input datafile copy recid=42 stamp=634370267 filename=+DATA/datafile/anhui1.ora
datafile 18 switched to datafile copy
input datafile copy recid=43 stamp=634370267 filename=+DATA/datafile/anhui2.ora
datafile 19 switched to datafile copy
input datafile copy recid=44 stamp=634370268 filename=+DATA/datafile/anhui3.ora
datafile 20 switched to datafile copy
input datafile copy recid=45 stamp=634370268 filename=+DATA/datafile/anhui4.ora
datafile 40 switched to datafile copy
input datafile copy recid=46 stamp=634370268 filename=+DATA/datafile/gpo1.ora
datafile 41 switched to datafile copy
input datafile copy recid=47 stamp=634370269 filename=+DATA/datafile/gpo2.ora
datafile 14 switched to datafile copy
input datafile copy recid=48 stamp=634370269 filename=+DATA/datafile/ndmain1.ora
datafile 15 switched to datafile copy
input datafile copy recid=49 stamp=634370269 filename=+DATA/datafile/ndmain2.ora
datafile 16 switched to datafile copy
input datafile copy recid=50 stamp=634370269 filename=+DATA/datafile/ndmain3.ora
da
                                                    

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/231499/viewspace-63867/,如需轉載,請註明出處,否則將追究法律責任。

相關文章