Previous Topic

Next Topic

Book Contents

Book Index

Set up the tnsnames.ora file

The tnsnames.ora file contains information needed to connect to the Oracle servers.

Example of a tnsnames.ora file

The following shows the contents of a tnsnames.ora file. The first entry defines the connection information to database XE. There can be multiple entries such as these if you wish to connect to multiple databases.

XE =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = ORASERV)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = XE)

)

)

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

ORACLR_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

)

(CONNECT_DATA =

(SID = CLRExtProc)

(PRESENTATION = RO)

)

)