Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1040523
  • 博文数量: 276
  • 博客积分: 10077
  • 博客等级: 上将
  • 技术积分: 2513
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-24 20:31
文章分类

全部博文(276)

文章存档

2020年(1)

2015年(5)

2012年(2)

2011年(6)

2010年(7)

2009年(224)

2008年(31)

我的朋友

分类: Oracle

2009-03-30 17:19:56

在备用主机创建监听、必要的目录结构、参数文件.热备主库后COPY到standby,并在standby上进行恢复.
 
+++++++++++++++++++++++++++++Standby++++++++++++++++++++++++++++++++++++++++++++++
C:\>%oracle_home%\bin\rman
Recovery Manager: Release 10.2.0.3.0 - Production on Mon Mar 30 17:06:49 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
RMAN> connect target /
connected to target database: lgx (not mounted)
RMAN> restore standby controlfile from 'P:\backup02\CTL_0MKB7QQM_1_1';
Starting restore at 30-MAR-09
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:01
output filename=P:\LGXDB\CONTROL01.CTL
output filename=P:\LGXDB\CONTROL02.CTL
output filename=P:\LGXDB\CONTROL03.CTL
Finished restore at 30-MAR-09
RMAN>  sql 'alter database mount standby database';
sql statement: alter database mount standby database
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 30-MAR-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to P:\LGXDB\SYSTEM01.DBF
restoring datafile 00002 to P:\LGXDB\UNDOTBS01.DBF
restoring datafile 00003 to P:\LGXDB\SYSAUX01.DBF
restoring datafile 00004 to P:\LGXDB\USERS01.DBF
channel ORA_DISK_1: reading from backup piece P:\BACKUP02\0KKB7QP7_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=P:\BACKUP02\0KKB7QP7_1_1 tag=TAG20090330T164943
channel ORA_DISK_1: reading from backup piece P:\BACKUP02\0KKB7QP7_2_1
channel ORA_DISK_1: restored backup piece 2
piece handle=P:\BACKUP02\0KKB7QP7_2_1 tag=TAG20090330T164943
channel ORA_DISK_1: reading from backup piece P:\BACKUP02\0KKB7QP7_3_1
channel ORA_DISK_1: restored backup piece 3
piece handle=P:\BACKUP02\0KKB7QP7_3_1 tag=TAG20090330T164943
channel ORA_DISK_1: reading from backup piece P:\BACKUP02\0KKB7QP7_4_1
channel ORA_DISK_1: restored backup piece 4
piece handle=P:\BACKUP02\0KKB7QP7_4_1 tag=TAG20090330T164943
channel ORA_DISK_1: reading from backup piece P:\BACKUP02\0KKB7QP7_5_1
channel ORA_DISK_1: restored backup piece 5
piece handle=P:\BACKUP02\0KKB7QP7_5_1 tag=TAG20090330T164943
channel ORA_DISK_1: reading from backup piece P:\BACKUP02\0KKB7QP7_6_1
channel ORA_DISK_1: restored backup piece 6
piece handle=P:\BACKUP02\0KKB7QP7_6_1 tag=TAG20090330T164943
channel ORA_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 30-MAR-09
RMAN> list backup of archivelog all;

List of Backup Sets
===================
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
1       54.20M     DISK        00:00:02     30-MAR-09
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20090330T115706
        Piece Name: P:\BACKUP02\01KB79KI_1_1
  List of Archived Logs in backup set 1
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    1       594698     30-MAR-09 606214     30-MAR-09
  1    2       606214     30-MAR-09 608310     30-MAR-09
  1    3       608310     30-MAR-09 611866     30-MAR-09
  1    4       611866     30-MAR-09 613754     30-MAR-09
  1    5       613754     30-MAR-09 613824     30-MAR-09
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4       2.50K      DISK        00:00:01     30-MAR-09
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20090330T115725
        Piece Name: P:\BACKUP02\04KB79L5_1_1
  List of Archived Logs in backup set 4
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    6       613824     30-MAR-09 613837     30-MAR-09
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
6       57.19M     DISK        00:00:01     30-MAR-09
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20090330T130625
        Piece Name: P:\BACKUP02\07KB7DMH_1_1
  List of Archived Logs in backup set 6
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    1       594698     30-MAR-09 606214     30-MAR-09
  1    2       606214     30-MAR-09 608310     30-MAR-09
  1    3       608310     30-MAR-09 611866     30-MAR-09
  1    4       611866     30-MAR-09 613754     30-MAR-09
  1    5       613754     30-MAR-09 613824     30-MAR-09
  1    6       613824     30-MAR-09 613837     30-MAR-09
  1    7       613837     30-MAR-09 616271     30-MAR-09
  1    8       616271     30-MAR-09 616338     30-MAR-09
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
9       3.00K      DISK        00:00:01     30-MAR-09
        BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: TAG20090330T130645
        Piece Name: P:\BACKUP02\0AKB7DN5_1_1
  List of Archived Logs in backup set 9
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    9       616338     30-MAR-09 616351     30-MAR-09
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
11      57.30M     DISK        00:00:02     30-MAR-09
        BP Key: 16   Status: AVAILABLE  Compressed: NO  Tag: TAG20090330T133353
        Piece Name: P:\BACKUP02\0CKB7FA1_1_1
  List of Archived Logs in backup set 11
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    1       594698     30-MAR-09 606214     30-MAR-09
  1    2       606214     30-MAR-09 608310     30-MAR-09
  1    3       608310     30-MAR-09 611866     30-MAR-09
  1    4       611866     30-MAR-09 613754     30-MAR-09
  1    5       613754     30-MAR-09 613824     30-MAR-09
  1    6       613824     30-MAR-09 613837     30-MAR-09
  1    7       613837     30-MAR-09 616271     30-MAR-09
  1    8       616271     30-MAR-09 616338     30-MAR-09
  1    9       616338     30-MAR-09 616351     30-MAR-09
  1    10      616351     30-MAR-09 616963     30-MAR-09
  1    11      616963     30-MAR-09 616967     30-MAR-09
  1    12      616967     30-MAR-09 617061     30-MAR-09
  1    13      617061     30-MAR-09 617095     30-MAR-09
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
14      2.50K      DISK        00:00:01     30-MAR-09
        BP Key: 24   Status: AVAILABLE  Compressed: NO  Tag: TAG20090330T133413
        Piece Name: P:\BACKUP02\0FKB7FAL_1_1
  List of Archived Logs in backup set 14
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    14      617095     30-MAR-09 617107     30-MAR-09
RMAN> sql 'alter database recover managed standby database disconnect from sessi
on';
sql statement: alter database recover managed standby database disconnect from s
ession
RMAN>
+++++++++++++++++++++++++++++Standby++++++++++++++++++++++++++++++++++++++++++++++
阅读(960) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~