Oracle DBMS_TNS
Version 21c

General Information
Library Note Morgan's Library Page Header
ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling complimentary technical Workshops on Database Security for the first 30 Oracle Database customers located anywhere in North America, EMEA, LATAM, or APAC that send an email to asra_us@oracle.com. Request a Workshop for your organization today.
Purpose Provides the RESOLVE_TNSNAME function to resolve a TNS name and return the corresponding Oracle Net8 connection string.
AUTHID DEFINER
Dependencies
DBMS_TNS_LIB    
Documented No
First Available 12.2
Security Model Owned by SYS with EXECUTE granted to the DBA role
Source {ORACLE_HOME}/rdbms/admin/dbmstns.sql
Subprograms
 
RESOLVE_TNSNAME
Returns the resolved connect string from any configured source (tnsnames, LDAP, Easy Connect) as indicated in the sqlnet.ora names.directory_path parameter dbms_tns.resolve_tnsname(tns_name IN VARCHAR2) RETURN VARCHAR2;
PRAGMA SUPPLEMENTAL_LOG_DATA(resolve_tnsname, READ_ONLY);
SELECT db_link, dbms_tns.resolve_tnsname(host)
FROM dba_db_links;

DB_LINK DBMS_TNS.RESOLVE_TNSNAME(HOST)
------- -------------------------------------------------------------------------------
PDBPROD (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
        (CONNECT_DATA = (SERVICE_NAME = pdbprod)))

Related Topics
Built-in Functions
Built-in Packages
Net Services
What's New In 21c
What's New In 23c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2023 Daniel A. Morgan All Rights Reserved
  DBSecWorx