7 rows created.
SQL> commit;
Commit complete.
SQL> select count(*) from test;
? COUNT(*)
----------
? ? ? ? 14
standby端验证数据是否同步
SQL> select count(*) from test;
? COUNT(*)
----------
? ? ? ? 14
搭建过程问题小结:
1、在备库启动到nomount后用tns测试连接时发现数无法连接
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
原因是11g之后动态监听不支持在nomount状态下远程的tns访问,自己的服务器中配置的监听一直是动态的
添加listener.ora 文件,为standby设置静态监听
SID_LIST_LISTENER =
? (SID_LIST =
? ? (SID_DESC =
? ? ? (SID_NAME = PLSExtProc)
? ? ? (ORACLE_HOME = /opt/app/oracle/product/11.2.0/dbhome_1)
? ? ? (PROGRAM = extproc)
? ? )
? ? (SID_DESC =
? ? ? (GLOBAL_DBNAME = xtttestdb)
? ? ? (ORACLE_HOME = /opt/app/oracle/product/11.2.0/dbhome_1)
? ? ? (SID_NAME = xtttestdb)
? ? )
? )
之后再测试连接正常
2、RMAN远程复制数据库完成后有redo的报错
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: '/opt/app/oracle/oradata/xtttestdb/redo01.log'
根据错误提示,加上网上搜索一下,原来10g之后的DG即使日志的原备库路径一样,为了区分开来,还是要设置log_file_name_convert参数,创建备库的pfile文件,并添加该参数进去,利用pfile启动数据库,问题解决
create pfile='/home/oracle/stypfile.ora' from spfile;
添加
*.log_file_name_convert='/opt/app/oracle/oradata/xtttestdb/','/opt/app/oracle/oradata/xtttestdb/'
creaet spfile from pfile='/home/oracle/stypfile.ora'
startup
--------------------------------------分割线 --------------------------------------
--------------------------------------分割线 --------------------------------------