tnsnames.ora configuration
TRANSCRIPT
8/16/2019 TNSNames.ora Configuration
http://slidepdf.com/reader/full/tnsnamesora-configuration 1/7
Configure Tnsnames.ora
The "tnsnames.ora" file contains client side network configuration parameters. It can be
found in the "$ORACLE_HOME/network/admin" directory on the client. This file will also be
present on the server if client style connections are used on the server itself. Here is an
example of a "tnsnames.ora" file.
How do I generate a tnsnames.ora file to connect to an
Oracle Database
Su – oracle
$netca
Click on Local Net Service Name Configuration.
Page 1 of 7
8/16/2019 TNSNames.ora Configuration
http://slidepdf.com/reader/full/tnsnamesora-configuration 2/7
Clink on Add Button
Page 2 of 7
8/16/2019 TNSNames.ora Configuration
http://slidepdf.com/reader/full/tnsnamesora-configuration 3/7
Enter your Databae S!D
Enter "our Server !P Addre or #otName
Page 3 of 7
8/16/2019 TNSNames.ora Configuration
http://slidepdf.com/reader/full/tnsnamesora-configuration 4/7
!f you ant to tet % Click on "e Perform &et
't(erie No% Do not tet
Page 4 of 7
8/16/2019 TNSNames.ora Configuration
http://slidepdf.com/reader/full/tnsnamesora-configuration 5/7
Enter t(e Databae S!D 'ne )ore time.
Click No
Page 5 of 7
8/16/2019 TNSNames.ora Configuration
http://slidepdf.com/reader/full/tnsnamesora-configuration 6/7
Click *ini( Button.
No &nentry Configured for t(e +e,ective Databae.
C(eck t(e tn entry in t(e belo location
Cd $'+ACLE-#')Enetorkadmin
$more tnname.ora
PROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.105.32.41)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PROD)
)
)
$ tnsping PROD
TNS Ping Utility for Linux: Version 10.2.0.1.0 Pro!u"tion on 2#%&200' 0(:)):1*+opyrig,t -" 1//' 200) Or"le. %ll rig,ts resere!.
Use! pr3eter files:
4pp4or"le4pro!u"t410.2.04!5614net7or84!3in4s9lnet.or
Use! TNSNAMES !pter to resole t,e lis
Page 6 of 7
8/16/2019 TNSNames.ora Configuration
http://slidepdf.com/reader/full/tnsnamesora-configuration 7/7
%tte3pting to "ont"t -DS+R;PT;ON < -%DDRSS < -PROTO+OL < T+P-=OST < lo"l,ost
-PORT < 1)21 -+ONN+T6D%T% < -SRVR < DD;+%TD -SRV;+6N% < PROD
O> -10 3se"
Question: I have just finished installing Oracle. I want to update mytnsnames.ora file,
but I cannot find a tnsnames.ora file on my system. I thought the tnsnames.ora file would
be created when I created the database. How do I create the tnsnames.ora?
Answer: The tnsnames.ora is a S!"#et configuration file that normally resides in the
O$%&!'(HO)'*networ+*admin directory. Specifically, thetnsnames.ora defines
databases addresses so that connections can be made to them.
The creation of the database itself will not necessarily create the tnsnames.ora. It is
created along with the sqlnet.ora and listener.ora as part of the networ+ configuration.
#ormally, the #etwor+ &onfiguration %ssistant #'T&%- is started at the end of the
installation process however, if #'T&% fails or you e/it before completing,
the tnsnames.ora and the other files will not be created. Thetnsnames.ora and the other
#'T&% created files are not necessary for connecting to the database locally from the
server. They are just for client access, so it is possible for the database to be created
properly and the files not e/ist. Thetnsnames.ora file is located on both the client and
server systems, but there will be only one tnsnames.ora on each server regardless of how
many database instances e/ist.
Page 7 of 7