Welcome 微信登录

首页 / 数据库 / MySQL / 在同一个机器上复制数据库

将IBS库复制为orcl1库。在两个库上创建密码文件: set Oracle_sid=ibsorapwd file=F:BBCLDBORCL1PWDibs1.ora password=system entries=30set oracle_sid=orcl1orapwd file=F:BBCLDBORCL1PWDorcl1.ora password=system entries=30创建一个新的服务oradim -NEW -SID orcl1修改主库、辅助数据库的监听 tnsname.ora文件IBS 的参数文件:ibs.__db_cache_size=18253611008
ibs.__java_pool_size=134217728
ibs.__large_pool_size=134217728
ibs.__oracle_base="e:appAdministrator"#ORACLE_BASE set from environment
ibs.__pga_aggregate_target=15971909632
ibs.__sga_target=22951231488
ibs.__shared_io_pool_size=0
ibs.__shared_pool_size=4026531840
ibs.__streams_pool_size=134217728
*.audit_file_dest="e:appAdministratoradminIBSadump"
*.audit_trail="db"
*.compatible="11.2.0.0.0"
*.control_files="F:BBCLDBIBSIBScontrol01.ctl","e:appAdministratorflash_recovery_areaIBScontrol02.ctl"
*.db_block_size=8192
*.db_domain=""
*.db_name="IBS"
*.db_recovery_file_dest="e:appAdministratorflash_recovery_area"
*.db_recovery_file_dest_size=536870912000
*.diagnostic_dest="e:appAdministrator"
*.dispatchers="(PROTOCOL=TCP) (SERVICE=IBSXDB)"
*.memory_target=8848692224
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile="EXCLUSIVE"
*.undo_tablespace="UNDOTBS1"
*.log_archive_format="ARC%S_%R.%T"
*.log_file_name_convert="F:BBCLDBIBSIBS","F:BBCLDBORCL1"
*.db_file_name_convert="F:BBCLDBIBSIBS","F:BBCLDBORCL1"orcl1的参数文件:orcl1.__db_cache_size=25769803776
orcl1.__java_pool_size=134217728
orcl1.__large_pool_size=134217728
orcl1.__oracle_base="e:appAdministrator"#ORACLE_BASE set from environment
orcl1.__pga_aggregate_target=31406948352
orcl1.__sga_target=30467424256
orcl1.__shared_io_pool_size=0
orcl1.__shared_pool_size=3758096384
orcl1.__streams_pool_size=268435456
*.audit_file_dest="e:appAdministratoradminORCL1adump"
*.audit_trail="db"
*.compatible="11.2.0.0.0"
*.control_files="e:appAdministratororadataORCL1control01.ctl","e:appAdministratorflash_recovery_areaORCL1control02.ctl"
*.db_block_size=8192
*.db_domain=""
*.db_name="ORCL1"
*.db_recovery_file_dest="e:appAdministratorflash_recovery_area"
*.db_recovery_file_dest_size=4102029312
*.diagnostic_dest="e:appAdministrator"
*.dispatchers="(PROTOCOL=TCP) (SERVICE=ORCL1XDB)"
*.memory_target=9842915328
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile="EXCLUSIVE"
*.sec_case_sensitive_logon=FALSE
*.undo_tablespace="UNDOTBS1"
*.log_archive_format="ARC%S_%R.%T"
*.log_file_name_convert="F:BBCLDBIBSIBS","F:BBCLDBORCL1"
*.db_file_name_convert="F:BBCLDBIBSIBS","F:BBCLDBORCL1"两个文件中主要是这三行要加上。set oracle_sid=ibsC:UsersAdministrator>rman target sys/system auxiliary sys/system@orcl1Recovery Manager: Release 11.2.0.1.0 - Production on Fri Dec 30 18:09:41 2011Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.connected to target database: IBS (DBID=623540487)
connected to auxiliary database: ORCL1 (not mounted)RMAN> DUPLICATE TARGET DATABASE TO orcl1 from active database nofilenamecheck;Starting Duplicate Db at 30-DEC-11
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=201 device type=DISKcontents of Memory Script:
{
   sql clone "alter system set  db_name =
 ""IBS"" comment=
 ""Modified by RMAN duplicate"" scope=spfile";
   sql clone "alter system set  db_unique_name =
 ""ORCL1"" comment=
 ""Modified by RMAN duplicate"" scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   backup as copy current controlfile auxiliary format  "E:APPADMINISTRATOROR
ADATAORCL1CONTROL01.CTL";
   restore clone controlfile to  "E:APPADMINISTRATORFLASH_RECOVERY_AREAORCL1
CONTROL02.CTL" from
 "E:APPADMINISTRATORORADATAORCL1CONTROL01.CTL";
   alter clone database mount;
}
executing Memory Scriptsql statement: alter system set  db_name =  ""IBS"" comment= ""Modified by RMAN
duplicate"" scope=spfilesql statement: alter system set  db_unique_name =  ""ORCL1"" comment= ""Modified
 by RMAN duplicate"" scope=spfileOracle instance shut downOracle instance startedTotal System Global Area    9820950528 bytesFixed Size                     2184112 bytes
Variable Size               5033167952 bytes
Database Buffers            4764729344 bytes
Redo Buffers                  20869120 bytesStarting backup at 30-DEC-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=187 device type=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=E:APPADMINISTRATORPRODUCT11.2.0DBHOME_1DATABASESNCFIBS.O
RA tag=TAG20111230T181012 RECID=1 STAMP=771271813
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 30-DEC-11Starting restore at 30-DEC-11
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=193 device type=DISKchannel ORA_AUX_DISK_1: copied control file copy
Finished restore at 30-DEC-11database mountedcontents of Memory Script:
{
   set newname for datafile  1 to
 "F:BBCLDBORCL1SYSTEM01.DBF";
   set newname for datafile  2 to
 "F:BBCLDBORCL1SYSAUX01.DBF";
   set newname for datafile  3 to
 "F:BBCLDBORCL1UNDOTBS01.DBF";
   set newname for datafile  4 to
 "F:BBCLDBORCL1USERS01.DBF";
   set newname for datafile  5 to
 "F:BBCLDBORCL1CI_DATALRG01.DBF";
   set newname for datafile  6 to
 "F:BBCLDBORCL1DATAUSR01.DBF";
   set newname for datafile  7 to
 "F:BBCLDBORCL1DATALRG01.DBF";
   set newname for datafile  8 to
 "F:BBCLDBORCL1DATASML01.DBF";
   set newname for datafile  9 to
 "F:BBCLDBORCL1INDEXLRG01.DBF";
   set newname for datafile  10 to
 "F:BBCLDBORCL1INDEXSML.DBF";
   set newname for datafile  11 to
 "F:BBCLDBORCL1DATALRG02.DBF";
   set newname for datafile  12 to
 "F:BBCLDBORCL1DATALRG03.DBF";
   set newname for datafile  13 to
 "F:BBCLDBORCL1DATALRG04.DBF";
   set newname for datafile  14 to
 "F:BBCLDBORCL1DATALRG05.DBF";
   set newname for datafile  15 to
 "F:BBCLDBORCL1DATALRG06.DBF";
   set newname for datafile  16 to
 "F:BBCLDBORCL1DATALRG07.DBF";
   set newname for datafile  17 to
 "F:BBCLDBORCL1INDEXLRG02.DBF";
   set newname for datafile  18 to
 "F:BBCLDBORCL1INDEXLRG03.DBF";
   set newname for datafile  19 to
 "F:BBCLDBORCL1INDEXLRG04.DBF";
   set newname for datafile  20 to
 "F:BBCLDBORCL1INDEXLRG05.DBF";
   set newname for datafile  21 to
 "F:BBCLDBORCL1INDEXLRG06.DBF";
   set newname for datafile  22 to
 "F:BBCLDBORCL1INDEXLRG07.DBF";
   set newname for datafile  23 to
 "F:BBCLDBORCL1DATALRG08.DBF";
   backup as copy reuse
   datafile  1 auxiliary format
 "F:BBCLDBORCL1SYSTEM01.DBF"   datafile
 2 auxiliary format
 "F:BBCLDBORCL1SYSAUX01.DBF"   datafile
 3 auxiliary format
 "F:BBCLDBORCL1UNDOTBS01.DBF"   datafile
 4 auxiliary format
 "F:BBCLDBORCL1USERS01.DBF"   datafile
 5 auxiliary format
 "F:BBCLDBORCL1CI_DATALRG01.DBF"   datafile
 6 auxiliary format
 "F:BBCLDBORCL1DATAUSR01.DBF"   datafile
 7 auxiliary format
 "F:BBCLDBORCL1DATALRG01.DBF"   datafile
 8 auxiliary format
 "F:BBCLDBORCL1DATASML01.DBF"   datafile
 9 auxiliary format
 "F:BBCLDBORCL1INDEXLRG01.DBF"   datafile
 10 auxiliary format
 "F:BBCLDBORCL1INDEXSML.DBF"   datafile
 11 auxiliary format
 "F:BBCLDBORCL1DATALRG02.DBF"   datafile
 12 auxiliary format
 "F:BBCLDBORCL1DATALRG03.DBF"   datafile
 13 auxiliary format
 "F:BBCLDBORCL1DATALRG04.DBF"   datafile
 14 auxiliary format
 "F:BBCLDBORCL1DATALRG05.DBF"   datafile
 15 auxiliary format
 "F:BBCLDBORCL1DATALRG06.DBF"   datafile
 16 auxiliary format
 "F:BBCLDBORCL1DATALRG07.DBF"   datafile
 17 auxiliary format
 "F:BBCLDBORCL1INDEXLRG02.DBF"   datafile
 18 auxiliary format
 "F:BBCLDBORCL1INDEXLRG03.DBF"   datafile
 19 auxiliary format
 "F:BBCLDBORCL1INDEXLRG04.DBF"   datafile
 20 auxiliary format
 "F:BBCLDBORCL1INDEXLRG05.DBF"   datafile
 21 auxiliary format
 "F:BBCLDBORCL1INDEXLRG06.DBF"   datafile
 22 auxiliary format
 "F:BBCLDBORCL1INDEXLRG07.DBF"   datafile
 23 auxiliary format
 "F:BBCLDBORCL1DATALRG08.DBF"   ;
   sql "alter system archive log current";
}
executing Memory Scriptexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting backup at 30-DEC-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=F:BBCLDBIBSIBSDATALRG01.DBFPL/SQL Developer 连接远程Oracle数据库Oracle 11g R2用EXP导出时报EXP-00011错误的解决相关资讯      数据库 
  • 数据库范式详解  (06/20/2014 08:59:37)
  • rman 创建catalog实验及说明  (10/07/2012 19:00:24)
  • SYSTEM用户删除后怎么重新创建和原  (09/09/2012 10:00:38)
  • 分布式数据库:dblink  (10/27/2012 15:57:32)
  • AutoMySQLBackup实现数据库定期备  (09/14/2012 08:08:02)
  • 利用dbstart和dbshut脚本自动启动  (08/21/2012 06:16:21)
本文评论 查看全部评论 (0)
表情: 姓名: 字数