在上一篇文章:https://www.modb.pro/db/29658中进行了说明,但是这个很重要,单独拿出来,后续关注。
几乎所有的ADG,大家都愿意把TNS的名字和DB_UNIQUE_NAME设置成一致的,因此在出现fal_server、log_archive_config、log_archive_dest_2三个都出现DB_UNIQUE_NAME的地方,出现TNS与DB_UNIQUE_NAME的混淆,一度傻傻分不清楚,好好查一下很重要:
FAL_SERVER
ORACLE的说法:
The value is an Oracle Net service name, which is assumed to be configured properly on the standby database system to point to the desired FAL server.
参考URL:https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/FAL_SERVER.html#GUID-4F034B79-AE2A-44E3-8485-E055AA2DDD29
可见,这个参数是TNS
log_archive_config
LOG_ARCHIVE_CONFIG enables or disables the sending of redo logs to remote destinations and the receipt of remote redo logs, and specifies the unique database names (DB_UNIQUE_NAME) for each database in the Data Guard configuration.
参考:URL:
https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/LOG_ARCHIVE_CONFIG.html#GUID-4DABDBE9-04B6-44D2-B93D-DAB15EA71427
可见,LOG_ARCHIVE_CONFIG中,用的是DB_UNIQUE_NAME,19c最多支持30个容灾库。
log_archive_dest_2或者x
log_archive_dest_2='service=< TNS alias source_prm> async valid_for=(online_logfiles,primary_role) db_unique_name=source_prm
可见,'service后面跟着的参数,这也是个TNS**,但是db_unique_name参数后面跟着的,就是db_unique_name。
**