How to configure Host Naming

Edit sqlnet.ora

    NAMES.DIRECTORY_PATH= (HOSTNAME, TNSNAMES, ONAMES,  LDAP)

Edit /ect/hosts or C:\WINDOWS\system32\drivers\etc\hosts, here I've got a db(p1.fadalti.com) on local and onother db(al9.fadalti.com)

on remote(nettuno)

    #IP address of server host name alias

    127.0.0.1 lo9 p1.fadalti.com
    127.0.0.1 localhost p1.fadalti.com
    192.168.0.1 nettuno al9.fadalti.com

You can optionally statically register the service on your listener.ora(this is for Linux)

# LISTENER.ORA Network Configuration File: /opt/ora9/product/9.2/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
    (DESCRIPTION_LIST =
        (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = lo9)(PORT = 1521))
        )
        (DESCRIPTION =
            (ADDRESS = (PROTOCOL = IPC)(KEY = PNPKEY))
        )
)

SID_LIST_LISTENER =
    (SID_LIST =
        (SID_DESC =
            (GLOBAL_DBNAME = p1.fadalti.com)
            (ORACLE_HOME = /opt/ora9/product/9.2)
            (SID_NAME = p1)
        )
    )

 

Test your connection

    sqlplus aldo/aldo@p1.fadalti.com

    sqlplus aldo/aldo@al9.fadalti.com