B.2 The Parameters

Team-Fly    

 
Oracle Net8 Configuration and Troubleshooting
By Jonathan Gennick, Hugo Toledo
Table of Contents
Appendix B.  The tnsnames.ora File


The remainder of this appendix is devoted to describing the syntax for the various tnsnames.ora parameters. The parameters are listed in order of enclosure. The outermost element is a net service name definition, so it comes first. A net service name definition may be composed of a description list or a description, so those come next .

Net Service Name

  net_service_name  .  domain  =   (DESCRIPTION_LIST =     (DESCRIPTION...)     [(DESCRIPTION...)     ...]   )  net_service_name  .  domain  =   (DESCRIPTION...) 

This is the basic format of a net service name entry. You can either use one description, or a description list composed of one or more descriptions. Net8 Assistant only supports the second syntaxwith one description.

Parameters

net_service_name

The name you want to use to tell Net8 to make the connection described here.

domain

The Net8 domain for this service name. You may want this to match your default domain. See the description for NAMES .DEFAULT_DOMAIN in the sqlnet.ora file.

DESCRIPTION_LIST

A list of one or more descriptions. Note that when a description list is used, client load balancing is on by default. See Chapter 8 for details on that feature.

DESCRIPTION

A description consisting of an address or address list, and some connection data. See the definition of DESCRIPTION in this appendix.

DESCRIPTION_LIST

 DESCRIPTION_LIST =   (DESCRIPTION...)   [(DESCRIPTION...)   ...]   [(FAILOVER = {ON  OFF  YES  NO  TRUE  FALSE})]   [(LOAD_BALANCE = {ON  OFF  YES  NO  TRUE  FALSE})]   [(SOURCE_ROUTE = {ON  OFF  YES  NO})] 

A description list is used to enclose a list of descriptions associated with a net service name.

Parameters

DESCRIPTION

See the entry for the DESCRIPTION parameter in the next section.

FAILOVER

Enables or disables connect-time failover for descriptions in the list. By default, failover is on. When failover is on, a failure to connect using one description causes Net8 to try another description in the list. Net8 works through addresses in order unless client load balancing is used.

LOAD_BALANCE

Enables or disables client load balancing. When a description list is used, client load balancing is on by default. When making a new connection, Net8 randomly chooses a description from the description list. If failover is also on, then Net8 randomly progresses from one description to another until either all descriptions have been tried or a connection is made.

SOURCE_ROUTE

Is used to route connections through Connection Manager. The default setting is OFF. When enabled, the description list must include two or more descriptions. The first description must point to a Connection Manager instance. Net8 then connects by hopping from one description to the next until a database listener is reached.

DESCRIPTION

 DESCRIPTION =   (ADDRESS_LIST =     (ADDRESS...)     [(ADDRESS...)     ...]   )   (CONNECT_DATA...)   [(FAILOVER = {ON  OFF  YES  NO  TRUE  FALSE})]   [(LOAD_BALANCE = {ON  OFF  YES  NO  TRUE  FALSE})]   [(SDU =  session_data_unit_bytes  )]   [(TDU =  transport_data_unit_bytes  )]   [(TYPE_OF_SERVICE = {RDB_DATABASE  ORACLE8_DATABASE})] DESCRIPTION =   (ADDRESS...)   [(ADDRESS...)   ...]   (CONNECT_DATA...)   [(FAILOVER = {ON  OFF  YES  NO  TRUE  FALSE})]   [(LOAD_BALANCE = {ON  OFF  YES  NO  TRUE  FALSE})]   [(SOURCE_ROUTE = {ON  OFF  YES  NO})]   [(TYPE_OF_SERVICE = {RDB_DATABASE  ORACLE8_DATABASE})] 

A description entry combines one or more addresses, or one or more address lists, with a set of connection data.

Parameters

ADDRESS_LIST

Encloses a list of addresses. See the ADDRESS_LIST entry in the next section.

ADDRESS

Defines a protocol address. See the ADDRESS entry later in this appendix.

CONNECT_DATA

Specifies connection data. See the CONNECT_DATA entry later in this appendix.

FAILOVER

Enables or disables connect-time failover for addresses, or address lists, in the description. By default, failover is on. When failover is on, a failure to connect using one address, or address list, causes Net8 to try another address or address list. Net8 works through addresses in order unless client load balancing is used.

LOAD_BALANCE

Enables or disables client load balancing. Load balancing within a description is off by default. When making a new connection with load balancing enabled, Net8 randomly chooses an address list (or address) from the description. If failover is also on, then Net8 randomly progresses from one address list (or address) to another until either all address lists (or addresses) have been tried or a connection is made.

session_data_unit_bytes

The size in bytes of the session data unit . The session data unit is the amount of data that Net8 transfers in one operation. For greatest efficiency, the SDU should be a multiple of the underlying network transport's frame size, which you can set using the TDU parameter. The default SDU value is 2048 bytes. The maximum value is 32,768 (32K) bytes.

Prior to Oracle Release 7.3, SDU and TDU were limited to a maximum of 2048 bytes. Read Chapter 11, for important information on setting these parameters.

transport_data_unit_bytes

The size in bytes of the transport data unit . The transport data unit is the amount of data that the underlying network transport transmits in one operation. The SDU should normally be a multiple of the TDU.

SOURCE_ROUTE

Used to route connections through Connection Manager. The default setting is OFF. When enabled, the description must include two or more addresses (or address lists). The first address (or address list) must point to a Connection Manager instance. Net8 then connects by hopping from one address (or address list) to the next until a database listener is reached.

TYPE_OF_SERVICE

Specifies whether the description connects you to an Oracle database or an Oracle Rdb database. The default value is ORACLE8_DATABASE. This parameter is only needed when connecting to an Oracle Rdb database.

ADDRESS_LIST

 ADDRESS_LIST =   (ADDRESS...)   [(ADDRESS...)   ...]   [(FAILOVER = {ON  OFF  YES  NO  TRUE  FALSE})]   [(LOAD_BALANCE = {ON  OFF  YES  NO  TRUE  FALSE})]   [(SOURCE_ROUTE = {ON  OFF  YES  NO})] 

An address list is used to enclose a list of addresses associated with a description.

Parameters

ADDRESS

Specifies a protocol address. See the ADDRESS entry in the next section.

FAILOVER

Enables or disables connect-time failover for addresses in the address list. By default, failover is on. When failover is on, a failure to connect using one address causes Net8 to try another address in the list. Net8 works through addresses in order unless client load balancing is used.

LOAD_BALANCE

Enables or disables client load balancing. Load balancing within an address list is off by default. When making a new connection with load balancing enabled, Net8 randomly chooses an address from the address list. If failover is also on, then Net8 randomly progresses from one address to another until either all addresses have been tried or a connection is made.

SOURCE_ROUTE

Used to route connections through Connection Manager. The default setting is OFF. When enabled, the address list must include two or more addresses. The first address must point to a Connection Manager instance. Net8 then connects by hopping from one address to the next until a database listener is reached.

ADDRESS

 ADDRESS =  address_data address_data  (TCP/IP) :=    (PROTOCOL = TCP)(HOST={  hostname   ip_address  })(PORT =  port_number  )  address_data  (IPC) :=    (PROTOCOL = IPC)(KEY =  key_name  )  address_data  (SPX) :=    (PROTOCOL = SPX)(SERVICE =  spx_service_name  )  address_data  (Named Pipes) :=    (PROTOCOL = NMP)(SERVER =  server_name  )(PIPE =  pipe_name  ) 

Specifies a protocol address. Typically, a protocol address from a tnsnames.ora file is used to contact a Net8 listener running on a remote server. In an address list, a protocol address list may also point to a Connection Manager instance.

When a protocol address is used to connect to a Net8 listener, the protocol address specified in tnsnames.ora must match one of the addresses that the listener is monitoring. These are defined in the listener's listener.ora file. Similarly, when connections go through Connection Manager, the protocol address must match an address specified in cman.ora .

Parameters

address_data

Protocol-specific address data.

host_name

A TCP/IP hostname.

ip_address

A TCP/IP address.

port_number

A TCP/IP port number.

key_name

An IPC key name. This should normally match an IPC key name specified in the remote listener's listener.ora file.

spx_service_name

An SPX service name.

server_name

The name of the server on which either the Net8 listener or Connection Manager is running.

pipe_name

The name of the pipe over which you want to communicate. This must correspond to a pipe name defined in the destination listener's listener.ora file.

CONNECT_DATA

 CONNECT_DATA =   [(FAILOVER_MODE...)]   [(GLOBAL_DBNAME =  global_database_name  )]   [(HS = OK)]   [(INSTANCE_NAME =  instance_name  )]   [(RDB_DATABASE =  rdb_filename  )]   [(SERVER = {DEDICATED  SHARED}]   [(SERVICE_NAME =  database_service  )]   [(SID =  system_identifier  )] 

Identifies the database service or instance that is the target of a description. Oracle8 i databases should normally be identified by their service name. Alternatively, you can specify a SID in order to connect to a specific instance.

Parameters

global_database_name

Identifies an Oracle Rdb database. This parameter should only be used when connecting to an Oracle Rdb database.

HS = OK

Tells Net8 that you are connecting to a service that is not an Oracle or Oracle Rdb database. The HS is an acronym for Heterogeneous Services.

instance_name

Identifies a specific Oracle instance to which you want to connect. This is useful when a service has more than one instance, and you want to connect specifically to one of those instances. An instance name should always be specified in conjunction with a service name.

An instance name is usually, but not always, identical to the SID. Instance names are set using the INSTANCE_NAME parameter in the instance's parameter file.

rdb_ filename

Identifies an Oracle Rdb database by its filename. You may include the path and extension as part of the filename.

SERVER

Specifies the type of connection to make to an Oracle database. Valid values are as follows :

DEDICATED

Create a dedicated server connection.

SHARED

Create a shared server connection.

The SERVER=SHARED setting should only be used if MTS is configured for the database instance. Usually if MTS is configured, a shared server connection is made by default. SERVER=DEDICATED allows you to force a dedicated connection to an instance that is configured for MTS.

database_service

Identifies an Oracle8 i database service. This must match a service name specified by an instance's SERVICE_NAMES parameter, or it must match the database's global name.

SID

Allows you to identify an instance by its system identifier. SID may be used in place of SERVICE_NAME. SID may also be used alongside SERVICE_NAME when you need to support both Oracle8 i clients and those using prior versions of the Net8 software with one tnsnames.ora file.

FAILOVER_MODE

 FAILOVER_MODE =   [(BACKUP =  backup_net_service_name  )]   (TYPE = {SESSION  SELECT  NONE})   (METHOD = {BASIC  PRECONNECT})   [(RETRIES =  retry_attempts  )]   [(DELAY =  retry_delay  )] 

This entry is used to implement transparent application failover. See Chapter 8 for a description of this feature.

Parameters

backup_net_service_name

The net service name to use as the backup connection.

TYPE

Specifies the type of failover, which controls what Net8 does when the primary connection fails. Valid values are as follows:

SESSION

Establish a session with the backup instance.

SELECT

Establish a session with the backup instance, reopen cursors for any outstanding SELECT statements, and reposition those cursors so that fetching continues from the point the client was at when the primary connection failed.

NONE

Don't fail over at all. This TYPE option allows you to explicitly specify the default behavior.

METHOD

Specifies when to make the connection to the backup instance. The following values are valid:

BASIC

Establish the connection to the backup instance only if and when the connection to the primary instance fails.

PRECONNECT

Establish the backup connection at the same time as the primary connection. This allows failover to occur more quickly, but it also places a resource demand on the backup instance.

retry_attempts

Specifies the number of attempts to retry a connection to the backup instance when a failover occurs. The default is normally 0, but if a value is specified for DELAY, the default number of retry attempts becomes 5.

retry_delay

Specifies the delay in seconds between retries. The default delay is 1 second.


Team-Fly    
Top


Oracle Net8 Configuration and Troubleshooting
Oracle Net8 Configuration and Troubleshooting
ISBN: 1565927532
EAN: 2147483647
Year: 2000
Pages: 120

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net