Monday, December 28, 2009

How to create tnsnames.ora for R12?

I followed the following steps to create a tnsnames.ora entry for Oracle Release 12. (funny could not find any entry for this)

To create this using Net Manager, you would need
# 1. Hostname, 2. Oracle HOME PATH in c drive, 3. SID - find from v$instance
# 4. Copy Oracle SID details from Listener.ora and add the following
# (CONNECT_DATA = (SID = )
# TNSNAMES.ora file is ready
# Open sqlnet.ora file and Comment out the line NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
# test by running tnsping
# add this to toad or sqldeveloper.


LISTENER ENTRY:

VISR12 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = demo)(PORT = 1521)
)
)

SID_LIST_VISR12 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = VISR12)
(ORACLE_HOME = )
(SID_NAME = VISR12)
)
)



TNSNAMES ENTRY:
Example entry I)

VISR12 =
( DESCRIPTION =
( ADDRESS = ( PROTOCOL = TCP ) (HOST = demo) (PORT=1521)
)
( CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME =VISR12 )
)
)


Example Entry II)
VISR12 =
( DESCRIPTION =
(ADDRESS_LIST =
( ADDRESS = ( PROTOCOL = TCP ) (HOST = demo) (PORT=1521)
)
)
( CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME =VISR12 )
)

)