Oracle Net8 Client Configuration

Configure sqlnet.ora

* Located in $ORACLE_HOME/network/admin directory.
* Default directory can be overriden with TNS_ADMIN environment variable. Useful if multiple Oracle homes are present.

Choose naming methods

# Use Oracle naming only
NAMES.DIRECTORY_PATH= (ONAMES)
 
# Default, use tnsnames.ora file first, then Oracle names, use host naming last
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

Choose default domain.

– Default domain is appended to a service name if it does not contain a dot character.

# Default domain is world
NAMES.DEFAULT_DOMAIN = world
 
# Set default domain to my.com
NAMES.DEFAULT_DOMAIN = my.com

Choose trace file location

– Defaults to $ORACLE_HOME/network/trace/sqlnet.trc

# Output trace file to /home/oracle/trace/net8.trc
TRACE_DIRECTORY_CLIENT = /home/oracle/trace
TRACE_FILE_CLIENT = net8.trc

Choose log file location

– Defaults to $ORACLE_HOME/network/log/sqlnet.log

LOG_DIRECTORY_CLIENT = $ORACLE_HOME/network/log
LOG_FILE_CLIENT = net8client.log

Configure tnsnames.ora

* Located in $ORACLE_HOME/network/admin directory.
* Default directory can be overriden with TNS_ADMIN environment variable. Useful if multiple Oracle homes are present.
* Syntax

net_service_name = 
  (DESCRIPTION = 
    (ADDRESS = (address_data))
    (CONNECT_DATA = 
      (SERVICE_NAME = database_service_name)
      (INSTANCE_NAME = sid)
    )
  )

Address_data syntax

* TCP/IP

(PROTOCOL = TCP)(HOST = hostname | ip_address)(PORT = port_num)
 
# Example
orcl =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = db.my.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

* Bequeath
– Client and Server on same machine
– No need for Net8 listener
– dedicated server connection only

(PROTOCOL = BEQ)(PROGRAM = oracle_exe)(ARGV0 = sid_identifier)
(ARGS = '(DESCRIPTION=(LOCAL = YES)(ADDRESS = (PROTOCOL = BEQ)))')
 
# oracle_exe: oracle
# sid_identifier: concatenation of oracle_exe and SID, e.g. oracleORCL

* IPC
– Client and server on same machine
– Still need Net8 listener up and running (bequeath does not need)

(PROTOCOL = IPC)(KEY = key_name)
 
# key_name MUST match listener key_name defined in listener.ora

* SPX
– Novell protocol

(PROTOCOL = SPX)(SERVICE = spx_service_name)
 
# key_name MUST match listener key_name defined in listener.ora

* named pipes connections
– Allows IPC across a Microsoft network
– Need to install Client for Microsoft Networks

(PROTOCOL = NMP)(SERVER = server_name)(PIPE = pipe_name)

Config LDAP

Create an ldap.ora file to contain

* LDAP host and port number

DIRECTORY_SERVERS = (ldap1.my.com:389:636, ldap2.my.com:389:636)
# port 389 for non-SSL
# port 636 for SSL

* Default admin context

DEFAULT_ADMIN_CONTEXT ="dc=my, dc=com"

* LDAP server type/brand

DIRECTORY_SERVER_TYPE = [OID | AD |NDS]
This entry was posted in net8. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.