学习oracle技术,每天学一点,每天进步一点

11g RMAN新特性active database duplicate 数据库异构

上一篇 / 下一篇  2008-08-01 12:32:57 / 个人分类:oracle 11g 新技术

主库:linux rh4+oracle 11.1.0.6

数据文件 /oradata/asm11g

复制到:windows 2003 server+oracle 11.1.0.6

数据文件 f:\asm11g 下

简称 主库和复制库

主库只需要复制密码文件 $ORACLE_HOME/dbs/orapwasm11g 到 windows $ORACLE_HOME/database/目录下

并且重命名为PWDasm11g.ora

现在我们做需要复制到windows 2003库的准备:

在windows 2003 server F盘上 新建asm11g 目录

oracle_base d:\app\administrator\admin 目录下新建asm11g 目录

 d:\app\administrator\admin\asm11g\目录下 新建adump,dpdump,pfile 三个目录

在F盘上 新建个 init.ora 文件 里面输入db_name=asm11g

1,复制库启动到 nomount 下

C:\Documents and Settings\复制Administrator>set oracle_sid=asm11g

C:\Documents and Settings\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Fri Aug 1 12:19:01 2008

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

Connected to an idle instance.

SQL> startup nomount pfile='f:\init.ora';ITPUB个人空间8E dM C_kr[
ORACLE instance started.

Total System Global Area  146472960 bytesITPUB个人空间]J L mlCGP
Fixed Size                  1331740 bytes
7lx+_'E4TX.s0Variable Size              92278244 bytesITPUB个人空间bl r|(H9hX
Database Buffers           50331648 bytesITPUB个人空间;YZ.V$vR8_ |9w
Redo Buffers                2531328 bytesITPUB个人空间l H$e3z[zK8bt'c
SQL> exit

 

主库开始运行以下命令开始复制:

[oracle@asm11g ~]$ rman target / auxiliarysys/abcdefg@asm11g_s

Recovery Manager: Release 11.1.0.6.0 - Production on Sun Jul 27 06:40:22 2008

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

connected to target database: ASM11G (DBID=4214158610)ITPUB个人空间!WpvD8I{Tl\S3Q
connected to auxiliary database: ASM11G (not mounted)ITPUB个人空间oh/hm!{6W_%w

RMAN> duplicate target database to 'asm11g'                                                 
/ZOF?1b ^5?C:u5i02> from active database                                                                     ITPUB个人空间pIp OqJ
3> spfile set DB_UNIQUE_NAME 'asm11g'                                                       
Q$r/i5RG`04> set control_files 'f:\asm11g\control01.ctl';                                             

Starting Duplicate Db at 27-JUL-08
'fV+D6z(^0using channel ORA_AUX_DISK_1

contents of Memory Script.:
[K:?s)L\*s0{ITPUB个人空间 JzJHAPHE:yF,g
   backup as copy reuse
U%?;xRc|0   file  '/u01/app/oracle/product/11.1.6/db_1/dbs/spfileasm11g.ora' auxiliary formatITPUB个人空间;R*_F Z5b vzT(SH.t
 'D:\APP\ADMINISTRATOR\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEASM11G.ORA'   ;ITPUB个人空间|k bp}~i
   sql clone "alter system set spfile= ''D:\APP\ADMINISTRATOR\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEASM11G.ORA''";ITPUB个人空间@h%]` J$H#cs
}ITPUB个人空间Ak.@4^eN-H"Yy
executing Memory Script

Starting backup at 27-JUL-08ITPUB个人空间HJ3_1hNOQ'A1[Y
allocated channel: ORA_DISK_1ITPUB个人空间4v D4O_D0[6o)K
channel ORA_DISK_1: SID=103 device type=DISK
+J&ZTGG2Gn0Finished backup at 27-JUL-08

sql statement: alter system set spfile= ''D:\APP\ADMINISTRATOR\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEASM11G.ORA''

contents of Memory Script.:ITPUB个人空间q9zH4B+gBcU
{ITPUB个人空间!A2O ]rO%T-]0CZ;A t
   sql clone "alter system set  db_name =
C3z2g a4W)Ka-K0 ''ASM11G'' comment=
;LtDCVZ!V G k,f0 ''duplicate'' scope=spfile";ITPUB个人空间\*Isr8ix4PO@
   sql clone "alter system set  db_unique_name =
+E fY F-At0 ''ASM11G'' comment=
?[/V"bv6GrdI0 ''duplicate'' scope=spfile";ITPUB个人空间*vK Ri)c(qt*f
   sql clone "alter system set  db_unique_name =
kf0~v%qA%U0 ''asm11g'' comment=
!n{ { EQK [t0 '''' scope=spfile";
s6m"a[M0GPyGy)[0   sql clone "alter system set  control_files =ITPUB个人空间 }7UCjB.c;_
 ''f:\asm11g\control01.ctl'' comment=
,Qb$nlg8b0 '''' scope=spfile";ITPUB个人空间&`I0Z,D(L ^+R
   shutdown clone immediate;
"za`/W s"I0   startup clone nomount ;
#Zg/Yb%?{0}
s)uA4X ]E nD2KM0executing Memory Script

sql statement: alter system set  db_name =  ''ASM11G'' comment= ''duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''ASM11G'' comment= ''duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''asm11g'' comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''f:\asm11g\control01.ctl'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
+h1?6{/B&tp&iS h0RMAN-00571: ===========================================================
,["J1t9m"G\7V#H0RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============ITPUB个人空间.SF @hl1Jo
RMAN-00571: ===========================================================ITPUB个人空间r`1B }Y5m3q#u
RMAN-03002: failure of Duplicate Db command at 07/27/2008 06:41:37ITPUB个人空间{dx9e3I+^
RMAN-03015: error occurred in stored script. Memory ScriptITPUB个人空间(G5@;^!bXXg
RMAN-04014: startup failed: ORA-48108: invalid value given for the diagnostic_dest init.ora parameter
zx7J2LA/K _0ORA-48140: the specified ADR Base directory does not exist [d:\u01\app\oracle]ITPUB个人空间kL#k,MG7w5NPKc
ORA-48187: specified directory does not existITPUB个人空间 A tcb3pr"O
OSD-00002: additional error information
;`,Lp Q7g5Tr0O/S-Error: (OS 3) The system cannot find the path specified.

这个错误是因为从主库拷贝spfileasm11g.ora 到复制库的 所以两边oracle_base 不一致 造成复制库启动不了

这个时候只需要修改相关参数为复制库的oracle_base 和修改文件转换路径参数

复制库修改参数文件如下:

C:\Documents and Settings\Administrator>set oracle_sid=asm11g

C:\Documents and Settings\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Fri Aug 1 12:26:24 2008

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

Connected to an idle instance.

SQL> create pfile from spfile;

File created.

首先创建出pfile 文件 用ue 编辑最后修改的参数文件如下:

asm11g.__db_cache_size=276824064
(V/mB_&n `;d0asm11g.__java_pool_size=4194304
X TttlTC/z0asm11g.__large_pool_size=4194304
.u0{,PvOm O0asm11g.__oracle_base='D:\app\Administrator'#ORACLE_BASE set from environment
hqn6qY*p3l0asm11g.__pga_aggregate_target=138412032
E.G G3l-i0asm11g.__sga_target=411041792ITPUB个人空间 HxV RP"{ t z5X
asm11g.__shared_io_pool_size=0ITPUB个人空间C Z^-K3NSne0\
asm11g.__shared_pool_size=121634816ITPUB个人空间9R5B(\ Y BxS6u A0J2B
asm11g.__streams_pool_size=0
X5I2ao}0E%H0*.audit_file_dest='D:\app\Administrator\admin\asm11g\adump'
o0i7b0};N x^b f'@0*.audit_trail='db'ITPUB个人空间 P/V-YXl
*.compatible='11.1.0.0.0'ITPUB个人空间'AtQTh]T2m0U OI
*.control_files='f:\asm11g\control01.ctl'
5k+[&aF;HnQ UV Z0*.db_block_size=8192
X`ZI|(o Y0*.db_create_file_dest='+data'
|,U:}FzsL0*.db_domain=''ITPUB个人空间)~,{ vMp&_$TA l v3s(X
*.db_file_name_convert='/oradata/asm11g','f:\asm11g'   # 数据文件路径转换ITPUB个人空间#?Pqj4xG"X
*.db_name='ASM11G'#duplicateITPUB个人空间 MZ Z rV g:pM
*.db_recovery_file_dest='+DATA'ITPUB个人空间)S nvq$WUNE
*.db_recovery_file_dest_size=2147483648
&mz.U;})[*TX0*.db_unique_name='asm11g'
H,i]t5`zs0*.diagnostic_dest='D:\app\Administrator'   --ORACLE_BASE
'i M2T9j-}K0*.log_archive_dest_1='location=f:\asm11g  DB_UNIQUE_NAME=asm11g'
}$N'R?6I'B j0*.log_archive_dest_2='service=standby SYNC VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'ITPUB个人空间b2k,Yl0Jx
*.log_archive_dest_state_1='ENABLE'ITPUB个人空间:O'kB0o0D bl
*.log_archive_dest_state_2='ENABLE'
z0V2e5u z(y0*.log_archive_format='%t_%s_%r.arc'ITPUB个人空间7O"M)rP l0v[
*.log_archive_max_processes=30ITPUB个人空间,Bh-z4] YA(x`+V
*.log_archive_min_succeed_dest=2ITPUB个人空间$@+q7l|:E~#L6|
*.log_file_name_convert='/oradata/asm11g','f:\asm11g'    --日志文件路径转换
#[~guHT0ef Wb0*.open_cursors=300
.F*T4y:AI0*.pga_aggregate_target=136314880ITPUB个人空间 PbWCha
*.processes=150ITPUB个人空间 {@a"Hc+{8?^i
*.remote_login_passwordfile='EXCLUSIVE'
x | Vu8DWP0*.sec_case_sensitive_logon=FALSE
z%L0j-b P*{s0*.sga_target=408944640
!['T i?2}'D9m m0*.standby_file_management='AUTO'
S2qniMc"H0*.undo_tablespace='UNDOTBS1'

修改保存后 生成spfile文件

SQL> create spfile from pfile;

File created.

复制库启动到nomount状态

SQL> startup nomount;
Q1] E_#N)tb3C0ORACLE instance started.

Total System Global Area  414306304 bytesITPUB个人空间Ul$k7q%rh
Fixed Size                  1333536 bytes
S!S&p2q w6{GI0Variable Size             130025184 bytes
2Fb7V:PKu'F9t+q0Database Buffers          276824064 bytes
D2K)Z3rJ$n$xe['t0Redo Buffers                6123520 bytesITPUB个人空间INWE8I1^;l

3Bl:j}Km4_0

主库再次运行复制命令:

[oracle@asm11g ~]$ rman target / auxiliarysys/abcdefg@asm11g_s

Recovery Manager: Release 11.1.0.6.0 - Production on Sun Jul 27 06:44:49 2008

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

connected to target database: ASM11G (DBID=4214158610)
/QF;_@g,n$`1@0connected to auxiliary database: ASM11G (not mounted)

RMAN> duplicate target database to 'asm11g'                                                 
#p.A4Is$\]02> from active database                                                                     
P#K%d(xSI0u.X]03> ;                                                                                        

Starting Duplicate Db at 27-JUL-08
}[r"l^H0using target database control file instead of recovery catalogITPUB个人空间-T`h Wb*Nu&S Z
allocated channel: ORA_AUX_DISK_1ITPUB个人空间WV0Ud4r$|
channel ORA_AUX_DISK_1: SID=152 device type=DISK

contents of Memory Script.:
Q\$G5U4|%O"| Ho0{
}e/g b&kd4l `,A0~0   set newname for datafile  1 toITPUB个人空间,h!?%b!G7Q d
 "F:\ASM11G\SYSTEM01.DBF";
,a1LOd sIW4cik`0   set newname for datafile  2 to
2K9v7e[J^Q0 "F:\ASM11G\SYSAUX01.DBF";ITPUB个人空间\!k;WIW
   set newname for datafile  3 to
I#b^0WO3nv0 "F:\ASM11G\UNDOTBS101.DBF";ITPUB个人空间6C_&ViPnj5w9pm
   set newname for datafile  4 toITPUB个人空间T+P b.}%F
 "F:\ASM11G\USERS01.DBF";ITPUB个人空间;_-q^Pu-`(e
   set newname for datafile  5 to
N+p7W| P_bm0 "F:\ASM11G\TEST01_NEW.DBF";ITPUB个人空间1RP_wy
   backup as copy reuse
z&S;n(Oy$p.n)z u&b b0   datafile  1 auxiliary format
M Yn'EZGE8h0 "F:\ASM11G\SYSTEM01.DBF"   datafile
kAx&G*`0 2 auxiliary format
&B3]Co3K&LhX0 "F:\ASM11G\SYSAUX01.DBF"   datafileITPUB个人空间 z(qhu k&l y
 3 auxiliary formatITPUB个人空间 vo0OlI&K
 "F:\ASM11G\UNDOTBS101.DBF"   datafileITPUB个人空间"C*v-d!k5TKtXr
 4 auxiliary formatITPUB个人空间%\D2u4o)r-k%u"B
 "F:\ASM11G\USERS01.DBF"   datafileITPUB个人空间Lck1|)rq \1}hl
 5 auxiliary format
(l'pFzV0 "F:\ASM11G\TEST01_NEW.DBF"   ;ITPUB个人空间s&JU?f-`
   sql 'alter system archive log current';
"Q;f r^oc6~c5U/h0}ITPUB个人空间{q_`}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 27-JUL-08
Kk1whd0VI0allocated channel: ORA_DISK_1
.P/H/M{3cdG2g%p0channel ORA_DISK_1: SID=100 device type=DISK
f&Z4Z"vW$f!A6z0channel ORA_DISK_1: starting datafile copyITPUB个人空间JS9\)MMOa
input datafile file number=00001 name=/oradata/asm11g/system01.dbf
n ^c:e[s'f7lb0output file name=F:\ASM11G\SYSTEM01.DBF tag=TAG20080727T064459 RECID=0 STAMP=0ITPUB个人空间Rh\[#a9pVX#pux
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
%x6e ZL__pm[fm0channel ORA_DISK_1: starting datafile copyITPUB个人空间'{1@]2I9~ X
input datafile file number=00003 name=/oradata/asm11g/undotbs101.dbfITPUB个人空间Ovpnd_2\
output file name=F:\ASM11G\UNDOTBS101.DBF tag=TAG20080727T064459 RECID=0 STAMP=0ITPUB个人空间/pc fin~ o3@%\\
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:16ITPUB个人空间1v*N1U O)ti"vc
channel ORA_DISK_1: starting datafile copy
)H8b A5U+O.@0input datafile file number=00002 name=/oradata/asm11g/sysaux01.dbfITPUB个人空间2n1f.Y+m lNC
output file name=F:\ASM11G\SYSAUX01.DBF tag=TAG20080727T064459 RECID=0 STAMP=0ITPUB个人空间Ji Ie0Z
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15ITPUB个人空间+x?F)x E.d?
channel ORA_DISK_1: starting datafile copyITPUB个人空间[\-OJ+B
input datafile file number=00005 name=/oradata/asm11g/test01_new.dbfITPUB个人空间!G)y-W4G!|)tw*I
output file name=F:\ASM11G\TEST01_NEW.DBF tag=TAG20080727T064459 RECID=0 STAMP=0
0` p,Z2ue(?9jc0channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
bos4`/}3x%HB)S;Q4P0channel ORA_DISK_1: starting datafile copy
EzR2\} ZS0input datafile file number=00004 name=/oradata/asm11g/users01.dbf
SDlzH8P,hZ0output file name=F:\ASM11G\USERS01.DBF tag=TAG20080727T064459 RECID=0 STAMP=0
Ee8Nyh+v$O0channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
#k)V$C?O0Finished backup at 27-JUL-08

sql statement: alter system archive log currentITPUB个人空间e$s:yBrB
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ASM11G" RESETLOGS ARCHIVELOG
P:G H H@0  MAXLOGFILES     16ITPUB个人空间"Byr#Ul[:t
  MAXLOGMEMBERS      3ITPUB个人空间5[[jz`+`6O0R
  MAXDATAFILES      100
#Ug0ci] ~9ZCkD0  MAXINSTANCES     8ITPUB个人空间G-{"| f CST o\
  MAXLOGHISTORY      292ITPUB个人空间4`(R9_JM$|~({
 LOGFILE
l ?y&}+t']0  GROUP  4 ( 'F:\ASM11G\REDO01.LOG' ) SIZE 50 M  REUSE,ITPUB个人空间S#W2S{1g5cDcI7e
  GROUP  5 ( 'F:\ASM11G\REDO02.LOG' ) SIZE 50 M  REUSE,ITPUB个人空间)_ e'Y#Y^;VP@D
  GROUP  6 ( 'F:\ASM11G\REDO03.LOG' ) SIZE 50 M  REUSE
#k.jb)M1[3P'c0 DATAFILEITPUB个人空间ttv ev VD!M
  'F:\ASM11G\SYSTEM01.DBF'
1V MC@ pYn0 CHARACTER SET WE8MSWIN1252


"uz*iR)b;Z)m0contents of Memory Script.:ITPUB个人空间-n*kQFe/l)[
{ITPUB个人空间;}X,I(L_E@$v4J
   backup as copy reuse
unO Kq&n:bE0   archivelog like  "/u01/app/oracle/archivelog/1_163_660159058.arc" auxiliary formatITPUB个人空间wxu*B"r1N
 "F:\ASM11G\1_163_660159058.ARC"   ;
7U Zl6~g_PP8m dv0   catalog clone archivelog  "F:\ASM11G\1_163_660159058.ARC";ITPUB个人空间;Xu6R!c,U6x"M l
   switch clone datafile all;
%E2Oa \LaxB0R b|0}ITPUB个人空间m ?.C l??0na
executing Memory Script

Starting backup at 27-JUL-08ITPUB个人空间4i^ gVZw
using channel ORA_DISK_1ITPUB个人空间` o1R!Q3O)r%JZ p
channel ORA_DISK_1: starting archived log copy
G$_G{jYH}0input archived log thread=1 sequence=163 RECID=220 STAMP=661157178
x"M~6s3DQ$UP0output file name=F:\ASM11G\1_163_660159058.ARC RECID=0 STAMP=0ITPUB个人空间-n"Mx`p}Q
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03
/h3~_9T0?0Finished backup at 27-JUL-08

cataloged archived logITPUB个人空间}@U4tI E
archived log file name=F:\ASM11G\1_163_660159058.ARC RECID=1 STAMP=661609914

datafile 2 switched to datafile copy
QRmTO-y,pO-rx0input datafile copy RECID=1 STAMP=661609914 file name=F:\ASM11G\SYSAUX01.DBFITPUB个人空间$fXs2qj/k!bd
datafile 3 switched to datafile copyITPUB个人空间;W No;`g4o$~"f2R
input datafile copy RECID=2 STAMP=661609914 file name=F:\ASM11G\UNDOTBS101.DBFITPUB个人空间r&wB^w+ab"~
datafile 4 switched to datafile copy
C8Ly{R Xe%Y }0input datafile copy RECID=3 STAMP=661609914 file name=F:\ASM11G\USERS01.DBF
Yg5D4bq$RA0datafile 5 switched to datafile copyITPUB个人空间+W ?%LWU)j*H.Z S
input datafile copy RECID=4 STAMP=661609914 file name=F:\ASM11G\TEST01_NEW.DBF

contents of Memory Script.:
JE]Q7|'~*`0{
s9@5oh-W N0   set until scn  615675;
!O7|Buz/m0_H0   recover
e.^aQXL$U.Shy+y0   clone databaseITPUB个人空间Y| h"J*Nuc
    delete archivelog
E;Hr(}(js0   ;
8FwL-L3H7p0}ITPUB个人空间6U@t w-Q^i-p
executing Memory Script

executing command: SET until clause

Starting recover at 27-JUL-08ITPUB个人空间'F']2Zg)L};N.C{
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 163 is already on disk as file F:\ASM11G\1_163_660159058.ARC
)\| U/])W0archived log file name=F:\ASM11G\1_163_660159058.ARC thread=1 sequence=163
iTZYYM(X0media recovery complete, elapsed time: 00:00:00ITPUB个人空间5Q"]B4K#U8H
Finished recover at 27-JUL-08

contents of Memory Script.:
x$~-XEtq)\"_;b0{ITPUB个人空间U9?E }*RS
   shutdown clone immediate;ITPUB个人空间pTp0L_ zZ
   startup clone nomount ;ITPUB个人空间"A6JT4k Jp8s
}
'ov.O^U)z+B+|?$Yk WL0executing Memory Script

database dismountedITPUB个人空间2aEZ0g#SZy
Oracle instance shut down

connected to auxiliary database (not started)ITPUB个人空间a | ^i!i&c)sT&E
Oracle instance started

Total System Global Area     414306304 bytes

Fixed Size                     1333536 bytes
V'Opv;o0Variable Size                130025184 bytes
^]k w8nw Q0Database Buffers             276824064 bytesITPUB个人空间 }'c6Y9sJ2U
Redo Buffers                   6123520 bytesITPUB个人空间3{v|nC,p4d
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ASM11G" RESETLOGS ARCHIVELOGITPUB个人空间/`4}]8]aR"}g@ r!V
  MAXLOGFILES     16
-jI8F p-O;i0^ A0  MAXLOGMEMBERS      3
a:Cpn^ gN+o0  MAXDATAFILES      100ITPUB个人空间$K$X RoX7T
  MAXINSTANCES     8
0H }p^+@ z0  MAXLOGHISTORY      292ITPUB个人空间Auw&E Iy
 LOGFILEITPUB个人空间k$W? z2L"f_6D
  GROUP  4 ( 'F:\ASM11G\REDO01.LOG' ) SIZE 50 M  REUSE,
1N+S[)sS;@l] a0  GROUP  5 ( 'F:\ASM11G\REDO02.LOG' ) SIZE 50 M  REUSE,
^5z'@4KT0  GROUP  6 ( 'F:\ASM11G\REDO03.LOG' ) SIZE 50 M  REUSE
cp Az Z#V8A:jk0 DATAFILE
;g~t [ {0  'F:\ASM11G\SYSTEM01.DBF'
T(z6_j:MA0 CHARACTER SET WE8MSWIN1252


)j f5k%_6sW4S1o0contents of Memory Script.:
i9u;NqP$O0{
s ewEu+B-E0   set newname for tempfile  2 toITPUB个人空间&hT2at H$[Ca
 "F:\ASM11G\TEMP01.DBF";ITPUB个人空间%H'`tV7g.Z_
   switch clone tempfile all;ITPUB个人空间;ead Q@J2n#J
   catalog clone datafilecopy  "F:\ASM11G\SYSAUX01.DBF";ITPUB个人空间(Y,F h,[X"~*F]
   catalog clone datafilecopy  "F:\ASM11G\UNDOTBS101.DBF";
8z7{ X!j x9Y%j:D0   catalog clone datafilecopy  "F:\ASM11G\USERS01.DBF";
Ik$x{So:bzp.]0   catalog clone datafilecopy  "F:\ASM11G\TEST01_NEW.DBF";ITPUB个人空间7g8o8reR
   switch clone datafile all;ITPUB个人空间2[4m3ZK@%D?
}
M6]J}0v\3oh0executing Memory Script

executing command: SET NEWNAME

renamed tempfile 2 to F:\ASM11G\TEMP01.DBF in control file

cataloged datafile copyITPUB个人空间hx2} [-jv3fR(W
datafile copy file name=F:\ASM11G\SYSAUX01.DBF RECID=1 STAMP=661609931

cataloged datafile copy
d3x;?HZ:y0datafile copy file name=F:\ASM11G\UNDOTBS101.DBF RECID=2 STAMP=661609931

cataloged datafile copyITPUB个人空间{2?:t } P U$F4Z
datafile copy file name=F:\ASM11G\USERS01.DBF RECID=3 STAMP=661609931

cataloged datafile copy
K G![ ~R0datafile copy file name=F:\ASM11G\TEST01_NEW.DBF RECID=4 STAMP=661609931

datafile 2 switched to datafile copy
0e._oT iq0input datafile copy RECID=1 STAMP=661609931 file name=F:\ASM11G\SYSAUX01.DBF
GCN+s1hOV(]0datafile 3 switched to datafile copy
fH5\&ab\6Y'].?Xo0input datafile copy RECID=2 STAMP=661609931 file name=F:\ASM11G\UNDOTBS101.DBFITPUB个人空间6NO3d|xH
datafile 4 switched to datafile copy
zi(R9nJg"W0input datafile copy RECID=3 STAMP=661609931 file name=F:\ASM11G\USERS01.DBFITPUB个人空间1oM:m"P1M&y
datafile 5 switched to datafile copy
Y3`:v ok?+d a:@|0input datafile copy RECID=4 STAMP=661609931 file name=F:\ASM11G\TEST01_NEW.DBF

contents of Memory Script.:
:Qb0|!S/?h/O0{ITPUB个人空间G&T,[ _;vOi&b
   Alter clone database open resetlogs;
8R DS1v3u'^&x8Gh.K0}ITPUB个人空间G9XN`J Jy
executing Memory Script

database opened
c}8N+Fw0Finished Duplicate Db at 27-JUL-08

RMAN>

这时登录复制库进行查询,可以正常使用

C:\Documents and Settings\Administrator>set oracle_sid=asm11g

C:\Documents and Settings\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Fri Aug 1 12:53:55 2008

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

ITPUB个人空间.}Ii:Yn2}O
Connected to:ITPUB个人空间 {i:p avY0n
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - ProductionITPUB个人空间iw,{rE
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select status,instance_name from v$instance;

STATUS       INSTANCE_NAME
Q,[g'Oq9iF ~O!w.{T0------------ ----------------
s5HEuWxH3|{-w%V0OPEN         asm11g

SQL> archive log list;
T#^l*R|-s0Database log mode              Archive Mode
1ME Mv.A4~"e0Automatic archival             EnabledITPUB个人空间8v"OB/Jd
Archive destination            f:\asm11gITPUB个人空间s6QD,u[5ZK l]B
Oldest online log sequence     1
#K~wo)Mf0Next log sequence to archive   2
q Sj.R Y,z4w&t.D G5c4v0Current log sequence           2
I4~6bYVRw5j/~f:v0E0SQL>
2_"C\$a&Re%w0


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-12-02  
 123456
78910111213
14151617181920
21222324252627
28293031   

数据统计

  • 访问量: 26110
  • 日志数: 312
  • 图片数: 2
  • 建立时间: 2007-12-11
  • 更新时间: 2008-11-28

RSS订阅

Open Toolbar