Team-Fly |
Oracle Net8 Configuration and Troubleshooting By Jonathan Gennick, Hugo Toledo | |
Table of Contents | |
Appendix B. The tnsnames.ora File |
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.
The name you want to use to tell Net8 to make the connection described here.
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.
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.
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.
See the entry for the DESCRIPTION parameter in the next section.
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.
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.
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.
Encloses a list of addresses. See the ADDRESS_LIST entry in the next section.
Defines a protocol address. See the ADDRESS entry later in this appendix.
Specifies connection data. See the CONNECT_DATA entry later in this appendix.
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.
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.
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.
|
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.
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.
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.
Specifies a protocol address. See the ADDRESS entry in the next section.
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.
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.
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 .
Protocol-specific address data.
A TCP/IP hostname.
A TCP/IP address.
A TCP/IP port number.
An IPC key name. This should normally match an IPC key name specified in the remote listener's listener.ora file.
An SPX service name.
The name of the server on which either the Net8 listener or Connection Manager is running.
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.
Identifies an Oracle Rdb database. This parameter should only be used when connecting to an Oracle Rdb database.
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.
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.
|
Identifies an Oracle Rdb database by its filename. You may include the path and extension as part of the filename.
Specifies the type of connection to make to an Oracle database. Valid values are as follows :
Create a dedicated server connection.
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.
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.
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.
The net service name to use as the backup connection.
Specifies the type of failover, which controls what Net8 does when the primary connection fails. Valid values are as follows:
Establish a session with the backup instance.
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.
Don't fail over at all. This TYPE option allows you to explicitly specify the default behavior.
Specifies when to make the connection to the backup instance. The following values are valid:
Establish the connection to the backup instance only if and when the connection to the primary instance fails.
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.
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.
Specifies the delay in seconds between retries. The default delay is 1 second.
Team-Fly |
Top |