• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

Oracle 11gR2利用RMAN复制整库记录

mysql 搞代码 4年前 (2022-01-09) 15次浏览 已收录 0个评论

Oracle 11gR2利用RMAN复制整库记录 源端和目标端配置好TNS和监听(11g动态监听sys无法在nomount状态登入,需配置静态监听) [ora

Oracle 11gR2利用RMAN复制整库记录

源端和目标端配置好TNS和监听(11g动态监听sys无法在nomount状态登入,需配置静态监听)

[oracle@154-Oracle_Archive admin]$ vi tnsnames.ora

TESTHIS.154 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.234.154)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = TESTHIS)
)
)

TESTHIS.11 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.234.11)(PORT = 1521))
本文来源gaodai#ma#com搞*!代#%^码网% )
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = testhisnew)
)
)

[oracle@154-Oracle_Archive admin]$ vi listener.ora

# listener.ora Network Configuration File: /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 154-Oracle_Archive.hubs1.pu)(PORT = 1521))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = testhis
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = testhis)
)
)

源库创建pfile

SQL> create pfile=’/home/oracle/pfile.ora’ from spfile;

File created.

将源库的pfile、listener、tnsname、orapw文件传输到目标库的指定位置并加以修改

[oracle@154-Oracle_Archive admin]$ scp *.ora [email protected]:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
[email protected]’s password:
listener.ora 100% 619 0.6KB/s 00:00
tnsnames.ora 100% 448 0.4KB/s 00:00

[oracle@154-Oracle_Archive ~]$ scp pfile.ora [email protected]:/home/oracle
[email protected]’s password:
pfile.ora 100% 1018 1.0KB/s 00:00

[oracle@154-Oracle_Archive dbs]$ scp orapwtesthis [email protected]:/home/oracle
[email protected]’s password:
Permission denied, please try again.
[email protected]’s password:
orapwtesthis 100% 1536 1.5KB/s 00:00

[oracle@Oracle_archive ~]$ cp orapwtesthis /u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwtesthisnew

修改pfile文件

[oracle@Oracle_archive ~]$ vi pfile.ora
testhisnew.__db_cache_size=922746880
testhisnew.__java_pool_size=33554432
testhisnew.__large_pool_size=16777216
testhisnew.__oracle_base=’/u01/app/oracle’#ORACLE_BASE set from environment
testhisnew.__pga_aggregate_target=1358954496
testhisnew.__sga_target=2533359616
testhisnew.__shared_io_pool_size=0
testhisnew.__shared_pool_size=1493172224
testhisnew.__streams_pool_size=33554432
*.audit_file_dest=’/u01/app/oracle/admin/testhisnew/adump’
*.audit_trail=’db’
*.compatible=’11.2.0.0.0′
*.control_files=’/u01/app/oracle/oradata/testhisnew/control01.ctl’,’/u01/app/oracle/fast_recovery_area/testhisnew/control02.ctl’
*.db_block_size=8192
*.db_domain=”
*.db_name=’testhisne’ //最长8个字符
*.db_recovery_file_dest=’/u01/app/oracle/fast_recovery_area’
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest=’/u01/app/oracle’
*.dispatchers='(PROTOCOL=TCP) (SERVICE=testhisnewXDB)’
*.log_archive_dest_1=’location=/u01/app/oracle/test_arch’
*.memory_target=3879731200
*.open_cursors=300
*.processes=1000
*.remote_login_passwordfile=’EXCLUSIVE’
*.sessions=1105
*.undo_tablespace=’UNDOTBS1′

db_file_name_convert=(‘/u01/app/oracle/oradata/testhis/’,’/u01/app/oracle/oradata/testhisnew/’)

log_file_name_convert=(‘/u01/app/oracle/oradata/testhis/’,’/u01/app/oracle/oradata/testhisnew/’)

创建相关目录


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Oracle 11gR2利用RMAN复制整库记录

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址