您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 管理学资料 > 20170817-Oracle-12c-dataguard-部署-公开发布v1.0
长天科技QQ:5694613661Oracle12cDataguard部署实施长天科技-刘磊2017-08长天科技QQ:5694613662目录1.环境说明...................................................................................................................................32.环境配置及先决条件...............................................................................................................33.(主库)启动FORCELOGGING...............................................................................................34.(主库)启动归档模式...........................................................................................................45.(主库)添加standbyredologfile.........................................................................................55.1.查看Primary库的REDO相关信息:.....................................................................56.(主备库)分别配置监听并启动...........................................................................................67.(主备库)分别配置tnsnames.ora........................................................................................68.(备库)创建必要的目录.......................................................................................................69.(主库)创建pfile文件并修改pfile内容...........................................................................79.1.创建pfile......................................................................................................................79.2.修改pfile......................................................................................................................79.3.(主库)用新参数重启数据库:...............................................................................710.(主库)将主库的口令文件copy到备库.........................................................................811.将主库的参数文件copy到备库并修改.............................................................................812.(备库)用spfile将备库启动到nomount状态.............................................................813.(备库)开始进行Activeduplicate....................................................................................814.(备库)打开备库并并启动apply.....................................................................................915.验证DG...............................................................................................................................1015.1.主库CDB表T实验................................................................................................1015.2.备库实验.................................................................................................................1115.3.主库CDB表pdb实验............................................................................................1115.4.主库PDB表T实验................................................................................................1316.附录.....................................................................................................................................1516.1..bash_profile(Oracle用户:orcl-p.)..................................................................1516.2.(两节点)/etc/hosts............................................................................................1616.3.(两节点)tnsname.ora........................................................................................1616.4.(两节点)listener.ora...........................................................................................1716.5.initorcl.ora(主库).....................................................................................................1716.6.initorcl.ora(备库).....................................................................................................18长天科技QQ:56946136631.环境说明测试环境:redhat6.564bitoracle12C12.2.0.1.0-64bit说明:(1)oracle12的Dataguard是在CDB级别进行,所以所有的配置都是从cdb角度出发。(2)以下实验只有一个cdb,并没有创建pdb,但在后面的测试过程中,有创建pdb的测试。数据库主库备库说明IP地址192.168.26.141192.168.26.142主机名oraserv1oraserv2DB_UNIQUE_NAMEorcl_porcl_sDB_NAMEorclorclOracleNetServiceNameorcl_porcl_sSIDorclorcl2.环境配置及先决条件1)配置/etc/hosts文件(详见附件)2)配置oracle用户的.bash_profile文件(详见附件)3)在主库安装oracle12c数据库软件,并创建cdb数据库(该实验环境不含pdb,也可以创建pdb不过在配置dg的备库中需要建立pdb数据库相应的文件夹)4)在备库安装oracle12c数据库软件,不用创建任何数据库(后面可以用rman进行dg的创建)。注意:最好两节点安装的路径一样。3.(主库)启动FORCELOGGING先设置主库的force_loggin参数。SYS@orclalterdatabaseforcelogging;Databasealtered.SYS@orclselectforce_loggingfromv$database;FORCE_LOGGING---------------------------------------YES长天科技QQ:56946136644.(主库)启动归档模式SYS@orclshowcon_nameCON_NAME------------------------------CDB$ROOTSYS@orclarchiveloglist;DatabaselogmodeNoArchiveModeAutomaticarchivalDisabledArchivedestinationUSE_DB_RECOVERY_FILE_DESTOldestonlinelogsequence14Currentlogsequence16SQLshutdownimmediateDatabaseclosed.Databasedismounted.ORACLEinstanceshutdown.SQLstartupmountORACLEinstancestarted.……SQLalterdatabasearchivelog;Databasealtered.SQLalterdatabaseopen;Databasealtered.SYS@orclarchiveloglist;--再次查看归档DatabaselogmodeArchiveModeAutomaticarchivalEnabledArchivedestinationUSE_DB_RECOVERY_FILE_DESTOldestonlinelogsequence14Nextlogsequencetoarchive16Currentlogsequence16查看归档路径:SYS@orclshowparameterrecovery;这里归档放在FRA里了;扩展FRA的大小为10g;SQLaltersystemsetdb_recovery_file_dest_size=10G扩展后如下图:长天科技QQ:5694
本文标题:20170817-Oracle-12c-dataguard-部署-公开发布v1.0
链接地址:https://www.777doc.com/doc-5240382 .html