Creating the sqlnet.ora file

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

  1. Log in as oracle.
  2. 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
  3. 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:
    1. 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
      
    2. 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.
    3. Write and quit the sqlnet.ora file.
    4. Restart the listener process by using the following commands:
       
      lsnrctl stop
      
      lsnrctl start
      

      Look for a successful completion message.