Understanding SQL*Net
Configuring the System to Use Your Application
In this release of SQL*Net OPEN, Oracle Network Manager cannot be used to configure applications you have developed using this API. You must configure SQL*Net yourself to recognize your application. This involves three steps:
1. Add the location of your server program to LISTENER.ORA, so that the network listener knows to start up your server if a connection request comes in for your service -- rather than starting up an Oracle database server.
To do this, first you must come up with a SID name for your service, similar to the one an Oracle database has. (Don't pick the same SID as your database.)
For example, say you are configuring a "chat" program. You could call the SID "chatsid". Place the program into an existing ORACLE_HOME, which we'll assume here is in /usr/oracle.
You would place the following entry in the LISTENER.ORA file for your listener:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = chatsid) /*your SID name*/
(ORACLE_HOME = /usr/oracle) /*your ORACLE_HOME name*/
(PROGRAM = chatsvr) /*the name of your server program*/
)
Note: There may be additional SIDs in the list as well, configured with Network Manager.
You need to restart the listener so it will recognize the new service.
2. Add the address of your application server to TNSNAMES.ORA, just like Network Manager would for a database server.
Let's assume that your listener is on the address:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=unixhost)(PORT=1521)))
Also assume that you want people to refer to the service you created above as "chat".
You would add to the TNSNAMES.ORA file:
chat=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=unixhost)
(PORT=1521))(CONNECT_DATA=(SID=chatsid)))
Note that the address contains the SID you configured in the LISTENER.ORA file above. Also note that the second line started with at least one space character, which indicates that it is a continuation line. In general, if you are editing a file that was originally created with Oracle Network Manager, you should follow its formatting conventions.
If you have a default domain, you need to name your service accordingly. For instance, chat.acme.com if your default domain is acme.com. Again, use the existing TNSNAMES.ORA file as a template -- if all the other service names end in a domain, you need to name your service name similarly.
3. Place the executable for your service in the appropriate location so the network listener can see it.
Your server program needs to go into the directory where your Oracle Server executable is. This is specific to your particular platform. On UNIX systems, it should go into the ORACLE_HOME directory that you indicated in the LISTENER.ORA file. So, in this example, you would place the program "chatsvr" in the location /usr/oracle/bin/chatsvr.
You also must ensure that your program has the correct permissions to be executed, if this is needed on your operating system.