In Oracle, the
tnsnames.ora file important configuration file that is used in Oracle
database connection's
default location of
tnsnames.ora file is $ORACLE_HOME/network/admin but it can be modified or kept
at other locations as well and create soft links at the default location. while
using a location other than the default location, we need to use the TNS_ADMIN
parameter to load settings while starting the listener of the database.
In case you are not sure about the
location of tnsnames.ora file, you can execute below commands on Unix shell
$env |grep ORACLE_HOME
or use below command
echo $ORACLE_HOME
Syntax used in tnsnames.ora
file
testdb.domain.com
(DESCRIPTION =
(ADDRESS
= (PROTOCOL = TCP)(HOST = HOSTNAME.DOMAIN.COM) (PORT = 1521)
)
(CONNECT_DATA =)
( SERVICE_NAME=tstdb.domain.com)
)
This file can be modified very
easily, take backup before modifying anything in this file
on Unix use vi editor to open
the file and change anything we want then save using :wq
On Windows, one can use Notepad editor and save using ctrl+S or the save option
0 comments:
Post a Comment