Perform the steps given below to configure the database service for the virtual network name.
To configure the database service for virtual network name
Associate the database with the listener.
Ensure that the initialization parameter file contains the following entries:
Example SQL queries to ensure these entries:
show parameter INSTANCE_NAME show parameter SERVICE_NAME
These parameters are created during installation or database creation.
Use one of the following ways to configure the new attribute listener_alias:
Run the following SQL command:
SQL> ALTER SYSTEM SET LOCAL_LISTENER='<listener_alias>' scope=spfile;
Add the following entry to the initialization parameter file (pfile/spfile):
LOCAL_LISTENER = <listener_alias>
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_name)(Port=default port)))
The listener_alias parameter gets appended by the default domain name specified in the file sqlnet.ora.
Take the listener service and the database service resources offline, and then bring them online.
If you use PFILE
Edit the dispatchers parameter by adding or editing the HOST parameter. The edited dispatchers parameter should look like:
dispatchers = '(ADDRESS=(Protocol=TCP) (HOST=virtual_name) (other entries))'
Here virtual_name is the name of the Lanman resource.
If you use SPFILE
Log on to the Oracle database as administrator and edit the dispatchers parameter by adding or editing the HOST parameter.
Type the following commands on the command prompt:
C:\>sqlplus "/as sysdba" C:\>alter system set dispatchers = '(ADDRESS=(Protocol=TCP)(HOST=virtual_name)(other entries))' scope=spfile;
Here virtual_name is the name of the Lanman resource.