ITPub博客

首页 > 数据库 > Oracle > 11gR2利用RMAN复制整库记录

11gR2利用RMAN复制整库记录

Oracle 作者:xfhuangfu 时间:2016-01-12 14:31:03 0 删除 编辑
<p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">源端和目标端配置好</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">TNS</span><span style="font-size:16px;font-family:SimSun;">和监听(</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">11g</span><span style="font-size:16px;font-family:SimSun;">动态监听</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">sys</span><span style="font-size:16px;font-family:SimSun;">无法在</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">nomount</span><span style="font-size:16px;font-family:SimSun;">状态登入,需配置静态监听)</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@154-Oracle_Archive"><span style="font-size:16px;font-family:SimSun;">oracle@154-Oracle_Archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;admin]$&nbsp;vi&nbsp;tnsnames.ora&nbsp;</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> TESTHIS.154&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;(DESCRIPTION&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ADDRESS_LIST&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ADDRESS&nbsp;=&nbsp;(PROTOCOL&nbsp;=&nbsp;TCP)(HOST&nbsp;=&nbsp;192.168.234.154)(PORT&nbsp;=&nbsp;1521))</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CONNECT_DATA&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(SERVER&nbsp;=&nbsp;DEDICATED)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(SID&nbsp;=&nbsp;TESTHIS)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;&nbsp;</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> TESTHIS.11&nbsp;=&nbsp;</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;(DESCRIPTION&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ADDRESS_LIST&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ADDRESS&nbsp;=&nbsp;(PROTOCOL&nbsp;=&nbsp;TCP)(HOST&nbsp;=&nbsp;192.168.234.11)(PORT&nbsp;=&nbsp;1521))&nbsp;</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CONNECT_DATA&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(SERVER&nbsp;=&nbsp;DEDICATED)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(SID&nbsp;=&nbsp;testhisnew)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;)</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@154-Oracle_Archive"><span style="font-size:16px;font-family:SimSun;">oracle@154-Oracle_Archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;admin]$&nbsp;vi&nbsp;listener.ora&nbsp;</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> #&nbsp;listener.ora&nbsp;Network&nbsp;Configuration&nbsp;File:&nbsp;/opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora</span><br /> <span style="font-size:16px;font-family:SimSun;"> #&nbsp;Generated&nbsp;by&nbsp;Oracle&nbsp;configuration&nbsp;tools.</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> LISTENER&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;(DESCRIPTION_LIST&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;(DESCRIPTION&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ADDRESS&nbsp;=&nbsp;(PROTOCOL&nbsp;=&nbsp;TCP)(HOST&nbsp;=&nbsp;154-Oracle_Archive.hubs1.pu)(PORT&nbsp;=&nbsp;1521))</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;)</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> SID_LIST_LISTENER&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;(SID_LIST&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;(SID_DESC&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(SID_NAME&nbsp;=&nbsp;PLSExtProc)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ORACLE_HOME&nbsp;=&nbsp;/u01/app/oracle/product/11.2.0/dbhome_1)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(PROGRAM&nbsp;=&nbsp;extproc)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;(SID_DESC&nbsp;=</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(GLOBAL_DBNAME&nbsp;=&nbsp;testhis</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ORACLE_HOME&nbsp;=&nbsp;/u01/app/oracle/product/11.2.0/dbhome_1)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(SID_NAME&nbsp;=&nbsp;testhis)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;&nbsp;&nbsp;)</span><br /> <span style="font-size:16px;font-family:SimSun;"> &nbsp;&nbsp;)</span><br /> <!--[if !supportLineBreakNewLine]--><br /> <!--[endif]--><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">源库创建</span><span lang="EN-US"><span style="font-size:16px;font-family:SimSun;">pfile</span><o:p></o:p></span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">SQL&gt; create pfile='/home/oracle/pfile.ora' from spfile;</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">File created.</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">将源库的</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">pfile</span><span style="font-size:16px;font-family:SimSun;">、</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">listener</span><span style="font-size:16px;font-family:SimSun;">、</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">tnsname</span><span style="font-size:16px;font-family:SimSun;">、</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">orapw</span><span style="font-size:16px;font-family:SimSun;">文件传输到目标库的指定位置并加以修改</span><span lang="EN-US"><o:p></o:p></span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@154-Oracle_Archive"><span style="font-size:16px;font-family:SimSun;">oracle@154-Oracle_Archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;admin]$&nbsp;scp&nbsp;*.ora&nbsp;</span><a href="mailto:root@192.168.234.11"><span style="font-size:16px;font-family:SimSun;">root@192.168.234.11</span></a><span style="font-size:16px;font-family:SimSun;">:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin</span><br /> <a href="mailto:root@192.168.234.11"><span style="font-size:16px;font-family:SimSun;">root@192.168.234.11</span></a><span style="font-size:16px;font-family:SimSun;">'s&nbsp;password:&nbsp;</span><br /> <span style="font-size:16px;font-family:SimSun;"> listener.ora&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;100%&nbsp;&nbsp;619&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0.6KB/s&nbsp;&nbsp;&nbsp;00:00&nbsp;&nbsp;&nbsp;&nbsp;</span><br /> <span style="font-size:16px;font-family:SimSun;"> tnsnames.ora&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;100%&nbsp;&nbsp;448&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0.4KB/s&nbsp;&nbsp;&nbsp;00:00 &nbsp; &nbsp;</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@154-Oracle_Archive"><span style="font-size:16px;font-family:SimSun;">oracle@154-Oracle_Archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;~]$&nbsp;scp&nbsp;pfile.ora&nbsp;</span><a href="mailto:root@192.168.234.11"><span style="font-size:16px;font-family:SimSun;">root@192.168.234.11</span></a><span style="font-size:16px;font-family:SimSun;">:/home/oracle</span><br /> <a href="mailto:root@192.168.234.11"><span style="font-size:16px;font-family:SimSun;">root@192.168.234.11</span></a><span style="font-size:16px;font-family:SimSun;">'s&nbsp;password:&nbsp;</span><br /> <span style="font-size:16px;font-family:SimSun;"> pfile.ora&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;100%&nbsp;1018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.0KB/s&nbsp;&nbsp;&nbsp;00:00</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@154-Oracle_Archive"><span style="font-size:16px;font-family:SimSun;">oracle@154-Oracle_Archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;dbs]$&nbsp;scp&nbsp;orapwtesthis&nbsp;</span><a href="mailto:root@192.168.234.11"><span style="font-size:16px;font-family:SimSun;">root@192.168.234.11</span></a><span style="font-size:16px;font-family:SimSun;">:/home/oracle</span><br /> <a href="mailto:root@192.168.234.11"><span style="font-size:16px;font-family:SimSun;">root@192.168.234.11</span></a><span style="font-size:16px;font-family:SimSun;">'s&nbsp;password:&nbsp;</span><br /> <span style="font-size:16px;font-family:SimSun;"> Permission&nbsp;denied,&nbsp;please&nbsp;try&nbsp;again.</span><br /> <a href="mailto:root@192.168.234.11"><span style="font-size:16px;font-family:SimSun;">root@192.168.234.11</span></a><span style="font-size:16px;font-family:SimSun;">'s&nbsp;password:&nbsp;</span><br /> <span style="font-size:16px;font-family:SimSun;"> orapwtesthis&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;100%&nbsp;1536&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.5KB/s&nbsp;&nbsp;&nbsp;00:00&nbsp;</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@Oracle_archive"><span style="font-size:16px;font-family:SimSun;">oracle@Oracle_archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;~]$&nbsp;cp&nbsp;orapwtesthis&nbsp;/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwtesthisnew</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">修改</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">pfile</span><span style="font-size:16px;font-family:SimSun;">文件</span><span lang="EN-US"><o:p></o:p></span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@Oracle_archive"><span style="font-size:16px;font-family:SimSun;">oracle@Oracle_archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;~]$&nbsp;vi&nbsp;pfile.ora&nbsp;</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__db_cache_size=922746880</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__java_pool_size=33554432</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__large_pool_size=16777216</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__oracle_base='/u01/app/oracle'#ORACLE_BASE&nbsp;set&nbsp;from&nbsp;environment</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__pga_aggregate_target=1358954496</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__sga_target=2533359616</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__shared_io_pool_size=0</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__shared_pool_size=1493172224</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew.__streams_pool_size=33554432</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.audit_file_dest='/u01/app/oracle/admin/testhisnew/adump'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.audit_trail='db'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.compatible='11.2.0.0.0'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.control_files='/u01/app/oracle/oradata/testhisnew/control01.ctl','/u01/app/oracle/fast_recovery_area/testhisnew/control02.ctl'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.db_block_size=8192</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.db_domain=''</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.db_name='testhisne' &nbsp; //最长</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">8</span><span style="font-size:16px;font-family:SimSun;">个字符</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.db_recovery_file_dest_size=10737418240</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.diagnostic_dest='/u01/app/oracle'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.dispatchers='(PROTOCOL=TCP)&nbsp;(SERVICE=testhisnewXDB)'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.log_archive_dest_1='location=/u01/app/oracle/test_arch'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.memory_target=3879731200</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.open_cursors=300</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.processes=1000</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.remote_login_passwordfile='EXCLUSIVE'</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.sessions=1105</span><br /> <span style="font-size:16px;font-family:SimSun;"> *.undo_tablespace='UNDOTBS1'</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">db_file_name_convert=('/u01/app/oracle/oradata/testhis/','/u01/app/oracle/oradata/testhisnew/')</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">log_file_name_convert=('/u01/app/oracle/oradata/testhis/','/u01/app/oracle/oradata/testhisnew/')</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">创建相关目录</span><span lang="EN-US"><o:p></o:p></span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@Oracle_archive"><span style="font-size:16px;font-family:SimSun;">oracle@Oracle_archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;~]$&nbsp;mkdir&nbsp;-p&nbsp;/u01/app/oracle/admin/testhis_n/adump</span><br /> <span style="font-size:16px;font-family:SimSun;"> [</span><a href="mailto:oracle@Oracle_archive"><span style="font-size:16px;font-family:SimSun;">oracle@Oracle_archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;~]$&nbsp;mkdir&nbsp;-p&nbsp;/u01/app/oracle/oradata/testhis_n/</span><br /> <span style="font-size:16px;font-family:SimSun;"> [</span><a href="mailto:oracle@Oracle_archive"><span style="font-size:16px;font-family:SimSun;">oracle@Oracle_archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;~]$&nbsp;mkdir&nbsp;-p&nbsp;/u01/app/oracle/fast_recovery_area/testhis_n/</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">登入数据库创建</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">spfile</span><span style="font-size:16px;font-family:SimSun;">并启动实例</span><span lang="EN-US"><o:p></o:p></span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@Oracle_archive"><span style="font-size:16px;font-family:SimSun;">oracle@Oracle_archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;~]$&nbsp;echo&nbsp;$ORACLE_SID</span><br /> <span style="font-size:16px;font-family:SimSun;"> testhisnew</span><br /> <span style="font-size:16px;font-family:SimSun;"> [</span><a href="mailto:oracle@Oracle_archive"><span style="font-size:16px;font-family:SimSun;">oracle@Oracle_archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;~]$&nbsp;sqlplus&nbsp;/&nbsp;as&nbsp;sysdba</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> SQL*Plus:&nbsp;Release&nbsp;11.2.0.2.0&nbsp;Production&nbsp;on&nbsp;Tue&nbsp;Jul&nbsp;28&nbsp;16:14:04&nbsp;2015</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> Copyright&nbsp;(c)&nbsp;1982,&nbsp;2010,&nbsp;Oracle.&nbsp;&nbsp;All&nbsp;rights&nbsp;reserved.</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> Connected&nbsp;to&nbsp;an&nbsp;idle&nbsp;instance.</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> SQL&gt;&nbsp;create&nbsp;spfile&nbsp;from&nbsp;pfile='/home/oracle/pfile.ora';</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> File&nbsp;created.</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">SQL&gt; startup nomount;</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">ORACLE instance started.</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">Total System Global Area 3874926592 bytes</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">Fixed Size &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2232368 bytes</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">Variable Size &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2936016848 bytes</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">Database Buffers &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;922746880 bytes</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">Redo Buffers &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 13930496 bytes</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">源端登入两数据库,执行复制</span><span lang="EN-US"><o:p></o:p></span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">[</span><a href="mailto:oracle@154-Oracle_Archive"><span style="font-size:16px;font-family:SimSun;">oracle@154-Oracle_Archive</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;admin]$&nbsp;rman&nbsp;target&nbsp;sys/</span><a href="mailto:foghisoracle@foghis.154"><span style="font-size:16px;font-family:SimSun;">******@testhis.154</span></a><span style="font-size:16px;font-family:SimSun;">&nbsp;auxiliary&nbsp;sys/</span><a href="mailto:foghisoracle@foghis.11"><span style="font-size:16px;font-family:SimSun;">******@testhis.11</span></a><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> Recovery&nbsp;Manager:&nbsp;Release&nbsp;11.2.0.2.0&nbsp;-&nbsp;Production&nbsp;on&nbsp;Tue&nbsp;Jul&nbsp;28&nbsp;17:46:30&nbsp;2015</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> Copyright&nbsp;(c)&nbsp;1982,&nbsp;2009,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;&nbsp;All&nbsp;rights&nbsp;reserved.</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> connected&nbsp;to&nbsp;target&nbsp;database:&nbsp;TESTHIS&nbsp;(DBID=1362777844)</span><br /> <span style="font-size:16px;font-family:SimSun;"> connected&nbsp;to&nbsp;auxiliary&nbsp;database:&nbsp;TESTHISNE&nbsp;(not&nbsp;mounted)</span><br /> <br /> <span style="font-size:16px;font-family:SimSun;"> RMAN&gt;&nbsp;duplicate&nbsp;target&nbsp;database&nbsp;to&nbsp;testhisne&nbsp;from&nbsp;active&nbsp;database&nbsp;nofilenamecheck;</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">.</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">.</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">.</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">datafile 32 switched to datafile copy</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">input datafile copy RECID=31 STAMP=886273519 file name=/u01/app/oracle/oradata/testhisnew/test27.dbf</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">datafile 33 switched to datafile copy</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">input datafile copy RECID=32 STAMP=886273519 file name=/u01/app/oracle/oradata/testhisnew/testdeltable01.dbf</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">contents of Memory Script:</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">{</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp; &nbsp;Alter clone database open resetlogs;</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">}</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">executing Memory Script</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">database opened</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">Finished Duplicate Db at 28-JUL-15</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">.</span><o:p></o:p> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p> <p class="MsoNormal" align="left" style="line-height:12.6pt;background-color:white;background-position:initial initial;background-repeat:initial initial;"> <span style="font-size:16px;font-family:SimSun;">复制完成后启动关闭目标库,验证是否复制成功,并观察</span><span lang="EN-US" style="font-size:16px;font-family:SimSun;">alter</span><span style="font-size:16px;font-family:SimSun;">日志是否有报错日志,确认无误后及时做全库备份</span><span lang="EN-US"><o:p></o:p></span> </p> <p class="MsoNormal"> <span lang="EN-US" style="font-size:16px;font-family:SimSun;">&nbsp;</span> </p>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28373936/viewspace-1975309/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 分区表 总结
请登录后发表评论 登录
全部评论
Oracle DBA Oracle 12c OCM,11g OCM MySQL 5.6/5.7 OCP 13年以上IT从业经验,有丰富的数据库和开发领域经验,多年Oracle相关工作经验和java开发经验。

注册时间:2013-09-05

  • 博文量
    68
  • 访问量
    119561