oracle rac环境中怎么开启归档
oracle rac环境中怎么开启归档,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。
oracle rac 归档设置需要不像单实例设置简单,开启过程需要注意一些细节
归档开启思路:
1:查看数据库是否开启归档
2:创建共享目录(归档一定要放在共享存储上)
3:将rac设置成单实例模式
4:分别关闭各个节点实例
5:将其中一个节点启动到mount状态,开启归档,设置归档路径,格式,并打开数据库还原rac模式
6: 打开所有节点数据库
7:查看数据库归档参数设置是否生效
8:切换归档,查看归档是否正常工作
1、查询归档当前信息
SQL>showparameterrecoveryNAMETYPEVALUE-----------------------------------------------------------------------------db_recovery_file_deststringdb_recovery_file_dest_sizebiginteger0recovery_parallelisminteger0
2、查询是否开户归档日志
SQL>archiveloglistDatabaselogmodeArchiveModeAutomaticarchivalEnabledArchivedestination/oracle/app/oracle/product/11.2.0/db_1/dbs/archOldestonlinelogsequence35Nextlogsequencetoarchive36Currentlogsequence36
说明:从当前查询是已开始归档模式了,但是规定路径不对要重新修改
3、查询集群参数
SQL>showparameterclusterNAMETYPEVALUE-----------------------------------------------------------------------------cluster_databasebooleanTRUEcluster_database_instancesinteger2cluster_interconnectsstring
4、关闭另外一个节点数据库
SQL>shutdownimmediateDatabaseclosed.Databasedismounted.ORACLEinstanceshutdown.
5、在当前正常节点修改集群为单节点模式
SQL>altersystemsetcluster_database=falsescope=spfile;Systemaltered.
6、配置闪回大小
SQL>altersystemsetdb_recovery_file_dest_size=2Gscope=both;Systemaltered.
7、配置归档日志路径,配置在DG中
SQL>altersystemsetdb_recovery_file_dest='+DGRECOVERY'scope=both;Systemaltered.
8、关闭当前节点数据库
SQL>shutdownimmediateDatabaseclosed.Databasedismounted.ORACLEinstanceshutdown.
9.把当前节点数据库启动到mount状态中修改归档
SQL>startupmountORACLEinstancestarted.TotalSystemGlobalArea784998400bytesFixedSize2257352bytesVariableSize331353656bytesDatabaseBuffers448790528bytesRedoBuffers2596864bytesDatabasemounted.
10.查询当前数据库是处于什么状态
SQL>selectstatusfromv$instance2;STATUS------------MOUNTED
11.修改数据库归档
SQL>alterdatabasearchivelog;Databasealtered.
12.恢复数据库双节点实例
SQL>altersystemsetcluster_database=truescope=spfile;Systemaltered.
13.打开数据库
SQL>alterdatabaseopen;Databasealtered.
14.查询当前数据库状态
SQL>selectstatusfromv$instance;STATUS------------OPEN
15、查询数据库集群状态
SQL>showparameterclusterNAMETYPEVALUE-----------------------------------------------------------------------------cluster_databasebooleanTRUEcluster_database_instancesinteger2cluster_interconnectsstring
16、再启动另外一个节点
startup
17、切换归档日志,判断是否切换成功
SQL>altersystemswitchlogfile;Systemaltered.
18、查询归档中数据
ASMCMD>pwd+DGRECOVERY/RAC/ARCHIVELOG/2017_06_13ASMCMD>lsthread_1_seq_37.256.946542069thread_1_seq_38.257.946542129thread_1_seq_39.258.946542133thread_1_seq_40.260.946542135thread_1_seq_41.261.946543367thread_1_seq_42.262.946543369thread_1_seq_43.264.946543373thread_1_seq_44.265.946543375thread_1_seq_45.266.946543377thread_1_seq_46.267.946543377thread_1_seq_47.269.946544929thread_2_seq_4.259.946542029thread_2_seq_5.263.946543265thread_2_seq_6.268.946543277
看完上述内容,你们掌握oracle rac环境中怎么开启归档的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注亿速云行业资讯频道,感谢各位的阅读!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。