Skip to content
February 21, 2013 / doganay

COMMENTS IN TNSNAMES.ORA

Be careful when commenting tnsnames.ora file:

Both DB1 and DB2 does not work:

DB1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB1)
)
)

#DB2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB2)
)
)

This works:

DB1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB1)
)
)

#DB2 =
#(DESCRIPTION =
#(ADDRESS_LIST =
#(ADDRESS = (PROTOCOL = TCP)(HOST = host2)(PORT = 1521))
#)
#(CONNECT_DATA =
#(SERVICE_NAME = DB2)
#)
#)
Advertisements

2 Comments

Leave a Comment
  1. Mohamed Gani / Jun 15 2015 9:00 am

    To comment out the whole thing (one/single tns entry), can I use /* before */ after ?

    • doganay / Jun 15 2015 10:46 am

      Unfortunately, you can not.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: