Host String

From Oracle FAQ
Jump to: navigation, search

A host string is the name you assign for TNS connectivity in tnsnames.ora. These entries typically identify the machine and port number and [SID]] of the database you are trying to connect to.

If the client and database are on same machine, you don't need a host string.

[edit] Example

Here is an example host string as defined in the system's tnsnames.ora file. The entry is named mutation, however you can name it anything you want:

bash-2.03$ tail -7  tnsnames.ora
mutation =
        (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost )(PORT = 1521)))
        (CONNECT_DATA =
        (SERVICE_NAME = mutation))))