sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 产品DBA > Oracle DG >

学习笔记:Oracle Data Guard配置详细步骤过程

时间:2016-06-12 23:06   来源:Oracle研究中心   作者:惜分飞   点击:

天萃荷净 生产环境关于Oracle Data Guard配置详细步骤过程

1、修改spfile参数文件

primary:
*.standby_archive_dest=’/opt/ora9/oradata/txzldb/stdarch/’
*.log_archive_dest_2=’service=txzldb.Standby optional reopen=60′ –配置tns
*.utl_file_dir=’/opt/ora9′
*.remote_archive_enable=TRUE
*.standby_file_management=AUTO
*.fal_server=’txzldb.Standby’
*.fal_client=’txzldb.Primary’
*.log_archive_dest_state_2=defer

standby:
*.standby_archive_dest=’/opt/ora9/oradata/txzldb/stdarch/’
*.log_archive_dest_2=’service=txzldb.Primary optional reopen=60′ –配置tns
*.utl_file_dir=’/opt/ora9′
*.remote_archive_enable=TRUE
*.standby_file_management=AUTO
*.fal_server=’txzldb.Primary’
*.fal_client=’txzldb.Standby’
*.log_archive_dest_state_2=defer

2、备份odg主库

backup database format=’/home/oracle/full_backup_%U_%s.bak’;
sql “alter system archive log current”;
–backup filesperset 10 archivelog all format=’/home/oracle/archivlog_%U_%s.bak’;(可选)
alter database create standby controlfile as ‘/home/oracle/control01.ctl’;

3、拷贝Oracle密码文件控制文件

scp /opt/oracle/product/9.2.0/dbs/orapwora9i
192.168.3.2:/opt/oracle/product/9.2.0/dbs/
scp control01.ctl
192.168.3.2:/opt/oracle/oradata/ora9i/control01.ctl

4、恢复odg备机

拷贝备份至备机与主机相同的目录
sqlplus “/ as sysdba”
  startup nomount pfile=”
  alter database mount standby database;
  exit
  rman target / nocatalog
  restore database
–restore archivelog all;(可选)
–recover automatic standby database;(可选)

5、启动Oracle数据库恢复状态

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
create spfile from pfile=”;
alter system set log_archive_dest_state_2=enable scope=both;

6、添加数据库临时表空间

recover managed standby database cancel;
alter database open read only;
alter tablespace temp add tempfile ‘/opt/oracle/oradata/ora9i/temp01.dbf’
SIZE 412M AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED;
shutdown immediate;
startup nomount pfile=”
alter database mount standby database;
recover managed standby database disconnect from session;


--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之学习笔记:Oracle Data Guard配置详细步骤过程

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/376.html

Oracle研究中心

关键词:

Oracle Data Guard配置详细步骤过程

Oracle Data Guard如何配置

搭建ogg环境