Associating the updated Oracle database with the listener

To associate the database with the listener

  1. Ensure that the initialization parameter file contains the following entries:

    • SERVICE_NAMES (the name of the database service)

    • INSTANCE_NAME (the name of the database instance)

    These parameters are created during installation or database creation.

  2. Use one of the following procedures to configure the new attribute listener_alias:

    Run the following SQL command:

    SQL> ALTER SYSTEM SET LOCAL_LISTENER='<listener_alias>' scope=spfile;
    			

    OR

    Add the following entry to the initialization parameter file (pfile or spfile):

    LOCAL_LISTENER = <listener_alias>
  3. Define the parameter listener_alias. If your Oracle configuration uses the file tnsnames.ora, edit the file as instructed below. The default location of tnsnames.ora is %ORACLE_HOME%\NETWORK\ADMIN.

    Add the following to tnsnames.ora file:

    <listener_alias>=
    (DESCRIPTION =
    (ADDRESS=(Protocol=TCP)(HOST=virtual_IP_address)(Port=1521))
    )
  4. Stop and restart the database.

    The listener_alias parameter gets appended by the default domain name that is specified in the file sqlnet.ora.