当前位置: 首页 > DG > 正文

10G 搭建物理备库(restore、recover方式)

下面是在LINUX平台测试10G搭建物理备库,使用restore,recover的方式。

测试环境是:OS RHEL 4.8   DB   10.2.0.4

1.安装备库的ORACLE软件

建议使用clone的方式来安装备库的软件,这样不需要安装patch这些,并且clone的安  装的方式很快。见连接使用clone方式安装数据库

2.主库配置tnsnames.ora文件

增加上备库数据库的网络服务名

ORCL10GDG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.4)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl10g)
    )
  )

ORCL10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rhel4)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl10g)
    )
  )

3.修改参数文件

#修改归档与日志传输相关的参数
#这个参数用于控制DG环境中日志从那里接收与传送到到那里,后面的名字由db_unique_name来确定
www.htz.pw >alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl10g,orcl10gdg)';

System altered.
#定义本地归档的路径,VALID_FOR用于指定日志的TYPE与DB ROLE
www.htz.pw >alter system set LOG_ARCHIVE_DEST_1='LOCATION=/arch/orcl10g/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl10g';

System altered.
#定义远程日志传输位置,这个配置使用ARCH来传输,ASYNC方式传输。
www.htz.pw >alter system set LOG_ARCHIVE_DEST_2='SERVICE=orcl10gdg ARCH ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl10gdg';

System altered.
#启用路径1,这个默认就是enable
www.htz.pw >alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE;

System altered.

#配置备库接收到主库的归档日志的存放位置

www.htz.pw >alter system set standby_archive_dest='/arch/orcl10g/';

System altered.
#配置备库相关文件的管理方式,AUTO表示备库自动创建相关的文件如果存在就会覆盖。
www.htz.pw >alter system set standby_file_management=AUTO ;

System altered.

#配置FAL参数
#FAL_SERVER代表是从那里获取日志(网络服务名)。
www.htz.pw >alter system set FAL_SERVER=orcl10gdg;

System altered.
#指定归档日志传输到那里去(网络服务名),fal_server与fal_client是同时配置的
www.htz.pw >alter system set FAL_CLIENT=orcl10g;
另外一个参数db_name需要注意,所有dg中的db_name必须一致

4.配置standby日志组

#STANDBY日志组的个数日志组个数+1,
www.htz.pw >select group#,bytes/1024/1024 from v$log;

    GROUP# BYTES/1024/1024
---------- ---------------
         1              50
         2              50
         3              50

www.htz.pw >select member from v$logfile;

MEMBER
-----------------------------------------
/datafile/orcl10g/orcl10g/redo03.log
/datafile/orcl10g/orcl10g/redo02.log
/datafile/orcl10g/orcl10g/redo01.log

#standby日志文件大小不能小于普通日志文件大小
www.htz.pw >alter database add standby logfile '/datafile/orcl10g/orcl10g/standby_redo01.log' size 50m;

Database altered.

www.htz.pw >alter database add standby logfile '/datafile/orcl10g/orcl10g/standby_redo02.log' size 50m;

Database altered.

www.htz.pw >alter database add standby logfile '/datafile/orcl10g/orcl10g/standby_redo03.log' size 50m;

Database altered.

www.htz.pw >alter database add standby logfile '/datafile/orcl10g/orcl10g/standby_redo04.log' size 50m;

Database altered.

5.启动强制日志

www.htz.pw >alter database force logging;

Database altered.

6.修改目录对应关系

#配置数据文件与日志文件目录对应关系,这个参数不能在OPEN阶段修改,所以在10G中需要关库,11G中不存在
www.htz.pw >startup force mount;
ORACLE instance started.

Total System Global Area  440401920 bytes
Fixed Size                  2084552 bytes
Variable Size             125829432 bytes
Database Buffers          306184192 bytes
Redo Buffers                6303744 bytes
Database mounted.

#配置配置文件目录对象关系,如果RAW的时候不需要配置
www.htz.pw >alter system set db_file_name_convert='/datafile/orcl10g/orcl10g/', '/datafile/orcl10g/orcl10g/' scope=spfile;

System altered.
#配置日志文件目录对象文件
www.htz.pw >alter system set log_file_name_convert='/datafile/orcl10g/orcl10g/', '/datafile/orcl10g/orcl10g/' scope=spfile;

System altered.

重启数据库,创建pfile文件
www.htz.pw >startup force                                    
ORACLE instance started.

Total System Global Area  440401920 bytes
Fixed Size                  2084552 bytes
Variable Size             125829432 bytes
Database Buffers          306184192 bytes
Redo Buffers                6303744 bytes
Database mounted.
Database opened.
#创建pfile文件,用于备库修改
www.htz.pw >create pfile='/soft/backup/test.ora' from spfile;

File created.

7.备份数据库与控制文件

#全库ORACLE数据库,如果已经有全库,这里我们可以不用再备份了。
[oracle10g@rhel4 ~]$ cat rman_backup.sh
rman target / <<EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE DISK;
BACKUP
    SKIP INACCESSIBLE
    TAG hot_db_bk_level0
    FORMAT '/soft/backup/bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
BACKUP
                FORMAT '/soft/backup/ar_%s_%p_%t'
                ARCHIVELOG ALL DELETE INPUT;
BACKUP
    FORMAT '/soft/backup/sp_%s_%p_%t'
    SPFILE;
BACKUP
                FORMAT '/soft/backup/con_%s_%p_%t'
                CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
exit
EOF
#把备份放到后台运行
[oracle10g@rhel4 ~]$ chmod 777 rman_backup.sh
[oracle10g@rhel4 ~]$ nohup sh rman_backup.sh >rman_backup.log &
[1] 6928
#查看进程
[oracle10g@rhel4 ~]$ ps -ef|grep 6928
211       6928  6772  0 14:16 pts/1    00:00:00 sh rman_backup.sh
211       6929  6928  2 14:16 pts/1    00:00:00 rman target /
211       6939  6772  0 14:16 pts/1    00:00:00 grep 6928
#监控RMAN的备份日志输出
[oracle10g@rhel4 ~]$ tail -f rman_backup.log
channel ch00: finished piece 1 at 22-APR-13
piece handle=/soft/backup/con_5_1_813421015 tag=TAG20130422T141655 comment=NONE
channel ch00: backup set complete, elapsed time: 00:00:01

#备份控制文件,如果在生产环境中,建议在standby已经启动来nomount的时候再来备份控制文件,再SCP过去都可以。
RMAN> backup current controlfile for standby format '/soft/backup/stdb_cntl.bkp';

Starting backup at 22-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=153 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including standby control file in backupset
channel ORA_DISK_1: starting piece 1 at 22-APR-13
channel ORA_DISK_1: finished piece 1 at 22-APR-13
piece handle=/soft/backup/stdb_cntl.bkp tag=TAG20130422T142431 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 22-APR-13
到此主库的操作完成

由于这里我两台主机他们都是mount的WIN下面的一个共享目录到/soft所以这里我不需要传输到STANDBY主机。在传输的时候需要使用binary的方式来传输。

8.备库配置listener与tnsnames文件

#这里我们可以通过netca与netmgr等图形界面来配置,也可以手动修改相关文件来配置
[oracle10g@test ~]$ cd $ORACLE_HOME/network/admin
[oracle10g@test admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER_10G =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.4)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

SID_LIST_LISTENER_10G =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = orcl10g)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (SID_NAME = orcl10g)
    )
  )

[oracle10g@test admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ORCL10G =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.2)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl10g)
    )
  )

ORCL10GDG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.4)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl10g)
    )
  )
#启动监听
[oracle10g@test admin]$ lsnrctl start listener_10g

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 22-APR-2013 14:28:10

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener_10g.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.111.4)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.111.4)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     listener_10g
Version                   TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date                22-APR-2013 14:28:12
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener_10g.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.111.4)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl10g" has 1 instance(s).
  Instance "orcl10g", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

9.修改备库的参数文件

[oracle10g@test admin]$ export ORACLE_SID=orcl10g
#这里注意,部分参数是跟主库是不一样的
[oracle10g@test backup]$ cat test.ora
*.background_dump_dest='/u01/app/oracle/admin/orcl10g/bdump'
*.compatible='10.2.0.3.0'
*.control_files='/datafile/orcl10g/orcl10g/control01.ctl','/datafile/orcl10g/orcl10g/control02.ctl','/datafile/orcl10g/orcl10g/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/orcl10g/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='/datafile/orcl10g/orcl10g/','/datafile/orcl10g/orcl10g/'
*.db_name='orcl10g'
*.db_unique_name='orcl10gdg'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=10485760000
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcl10gXDB)'
*.fal_client='ORCL10GDG'
*.fal_server='ORCL10G'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(orcl10g,orcl10gdg)'
*.log_archive_dest_1='LOCATION=/arch/orcl10g/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl10gdg'
*.log_archive_dest_2='SERVICE=orcl10g ARCH ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl10g'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_format='%t_%s_%r.dbf'
*.log_file_name_convert='/datafile/orcl10g/orcl10g/','/datafile/orcl10g/orcl10g/'
*.open_cursors=300
*.pga_aggregate_target=146800640
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=440401920
*.standby_archive_dest='/arch/orcl10g/'
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/orcl10g/udump'

10.创建相关目录与密码文件

mkdir -p /datafile/orcl10g/orcl10g/
mkdir -p /u01/app/oracle/flash_recovery_area
mkdir -p /arch/orcl10g/
mkdir -p /u01/app/oracle/admin/orcl10g/bdump
mkdir -p /u01/app/oracle/admin/orcl10g/adump
mkdir -p /u01/app/oracle/admin/orcl10g/cdump
mkdir -p /u01/app/oracle/admin/orcl10g/udump
mkdir -p /u01/app/oracle/admin/orcl10g/dpdump
mkdir -p /u01/app/oracle/admin/orcl10g/pfile
#这里最好把源库中的密码文件CP过来就可以了
[oracle10g@test backup]$ orapwd file=$ORACLE_HOME/dbs/orapworcl10g password=oracle entries=1000 force=y

11.创建spfile文件

[oracle10g@test datafile]$ cd /soft/backup
[oracle10g@test backup]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Apr 22 14:39:37 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup nomount pfile='test.ora';
ORACLE instance started.

Total System Global Area  440401920 bytes
Fixed Size                  2084552 bytes
Variable Size             125829432 bytes
Database Buffers          306184192 bytes
Redo Buffers                6303744 bytes                                                                                                 
SQL> create spfile from pfile='/soft/backup/test.ora';

File created.

12.测试监听

SQL> !tnsping orcl10g

TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 22-APR-2013 14:41:20

Copyright (c) 1997,  2007, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.2)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl10g)))
OK (0 msec)

SQL> !tnsping orcl10gdg

TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 22-APR-2013 14:41:36

Copyright (c) 1997,  2007, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.4)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl10g)))
OK (0 msec)

[oracle10g@test backup]$ sqlplus sys/oracle@orcl10g as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Apr 22 14:46:09 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

www.htz.pw >exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle10g@test backup]$ sqlplus sys/oracle@orcl10gdg as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Apr 22 14:46:17 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

www.htz.pw >exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle10g@test backup]$

13.还原控制文件与数据库

[oracle10g@test ~]$ cd /soft/backup
[oracle10g@test backup]$ ls -lrt
total 585660
-rwxrwSrwt  1 root root 551493632 Apr 22 14:16 bk_1_1_813420969
-rwxrwSrwt  1 root root   7143424 Apr 22 14:16 bk_2_1_813421004
-rwxrwSrwt  1 root root  26753024 Apr 22 14:16 ar_3_1_813421008
-rwxrwSrwt  1 root root     98304 Apr 22 14:16 sp_4_1_813421013
-rwxrwSrwt  1 root root   7110656 Apr 22 14:16 con_5_1_813421015
-rwxrwSrwt  1 root root   7110656 Apr 22 14:24 stdb_cntl.bkp
-rwxrwSrwt  1 root root      1453 Apr 22 14:33 test.ora
RMAN> restore standby controlfile from '/soft/backup/stdb_cntl.bkp';

Starting restore at 22-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/datafile/orcl10g/orcl10g/control01.ctl
output filename=/datafile/orcl10g/orcl10g/control02.ctl
output filename=/datafile/orcl10g/orcl10g/control03.ctl
Finished restore at 22-APR-13
RMAN> sql 'alter database mount';

sql statement: alter database mount
released channel: ORA_DISK_1
#如果这个目录不一样的时候,或者文件名一致的时候,我们需要使用alter database rename '' to '';来修改
RMAN> restore database;

Starting restore at 22-APR-13
Starting implicit crosscheck backup at 22-APR-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=152 devtype=DISK
Crosschecked 5 objects
Finished implicit crosscheck backup at 22-APR-13

Starting implicit crosscheck copy at 22-APR-13
using channel ORA_DISK_1
Finished implicit crosscheck copy at 22-APR-13

searching for all files in the recovery area
cataloging files...
no files cataloged

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /datafile/orcl10g/orcl10g/system01.dbf
restoring datafile 00002 to /datafile/orcl10g/orcl10g/undotbs01.dbf
restoring datafile 00003 to /datafile/orcl10g/orcl10g/sysaux01.dbf
restoring datafile 00004 to /datafile/orcl10g/orcl10g/users01.dbf
channel ORA_DISK_1: reading from backup piece /soft/backup/bk_1_1_813420969
channel ORA_DISK_1: restored backup piece 1
piece handle=/soft/backup/bk_1_1_813420969 tag=HOT_DB_BK_LEVEL0
channel ORA_DISK_1: restore complete, elapsed time: 00:03:55
Finished restore at 22-APR-13
RMAN> recover database;

Starting recover at 22-APR-13
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=4
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=5
channel ORA_DISK_1: reading from backup piece /soft/backup/ar_3_1_813421008
channel ORA_DISK_1: restored backup piece 1
piece handle=/soft/backup/ar_3_1_813421008 tag=TAG20130422T141648
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
archive log filename=/arch/orcl10g/1_4_813418725.dbf thread=1 sequence=4
archive log filename=/arch/orcl10g/1_5_813418725.dbf thread=1 sequence=5
unable to find archive log
archive log thread=1 sequence=6
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/22/2013 15:16:11
RMAN-06054: media recovery requesting unknown log: thread 1 seq 6 lowscn 655975

#查看源库当前的log sequence
www.htz.pw >archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /arch/orcl10g/
Oldest online log sequence     4
Next log sequence to archive   6
Current log sequence           6

14.启动数据库recover模式

把standby启动recover模式
[oracle10g@test backup]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Apr 22 15:17:58 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

www.htz.pw >alter database recover managed standby database disconnect from session;

Database altered.

15.主库切换日志,看备库是否能正常运用

www.htz.pw >alter system switch logfile;

System altered.

www.htz.pw >/

System altered.

www.htz.pw >/

System altered.

www.htz.pw >/

System altered.

www.htz.pw >/

System altered.

查看standby 的alert是否正常
Clearing online log 7 of thread 0 sequence number 0
Mon Apr 22 15:20:29 2013
Errors in file /u01/app/oracle/admin/orcl10g/udump/orcl10g_rfs_6289.trc:
ORA-00313: open failed for members of log group 7 of thread 0
ORA-00312: online log 7 thread 0: '/datafile/orcl10g/orcl10g/standby_redo04.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
RFS[1]: Successfully opened standby log 4: '/datafile/orcl10g/orcl10g/standby_redo01.log'
Mon Apr 22 15:20:31 2013
Clearing online log 5 of thread 0 sequence number 0
Mon Apr 22 15:20:31 2013
Errors in file /u01/app/oracle/admin/orcl10g/bdump/orcl10g_arc0_6282.trc:
ORA-00313: open failed for members of log group 5 of thread 0
ORA-00312: online log 5 thread 0: '/datafile/orcl10g/orcl10g/standby_redo02.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Mon Apr 22 15:20:32 2013
RFS[1]: Successfully opened standby log 7: '/datafile/orcl10g/orcl10g/standby_redo04.log'
Mon Apr 22 15:20:33 2013
Clearing online log 6 of thread 0 sequence number 0
Mon Apr 22 15:20:33 2013
Errors in file /u01/app/oracle/admin/orcl10g/bdump/orcl10g_arc0_6282.trc:
ORA-00313: open failed for members of log group 6 of thread 0
ORA-00312: online log 6 thread 0: '/datafile/orcl10g/orcl10g/standby_redo03.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Mon Apr 22 15:20:36 2013
RFS[1]: Successfully opened standby log 4: '/datafile/orcl10g/orcl10g/standby_redo01.log'
Mon Apr 22 15:20:37 2013
Media Recovery Log /arch/orcl10g/1_6_813418725.dbf
Mon Apr 22 15:20:37 2013
RFS[1]: Successfully opened standby log 4: '/datafile/orcl10g/orcl10g/standby_redo01.log'
Mon Apr 22 15:20:37 2013
Media Recovery Log /arch/orcl10g/1_7_813418725.dbf
Media Recovery Log /arch/orcl10g/1_8_813418725.dbf
Media Recovery Log /arch/orcl10g/1_9_813418725.dbf
Media Recovery Waiting for thread 1 sequence 10
Mon Apr 22 15:20:38 2013
RFS[1]: Successfully opened standby log 4: '/datafile/orcl10g/orcl10g/standby_redo01.log'
Mon Apr 22 15:20:43 2013
Media Recovery Log /arch/orcl10g/1_10_813418725.dbf
Media Recovery Waiting for thread 1 sequence 11

完成正常,前面的报错,redo文件不存在,ORACLE自动创建了。但是如果在RAW环境中,我们需要手动创建的。

本文固定链接: http://www.htz.pw/2013/04/23/10g-%e6%90%ad%e5%bb%ba%e7%89%a9%e7%90%86%e5%a4%87%e5%ba%93%ef%bc%88restore%e3%80%81recover%e6%96%b9%e5%bc%8f%ef%bc%89.html | 认真就输

该日志由 huangtingzhong 于2013年04月23日发表在 DG 分类下, 通告目前不可用,你可以至底部留下评论。
原创文章转载请注明: 10G 搭建物理备库(restore、recover方式) | 认真就输
关键字: , ,