【RMAN】使用RMAN duplicate复制同机数据库

系统环境:  Linux x86_64 

数据库版本:10.2.0.1.0

源库:orcl

目标库:yqldb

   

步骤如下:

(1)构建辅助数据库目录结构

(2)根据源库的initorcl.ora 创建辅助数据库初始化参数文件inityqldb.ora 

(3)利用源库的密码文件创建辅助实例口令文件直接拷贝

(4)配置监听listener.ora 和 tnsnames.ora文件

(5)RMAN 备份源数据库

(6)启动辅助库至nomount 状态

(7)使用RMAN duplicate功能复制并创建目标数据库

(8)创建目标库的spfile

1)构建辅助数据库目录结构

oracle@yangDB1:/home/oracle>cd /opt/oracle/

oracle@yangDB1:/opt/oracle>mkdir yqldb_arch --创建归档地址文件目录

oracle@yangDB1:/opt/oracle>ls

10.2.0  admin  extapi  flash_recovery_area  oradata  oraInventory  pri_arch  std_arch  yqldb_arch

oracle@yangDB1:/opt/oracle>cd oradata/

oracle@yangDB1:/opt/oracle/oradata>mkdir yqldb

oracle@yangDB1:/opt/oracle/oradata>ls

orcl  yqldb

oracle@yangDB1:/opt/oracle/admin>ls

orcl

oracle@yangDB1:/opt/oracle/admin>mkdir yqldb

oracle@yangDB1:/opt/oracle/admin>ls

orcl yqldb

oracle@yangDB1:/opt/oracle/admin>cd orcl

oracle@yangDB1:/opt/oracle/admin/orcl>ls

adump  bdump  cdump  dpdump  pfile  udump

oracle@yangDB1:/opt/oracle/admin/orcl>cd ../yqldb

oracle@yangDB1:/opt/oracle/admin/yqldb>mkdir adump  bdump  cdump  dpdump  pfile  udump

oracle@yangDB1:/opt/oracle/admin/yqldb>ls

adump  bdump  cdump  dpdump  pfile  udump

oracle@yangDB1:/opt/oracle/admin/yqldb>cd $ORACLE_HOME/dbs

2)根据源库的initorcl.ora 创建辅助数据库初始化参数文件inityqldb.ora 

oracle@yangDB1:/opt/oracle/10.2.0/orcl/dbs>cp init.ora  inityqldb.ora

oracle@yangDB1:/opt/oracle/10.2.0/orcl/dbs>vim inityqldb.ora 

orcl.__db_cache_size=889192448

orcl.__java_pool_size=16777216

orcl.__large_pool_size=16777216

orcl.__shared_pool_size=285212672

orcl.__streams_pool_size=0

*.audit_file_dest='/opt/oracle/admin/yqldb/adump'

*.background_dump_dest='/opt/oracle/admin/yqldb/bdump'

*.compatible='10.2.0.1.0'

*.control_files='/opt/oracle/oradata/yqldb/control01.ctl','/opt/oracle/oradata/yqldb/control02.ctl','/opt/oracle/ora

data/yqldb/control03.ctl'

*.core_dump_dest='/opt/oracle/admin/yqldb/cdump'

*.db_block_size=8192

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='yqldb'

*.db_recovery_file_dest='/opt/oracle/flash_recovery_area'

*.db_recovery_file_dest_size=2147483648

*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'

*.job_queue_processes=10

*.log_archive_dest_1='location=/opt/oracle/yqldb_arch'

*.open_cursors=300

*.pga_aggregate_target=402653184

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.sga_target=1210056704

*.undo_management='AUTO'

*.undo_tablespace='UNDOTBS1'

*.user_dump_dest='/opt/oracle/admin/yqldb/udump'

*.db_file_name_convert = ('/opt/oracle/oradata/orcl','/opt/oracle/oradata/yqldb')

*.log_file_name_convert = ('/opt/oracle/oradata/orcl','/opt/oracle/oradata/yqldb')

3)利用源库的密码文件创建辅助实例口令文件直接拷贝,也可以手工创建密码文件

oracle@yangDB1:/opt/oracle/10.2.0/orcl/dbs>cp orapworcl  orapwyqldb

###orapwd file=$ORACLE_HOME/dbs/orapwORACLE_SID password=XXXX

4)修改listener.ora 中的内容添加蓝色内容,建议做lsnrctl status 测试!

oracle@yangDB1:/opt/oracle/10.2.0/orcl/network/admin>vim listener.ora 

# listener.ora Network Configuration File: /opt/oracle/10.2.0/orcl/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = /opt/oracle/10.2.0/orcl)

      (PROGRAM = extproc)

    )

    (SID_DESC =

      (GLOBAL_NAME = yqldb)

      (ORACLE_HOME = /opt/oracle/10.2.0/orcl)

      (SID_NAME = yqldb)

    )

  )

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1 )(PORT = 1521))

    )

  )

5)备份源数据库。

RUN { 

allocate channel c1 type disk;

allocate channel c2 type disk;

BACKUP FORMAT '/home/oracle/backup/rman、orcl_%U_%T' skip inaccessible filesperset 5  DATABASE TAG orcl_hot_db_bk; 

sql 'alter system archive log current';

BACKUP FORMAT '/home/oracle/backup/rman、arch_%U_%T' skip inaccessible filesperset 5 ARCHIVELOG ALL DELETE INPUT; 

backup current controlfile tag='bak_ctlfile' format='/home/oracle/backup/rman/ctl_file_%U_%T';

backup spfile tag='spfile' format='/home/oracle/backup/rman/ORCL_spfile_%U_%T';

release channel c2;

release channel c1;

}

6)启动辅助库至nomount状态

oracle@yangDB1:/opt/oracle/10.2.0/orcl/dbs>export ORACLE_SID=yqldb

oracle@yangDB1:/opt/oracle/10.2.0/orcl/dbs>sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 17 18:28:17 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn /as sysdba

Connected.

SQL> startup nomount pfile=/opt/oracle/10.2.0/orcl/dbs/inityqldb.ora

ORACLE instance started.

Total System Global Area 1224736768 bytes

Fixed Size                  2020384 bytes

Variable Size             318770144 bytes

Database Buffers          889192448 bytes

Redo Buffers               14753792 bytes

SQL> exit  --一定要退出,否则后面rman duplicate时会卡住。

7)使用RMAN duplicate功能复制并创建目标数据库

oracle@yangDB1:/home/oracle>export ORACLE_SID=orcl

oracle@yangDB1:/home/oracle>rman target /         

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Aug 17 18:29:40 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: ORCL (DBID=1286259285)

RMAN> connect auxiliary sys/yang@yqldb

connected to auxiliary database: YQLDB (not mounted)

RMAN> duplicate target database to yqldb;

Starting Duplicate Db at 17-AUG-11

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=155 devtype=DISK

contents of Memory Script.:

{

   set until scn  1271492;

   set newname for datafile  1 to 

 "/opt/oracle/oradata/yqldb/system01.dbf";

   set newname for datafile  2 to 

 "/opt/oracle/oradata/yqldb/undotbs01.dbf";

   set newname for datafile  3 to 

 "/opt/oracle/oradata/yqldb/sysaux01.dbf";

   set newname for datafile  4 to 

 "/opt/oracle/oradata/yqldb/users01.dbf";

   set newname for datafile  5 to 

 "/opt/oracle/oradata/yqldb/example01.dbf";

   restore

   check readonly

   clone database;

}

executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 17-AUG-11

using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore

channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00002 to /opt/oracle/oradata/yqldb/undotbs01.dbf

restoring datafile 00004 to /opt/oracle/oradata/yqldb/users01.dbf

restoring datafile 00005 to /opt/oracle/oradata/yqldb/example01.dbf

channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/backup/rman、orcl_0fmk82fk_1_1_20110817

channel ORA_AUX_DISK_1: starting datafile backupset restore

channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /opt/oracle/oradata/yqldb/system01.dbf

restoring datafile 00003 to /opt/oracle/oradata/yqldb/sysaux01.dbf

channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/backup/rman、orcl_0emk82fk_1_1_20110817

failover to previous backup

channel ORA_AUX_DISK_1: starting datafile backupset restore

channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /opt/oracle/oradata/yqldb/system01.dbf

restoring datafile 00002 to /opt/oracle/oradata/yqldb/undotbs01.dbf

restoring datafile 00003 to /opt/oracle/oradata/yqldb/sysaux01.dbf

restoring datafile 00004 to /opt/oracle/oradata/yqldb/users01.dbf

restoring datafile 00005 to /opt/oracle/oradata/yqldb/example01.dbf

channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/backup/rman/orcl_0cmjnr7e_1_1_%S.bak

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/home/oracle/backup/rman/orcl_0cmjnr7e_1_1_%S.bak tag=TAG20110811T140638

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25

Finished restore at 17-AUG-11

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "YQLDB" RESETLOGS ARCHIVELOG 

  MAXLOGFILES     16

  MAXLOGMEMBERS      3

  MAXDATAFILES      100

  MAXINSTANCES     8

  MAXLOGHISTORY      292

 LOGFILE

  GROUP  1 ( '/opt/oracle/oradata/yqldb/redo01.log' ) SIZE 50 M  REUSE,

  GROUP  2 ( '/opt/oracle/oradata/yqldb/redo02.log' ) SIZE 50 M  REUSE,

  GROUP  3 ( '/opt/oracle/oradata/yqldb/redo03.log' ) SIZE 50 M  REUSE

 DATAFILE

  '/opt/oracle/oradata/yqldb/system01.dbf'

 CHARACTER SET ZHS16GBK

contents of Memory Script.:

{

   switch clone datafile all;

}

executing Memory Script

released channel: ORA_AUX_DISK_1

datafile 2 switched to datafile copy

input datafile copy recid=1 stamp=759436245 filename=/opt/oracle/oradata/yqldb/undotbs01.dbf

datafile 3 switched to datafile copy

input datafile copy recid=2 stamp=759436245 filename=/opt/oracle/oradata/yqldb/sysaux01.dbf

datafile 4 switched to datafile copy

input datafile copy recid=3 stamp=759436245 filename=/opt/oracle/oradata/yqldb/users01.dbf

datafile 5 switched to datafile copy

input datafile copy recid=4 stamp=759436245 filename=/opt/oracle/oradata/yqldb/example01.dbf

contents of Memory Script.:

{

   set until scn  1271492;

   recover

   clone database

    delete archivelog;

}

executing Memory Script

executing command: SET until clause

Starting recover at 17-AUG-11

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=155 devtype=DISK

starting media recovery

channel ORA_AUX_DISK_1: starting archive log restore to default destination

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=23

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=24

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=25

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=26

channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/backup/rman、arch_0jmk82gu_1_1_20110817

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/home/oracle/backup/rman、arch_0jmk82gu_1_1_20110817 tag=TAG20110817T174917

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07

channel ORA_AUX_DISK_1: starting archive log restore to default destination

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=18

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=19

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=20

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=21

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=22

channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/backup/rman、arch_0imk82gu_1_1_20110817

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/home/oracle/backup/rman、arch_0imk82gu_1_1_20110817 tag=TAG20110817T174917

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07

archive log filename=/opt/oracle/yqldb_arch/1_18_758478551.dbf thread=1 sequence=18

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_18_758478551.dbf recid=5 stamp=759436252

archive log filename=/opt/oracle/yqldb_arch/1_19_758478551.dbf thread=1 sequence=19

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_19_758478551.dbf recid=6 stamp=759436257

archive log filename=/opt/oracle/yqldb_arch/1_20_758478551.dbf thread=1 sequence=20

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_20_758478551.dbf recid=7 stamp=759436257

archive log filename=/opt/oracle/yqldb_arch/1_21_758478551.dbf thread=1 sequence=21

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_21_758478551.dbf recid=8 stamp=759436257

archive log filename=/opt/oracle/yqldb_arch/1_22_758478551.dbf thread=1 sequence=22

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_22_758478551.dbf recid=9 stamp=759436257

archive log filename=/opt/oracle/yqldb_arch/1_23_758478551.dbf thread=1 sequence=23

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_23_758478551.dbf recid=2 stamp=759436249

archive log filename=/opt/oracle/yqldb_arch/1_24_758478551.dbf thread=1 sequence=24

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_24_758478551.dbf recid=3 stamp=759436249

archive log filename=/opt/oracle/yqldb_arch/1_25_758478551.dbf thread=1 sequence=25

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_25_758478551.dbf recid=4 stamp=759436249

archive log filename=/opt/oracle/yqldb_arch/1_26_758478551.dbf thread=1 sequence=26

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_26_758478551.dbf recid=1 stamp=759436249

channel ORA_AUX_DISK_1: starting archive log restore to default destination

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=32

channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/backup/rman、arch_0lmk82he_1_1_20110817

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/home/oracle/backup/rman、arch_0lmk82he_1_1_20110817 tag=TAG20110817T174917

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01

channel ORA_AUX_DISK_1: starting archive log restore to default destination

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=27

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=28

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=29

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=30

channel ORA_AUX_DISK_1: restoring archive log

archive log thread=1 sequence=31

channel ORA_AUX_DISK_1: reading from backup piece /home/oracle/backup/rman、arch_0kmk82he_1_1_20110817

channel ORA_AUX_DISK_1: restored backup piece 1

piece handle=/home/oracle/backup/rman、arch_0kmk82he_1_1_20110817 tag=TAG20110817T174917

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07

archive log filename=/opt/oracle/yqldb_arch/1_27_758478551.dbf thread=1 sequence=27

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_27_758478551.dbf recid=15 stamp=759436273

archive log filename=/opt/oracle/yqldb_arch/1_28_758478551.dbf thread=1 sequence=28

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_28_758478551.dbf recid=13 stamp=759436273

archive log filename=/opt/oracle/yqldb_arch/1_29_758478551.dbf thread=1 sequence=29

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_29_758478551.dbf recid=14 stamp=759436273

archive log filename=/opt/oracle/yqldb_arch/1_30_758478551.dbf thread=1 sequence=30

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_30_758478551.dbf recid=12 stamp=759436272

archive log filename=/opt/oracle/yqldb_arch/1_31_758478551.dbf thread=1 sequence=31

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_31_758478551.dbf recid=11 stamp=759436269

archive log filename=/opt/oracle/yqldb_arch/1_32_758478551.dbf thread=1 sequence=32

channel clone_default: deleting archive log(s)

archive log filename=/opt/oracle/yqldb_arch/1_32_758478551.dbf recid=10 stamp=759436268

media recovery complete, elapsed time: 00:00:11

Finished recover at 17-AUG-11

contents of Memory Script.:

{

   shutdown clone;

   startup clone nomount ;

}

executing Memory Script

database dismounted

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area    1224736768 bytes

Fixed Size                     2020384 bytes

Variable Size                318770144 bytes

Database Buffers             889192448 bytes

Redo Buffers                  14753792 bytes

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "YQLDB" RESETLOGS ARCHIVELOG 

  MAXLOGFILES     16

  MAXLOGMEMBERS      3

  MAXDATAFILES      100

  MAXINSTANCES     8

  MAXLOGHISTORY      292

 LOGFILE

  GROUP  1 ( '/opt/oracle/oradata/yqldb/redo01.log' ) SIZE 50 M  REUSE,

  GROUP  2 ( '/opt/oracle/oradata/yqldb/redo02.log' ) SIZE 50 M  REUSE,

  GROUP  3 ( '/opt/oracle/oradata/yqldb/redo03.log' ) SIZE 50 M  REUSE

 DATAFILE

  '/opt/oracle/oradata/yqldb/system01.dbf'

 CHARACTER SET ZHS16GBK

contents of Memory Script.:

{

   set newname for tempfile  1 to 

 "/opt/oracle/oradata/yqldb/temp01.dbf";

   switch clone tempfile all;

   catalog clone datafilecopy  "/opt/oracle/oradata/yqldb/undotbs01.dbf";

   catalog clone datafilecopy  "/opt/oracle/oradata/yqldb/sysaux01.dbf";

   catalog clone datafilecopy  "/opt/oracle/oradata/yqldb/users01.dbf";

   catalog clone datafilecopy  "/opt/oracle/oradata/yqldb/example01.dbf";

   switch clone datafile all;

}

executing Memory Script

executing command: SET NEWNAME

renamed temporary file 1 to /opt/oracle/oradata/yqldb/temp01.dbf in control file

cataloged datafile copy

datafile copy filename=/opt/oracle/oradata/yqldb/undotbs01.dbf recid=1 stamp=759436323

cataloged datafile copy

datafile copy filename=/opt/oracle/oradata/yqldb/sysaux01.dbf recid=2 stamp=759436323

cataloged datafile copy

datafile copy filename=/opt/oracle/oradata/yqldb/users01.dbf recid=3 stamp=759436323

cataloged datafile copy

datafile copy filename=/opt/oracle/oradata/yqldb/example01.dbf recid=4 stamp=759436323

datafile 2 switched to datafile copy

input datafile copy recid=1 stamp=759436323 filename=/opt/oracle/oradata/yqldb/undotbs01.dbf

datafile 3 switched to datafile copy

input datafile copy recid=2 stamp=759436323 filename=/opt/oracle/oradata/yqldb/sysaux01.dbf

datafile 4 switched to datafile copy

input datafile copy recid=3 stamp=759436323 filename=/opt/oracle/oradata/yqldb/users01.dbf

datafile 5 switched to datafile copy

input datafile copy recid=4 stamp=759436323 filename=/opt/oracle/oradata/yqldb/example01.dbf

contents of Memory Script.:

{

   Alter clone database open resetlogs;

}

executing Memory Script

database opened

Finished Duplicate Db at 17-AUG-11

8)--创建新的spfile文件,去掉如下两个参数

#*.db_file_name_convert = ('/opt/oracle/oradata/orcl','/opt/oracle/oradata/yqldb')

#*.log_file_name_convert = ('/opt/oracle/oradata/orcl','/opt/oracle/oradata/yqldb')

数据库已经开启,进行数据验证。

oracle@yangDB1:/opt/oracle/10.2.0/orcl/dbs>export ORACLE_SID=yqldb

oracle@yangDB1:/opt/oracle/10.2.0/orcl/dbs>sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 17 18:33:23 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn sys/yang@yqldb as sysdba

Connected.

SQL> create spfile from  pfile='/opt/oracle/10.2.0/orcl/dbs/inityqldb.ora'; 

File created.

SQL> col tname for a15

SQL> col tabletype for a10

SQL> select * from tab;

TNAME           TABTYPE                CLUSTERID

--------------- --------------------- ----------

YANGB           TABLE

YANGTAB         TABLE

YANGOBJ         TABLE

YANGUSER        TABLE

OBJECTS         TABLE

A               TABLE

6 rows selected.

SQL> select instance_name from v$instance;

INSTANCE_NAME

--------------

yqldb

SQL> 

时间: 2024-12-10 15:30:37

【RMAN】使用RMAN duplicate复制同机数据库的相关文章

【RMAN】使用RMAN duplicate复制同机数据库遇到的问题

1 参数文件中的 db_name为修改 oracle@yangDB1:/home/oracle>export ORACLE_SID=orcl oracle@yangDB1:/home/oracle>rman target / Recovery Manager: Release 10.2.0.1.0 - Production on Wed Aug 17 18:25:58 2011 Copyright (c) 1982, 2005, Oracle.  All rights reserved. co

Oracle 11gR2 使用RMAN Duplicate复制数据库

Oracle 11gR2 使用RMAN Duplicate复制数据库  作者:吴伟龙 PrudentWoo QQ:286507175    前言:     上周刚做完一个项目,用户要求RAC的数据库能够自动备份到另外一个单节点上,单节点能够正常拿起来就能用.当时跟他们讨论的是用ADG来做,但通过描述后,用户觉得如果要人工干预的话太麻烦,它不想做任何的人工干预,实现数据自动到这台单机上来,那只是一台备用的数据库,没事的时候可以登录上去看看历史的数据情况.        这个时候我提出了11g的RM

基于 RMAN 的同机数据库克隆

Oracle数据库克隆,也叫着Oracle数据库复制,可以通过基于用户管理的方式来完成,也可以基于RMAN方式来实现.而且Oracle建议使用RMAN方式来实现,因为它简单易用,隐藏其复杂的逻辑,仅仅是执行一条duplicate命令就可以喝茶了.当然,前期的准备工作也是不可少滴,如创建相应的dump目录,准备参数文件,配置监听等等.本文描述了Oracle 11g下如何使用RMAN实现同机克隆数据库.   1.RMAN克隆的几种类型    a.利用RMAN备份克隆并访问目标数据库(也就是原数据库)

采用DUPLICATE 把asm数据库复制到文件系统

  题记: 可以使用rman 的duplicate命令直接把asm存储的数据库复制到文件管理的系统,本文就是基于这样的情况..... 有关rman的另外2篇文章: http://blog.itpub.net/26736162/viewspace-1223253/ http://blog.itpub.net/26736162/viewspace-1223247/   duplicate体系结构 搞点英语出来吧,英语不好的哥们就好好翻译翻译吧,这段英语是必须看懂的.... You can dupli

【RMAN】利用备份片还原数据库

[RMAN]利用备份片还原数据库 BLOG文档结构图       群里有同学说把ORACLE_BASE目录删掉了,现在只有备份片和归档文件了,试问如何恢复.坑,,,,咋能这么干,ORACLE_BASE都敢删,,试着恢复了下,并且记录下来,当然软件安装部分就不记录了. 我再说说目前的情况,只有备份片和归档文件,且从文件名称是看不出dbname和dbid的,在这种情况下其实恢复控制文件是很重要的了,但是鬼知道备份片里边是不是有控制文件的备份呢?我们可能碰到的就是这样的情况,只有备份文件,其它的什么都

使用RMAN将RAC+ASM复制到单实例+ASM上

本次试验将部署到ASM上的双节点RAC复制到单实例的ASM上. 该试验也是出自于一个项目的需求,在虚拟机上演练操作特此记录. 之前已经做过多次RMAN复制数据库,这次试验的特点是从RAC复制到单实例.需要注意的以下内容: 1,spfile参数问题RAC下的spfile参数中记录了很多和集群相关的信息,在复制时需要修改.比如*.cluster_database=truePROD2.instance_number=2PROD1.instance_number=1*.remote_listener='

【MOS】如何利用RMAN可传输表空间迁移数据库到不同字节序的平台(文档 ID 1983639.1)

如何利用 RMAN 可传输表空间迁移数据库到不同字节序的平台 (文档 ID 1983639.1) 适用于: Oracle Database - Enterprise Edition - 版本 10.1.0.2 到 12.1.0.1 [发行版 10.1 到 12.1]本文档所含信息适用于所有平台******************* 警告 ************* Document 1334152.1 Corrupt IOT when using Transportable Tablespace

基于用户管理的同机数据库克隆

      Oracle 同机数据库复制或克隆经常用于提供测试或开发环境.对于生成的克隆数据库有多种方式,如使用冷备方式进行数据库克隆(需要使用nid修改db_name),热备方式克隆数据库,rman方式克隆数据库等等.由于是同机克隆,因此目标数据库与原数据库必须位于不同的目录,其次,使用不用的数据库名称(db_name).本文主要列出使用基于用户管理的热备方式来进行数据库克隆的步骤并给出演示.   1.热备克隆步骤    a.创建目标数据库目录    b.创建目标数据库密码文件(orapwd)

【RMAN】RMAN恢复各类错误解决总结

[RMAN]RMAN恢复各类错误解决总结 第一章 RMAN恢复错误 1.1  不完全恢复错误 1.1.1  RMAN-06023 RMAN-06023 : no backup or copy of datafile found to restore 说明 RMAN 的备份信息如下:   RMAN> list backupset summary; List of Backups =============== Key     TY LV S Device Type Completion Time