【使用rman复制数据库10g--clone-1】(二)

2015-01-22 21:38:58 · 作者: · 浏览: 30
:11 2014 Copyright (c) 1982, 2007, Oracle. All rights reserved. RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-04005: error from target database: ORA-01031: insufficient privileges

这个错误是由于我的目标数据库没有密码文件造成的。
解决方法就是创建密码文件

[oracle@oracle dbs]$ orapwd file=orapwjadl10g password=oracle
****************************
[oracle@oracle dbs]$ rman target sys/oracle@jadl10g auxiliary sys/oracle@d10g
Recovery Manager: Release 10.2.0.5.0 - Production on Fri Nov 7 13:34:12 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: JADL10G (DBID=2011530396)
connected to auxiliary database: D10G (not mounted)
执行如下命令(注意必须是远程和本地的顺序):
RMAN> duplicate target database to "D10G" nofilenamecheck
2> db_file_name_convert('/u01/oracle/oradata/jadl10g/','/u01/oracle/oradata/d10g/')
3> logfile '/u01/oracle/oradata/d10g/redo01.log' size 10m,
4> '/u01/oracle/oradata/d10g/redo02.log' size 10m;

Starting Duplicate Db at 07-NOV-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=156 devtype=DISK

contents of Memory Script:
{
set until scn 556591;
set newname for datafile 1 to
"/u01/oracle/oradata/d10g/system01.dbf";
set newname for dataf
ile 2 to "/u01/oracle/oradata/d10g/undotbs01.dbf"; set newname for datafile 3 to "/u01/oracle/oradata/d10g/sysaux01.dbf"; set newname for datafile 4 to "/u01/oracle/oradata/d10g/users01.dbf"; set newname for datafile 5 to "/u01/oracle/oradata/d10g/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 07-NOV-14 using channel ORA_AUX_DISK_1 skipping datafile 1; already restored to file /u01/oracle/oradata/d10g/system01.dbf skipping datafile 2; already restored to file /u01/oracle/oradata/d10g/undotbs01.dbf skipping datafile 3; already restored to file /u01/oracle/oradata/d10g/sysaux01.dbf skipping datafile 4; already restored to file /u01/oracle/oradata/d10g/users01.dbf skipping datafile 5; already restored to file /u01/oracle/oradata/d10g/example01.dbf restore not done; all files readonly, offline, or already restored Finished restore at 07-NOV-14 sql statement: CREATE CONTROLFILE REUSE SET DATABASE "D10G" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 '/u01/oracle/oradata/d10g/redo01.log' SIZE 10 M , GROUP 2 '/u01/oracle/oradata/d10g/redo02.log' SIZE 10 M DATAFILE '/u01/oracle/oradata/d10g/system01.dbf' CHARACTER SET AL32UTF8 contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 2 switched to datafile copy input datafile copy recid=1 stamp=863013896 filename=/u01/oracle/oradata/d10g/undotbs01.dbf datafile 3 switched to dataf