Oracle 11g RMAN复制数据库的测试(2)

HJJ =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myrac1.oracle.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = hjj)
    )
  )

HJJDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myrac1.oracle.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = hjjdb)
    )
  )
~
6.重启目标端监听
[grid@myrac1 admin]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-MAR-2014 00:25:16

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
[grid@myrac1 admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-MAR-2014 00:25:21

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

Starting /g01/app/grid/product/11.2.0/grid/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /g01/app/grid/product/11.2.0/grid/network/admin/listener.ora
Log messages written to /g01/app/grid/diag/tnslsnr/myrac1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myrac1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                    LISTENER
Version                  TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                05-MAR-2014 00:25:21
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level              off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File  /g01/app/grid/product/11.2.0/grid/network/admin/listener.ora
Listener Log File        /g01/app/grid/diag/tnslsnr/myrac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myrac1)(PORT=1521)))
Services Summary...
Service "myrac1.oracle.com" has 1 instance(s).
  Instance "hjjdb", status UNKNOWN, has 3 handler(s) for this service...
The command completed successfully
7.在源数据库备份DB
[oracle@myrac1 admin]$ export ORACLE_SID=orcl
[oracle@myrac1 admin]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Wed Mar 5 00:28:44 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: HJJ (DBID=2845675742)

RMAN>backup database format='/tmp/full_%s_%T_%p.bak' plus archivelog delete input;
--验证数源据库是否存在有效备份
RMAN> list backup of database;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size      Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3      Full    624.26M    DISK        00:01:12    04-MAR-14     
        BP Key: 3  Status: AVAILABLE  Compressed: NO  Tag: TAG20140304T184244
        Piece Name: /tmp/full_1_3_20140304_1.bak
  List of Datafiles in backup set 3
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1      Full 1957940    04-MAR-14 +DATA_DG/hjj/datafile/system.260.837919351
  2      Full 1957940    04-MAR-14 +DATA_DG/hjj/datafile/sysaux.261.837919391
  3      Full 1957940    04-MAR-14 +DATA_DG/hjj/datafile/undotbs1.262.837919417
  4      Full 1957940    04-MAR-14 +DATA_DG/hjj/datafile/users.264.837919457
  5      Full 1957940    04-MAR-14 +DATA_DG/hjj/datafile/tbs01.dbf
  6      Full 1957940    04-MAR-14 +DATA_DG/hjj/datafile/rman_tbs0.dbf
8.RMAN连接源数据库和目标数据库进行复制
[oracle@myrac1 admin]$ rman target sys/oracle@hjj auxiliary sys/oracle@hjjdb

Recovery Manager: Release 11.2.0.1.0 - Production on Wed Mar 5 00:32:14 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/fec8aaef7cb10e5fa363ec96f4488639.html