oracle主从库同步问题

1.查看从库同步是否正常

从库:

SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;

发现MRP0没启动

解决方法:

继续执行:

 >alter database recover managed standby database using current logfile disconnect from session;

 >SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;

 发现还是mrp0没启动

继续执行:

alter database recover managed standby database cancel;
alter database recover managed standby database using current logfile disconnect from session; 

SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;

发现执行第2条报错:

想重启实例mrp0能不能起来?

重启实例:

shutdown immediate;
startup nomount;
alter database mount standby database;
alter database open read only;
alter database recover managed standby database using current logfile disconnect from session;

发现从库出问题了

因为不太懂oracle,重建从库比找原因解决问题快

开始重建从库:

从库执行:

su - oracle

sqlplus  / as sysdba

select open_mode from v$database;  

shutdown immediate
startup nomount    切换到nomount模式

然后到主库开始同步从库:

su - oracle

rman target sys/oracle auxiliary sys/oracle@orcldg

cat $ORACLE_HOME/network/admin/tnsnames.ora

猜你喜欢

转载自www.cnblogs.com/penny-pan/p/10329955.html