Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Dataguard 11.4 ORA-12154: TNS:could not resolve the connect identifier processing

Shulou Source: shulou.com Published: 2022-06-03 05:32:14 11月24日 Update

ORA-12154: TNS:could not resolve the connect identifier specified processing

SQL > select dest_name,status,error from v$archive_dest where rownum show parameter fal

NAME TYPE VALUE

-

Fal_client string orcl_primary

Fal_server string orcl_standby

SQL > show parameter service_name

NAME TYPE VALUE

-

Service_names string orcl_dg

SQL >

Check the Tnsnames.ora configuration on both sides:

Orcl_primary =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 172.16.1.244) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl_pm)

)

)

Orcl_standby =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 172.16.1.245) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl_dg)

)

)

Note: the service in parameter LOG_ARCHIVE_DEST_n Parameter Attributes refers to: net_service_name

When you specify a SERVICE attribute:

You identify remote destinations by specifying the SERVICE attribute with a valid Oracle Net service name (SERVICE=net_service_name) that identifies the remote Oracle database instance to which the redo data will be sent.

The Oracle Net service name that you specify with the SERVICE attribute is translated into a connection descriptor that contains the information necessary for connecting to the remote database.

Therefore: service in log_archive_log_2 refers to net_service_name in tnsnames.ora, not service_name in standby library

Modify the log_archive_log_2 parameter in the main library:

Alter system set log_archive_dest_2='service=orcl_standby async

Valid_for= (online_logfiles,primary_role)

Db_unique_name=orcl_dg' scope=spfile

Modify the standby library:

Alter system set log_archive_dest_2='service=orcl_primary async

Valid_for= (online_logfiles,primary_role)

Db_unique_name=orcl_pm' scope=spfile

Restart the library and listen to OK!

In previous configuration, service_name,unique_name,tnsname is the same, there is no clear understanding of the concept of service in log_archive_dest_2 here.

Tags: Parameters configuration processing clarity both ends reason concept inspection monitoring Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno Microsoft NVidia Redmi