The sqlnet.ora file manages Oracle network operations. You can create a
new sqlnet.ora file, or FTP the file from your Oracle server.
About this task
To set up the TNS service names:
Procedure
-
Log in as
oracle.
-
Change the directory to Oracle 12.1.0.2 client
(64-bit):
$ cd $TNS_ADMIN
or
$ cd /opt/oracle/product/12.1.0/network/admin
-
Create the
sqlnet.ora file, which manages Oracle network operations. You must
create an sqlnet.ora file for both Oracle server and Oracle client installations.
Follow these steps:
-
Copy the sample
sqlnet.ora file,
template.example_tnpm.sqlnet.ora, contained in the
opt/oracle/admin/skeleton/bin/ directory:
$ cp /opt/oracle/admin/skeleton/bin/template.example_tnpm.sqlnet.ora sqlnet.ora
-
Add the following lines to this file:
NAMES.DIRECTORY_PATH=(TNSNAMES)
NAMES.DEFAULT_DOMAIN=WORLD
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
For example:
# sqlnet.ora network configuration file in
# /opt/oracle/product/12.1.0/network/admin
NAMES.DIRECTORY_PATH=(TNSNAMES)
NAMES.DEFAULT_DOMAIN=WORLD
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
Note: If you do not use WORLD as the DEFAULT_DOMAIN value, make
sure that you enter the same value for DEFAULT_DOMAIN in both
sqlnet.ora and tnsnames.ora.
-
Write and quit the
sqlnet.ora file.
-
Restart the listener process by using the following commands:
lsnrctl stop
lsnrctl start
Look for a successful completion message.