精华内容
下载资源
问答
  • sqlnet.ora

    2019-08-09 19:36:22
    sqlnet.ora # Copyright (c) 1996, 2003, Oracle Corporation. All rights reserved. # # NAME# sqlnet.ora# FUNCTION# Oracle Network Cl...

    # Copyright (c) 1996, 2003, Oracle Corporation. All rights reserved.
    #
    # NAME
    # sqlnet.ora
    # FUNCTION
    # Oracle Network Client startup parameter file example
    # NOTES
    # This file contains examples and instructions for defining all
    # Oracle Network Client parameters. It should be possible to read
    # this file and setup a Client by uncommenting parameter definitions
    # and substituting values. The comments should provide enough
    # explanation to enable a reasonable user to manage his TNS connections
    # without having to resort to 'real' documentation.
    # SECTIONS
    # ONames Client
    # Namesctl
    # Native Naming Adpaters
    # ...
    # MODIFIED
    # ajacobs 09/09/03 - Fix wallet_location parameter
    # ajacobs 01/20/03 - CyberSafe desupport
    # ajacobs 09/17/02 - remove crypto_seed
    # cozhang 03/07/02 - Change connect_time to inbound_connect_time.
    # mhho 01/15/02 - update sample with new parameter changes
    # cozhang 12/04/01 - Add params for DoS timout handling
    # ajacobs 10/23/00 - Remove identix, securid
    # ajacobs 09/07/00 - Update for Oracle Advanced Security encryption/integ
    # tclarke 05/26/00 - bug 515765
    # jtran 03/24/98 - add radius configuration
    # skanjila 06/06/97 - Correct default for Automatic_IPC
    # eminer 05/15/97 - Add the relevant onrsd parameters.
    # asriniva 04/23/97 - Merge with version from doc
    # ggilchri 03/31/97 - mods
    # bvasudev 02/07/97 - Change sqlnet.authentication_services documentation
    # bvasudev 11/25/96 - Merge sqlnet.ora transport related parameters
    # asriniva 11/12/96 - Revise with new OSS parameters.
    # asriniva 11/05/96 - Add ANO parameters.
    # ____________________________________________________________________

    # - ONames Client ----------------------------------------------------
    #
    #names.default_domain = world
    #
    #Syntax: domain-name
    #Default: NULL
    #
    # Indicates the domain from which the client most often requests names. When
    # this parameter is set the default domain name (for example, US.ACME), the
    # domain name will be automatically appended to any unqualified name in an
    # ONAmes request (query, register, deregister, etc). Any name which contains
    # an unescaped dot ('.') will not have the default domain appended. Simple
    # names may be qualified with a trailing dot (for example 'rootserver.').
    #
    #
    #names.initial_retry_timeout = 30
    #
    #Syntax: 1-600 seconds
    #Default: 15 (OSD)
    #
    # Determines how long a client will wait for a response from a Names Server
    # before reiterating the request to the next server in the preferred_servers
    # list.
    #
    #
    #names.max_open_connections = 3
    #
    #Syntax: 3-64
    #Default: ADDRS in preferred_servers
    #
    # Determines how many connections an ONames client may have open at one time.
    # Clients will ordinarily keep connections to servers open once they are
    # established until the operation (or session in namesctl) is complete. A
    # connection will be opened whenever needed, and if the maximum would be
    # exceeded the least recently used connection will be closed.
    #
    #
    #names.message_pool_start_size = 10
    #
    #Syntax: 3-256
    #Default: 10
    #
    # Determines the initial number of messages allocated in the client's message
    # pool. This pool provides the client with pre-allocated messages to be used
    # for requests to ONames servers. Messages which are in the pool and unused
    # may be reused. If a message is needed and no free messages are available in
    # the pool more will be allocated.
    #
    #
    #names.preferred_servers = (address_list =
    # (address=(protocol=ipc)(key=n23))
    # (address=(protocol=tcp)(host=nineva)(port=1383))
    # (address=(protocol=tcp)(host=cicada)(port=1575))
    # )
    #
    #Syntax: ADDR_LIST
    #Default: Well-Known (OSD)
    #
    # Specifies a list of ONames servers in the client's region; requests will be
    # sent to each ADDRESS in the list until a response is recieved, or the list
    # (and number of retries) is exhausted.
    #
    # Addresses of the following form specify that messages to the ONames server
    # should use Oracle Remote Operations (RPC):
    #
    # (description =
    # (address=(protocol=tcp)(host=nineva)(port=1383))
    # (connect_data=(rpc=on))
    # )
    #
    #
    #
    #names.request_retries = 2
    #
    #Syntax: 1-5
    #Default: 1
    #
    # Specifies the number of times the client should try each server in the list
    # of preferred_servers before allowing the operation to fail.
    #
    #
    #names.directory_path
    #
    #Syntax: <adapter-name>
    #Default: TNSNAMES,ONAMES,HOSTNAME
    #
    # Sets the (ordered) list of naming adaptors to use in resolving a name.
    # The default is as shown for 3.0.2 of sqlnet onwards. The default was
    # (TNSNAMES, ONAMES) before that. The value can be presented without
    # parentheses if only a single entry is being specified. The parameter is
    # recognized from version 2.3.2 of sqlnet onward. Acceptable values include:
    # TNSNAMES -- tnsnames.ora lookup
    # ONAMES -- Oracle Names
    # HOSTNAME -- use the hostname (or an alias of the hostname)
    # NIS -- NIS (also known as "yp")
    # CDS -- OSF DCE's Cell Directory Service
    # NDS -- Novell's Netware Directory Service
    #
    # - Client Cache (ONRSD) ---------------------------------------------
    #names.addresses = (ADDRESS=(PROTOCOL=IPC)(KEY=ONAMES))
    #
    #Syntax: ADDR
    #Default: (ADDRESS=(PROTOCOL=IPC)(KEY=ONAMES))
    #
    # Address on which the client cache listens (is available to clients).
    # Any valid TNS address is allowed. The default should be used if at
    # all possible; clients have this entry hardwired as the first line
    # of their server-list file (sdns.ora). If the address is set to a
    # non-default value the client's preferred_servers parameter should
    # be set to include the client-cache address first.
    #
    #
    #names.authority_required = False
    #
    #Syntax: T/F
    #Default: False
    #
    # Determines whether system querys (for the root etc) require Authoritative
    # answers.
    #
    #
    #names.auto_refresh_expire = 259200
    #
    #Syntax: Number of seconds, 60-1209600
    #Default: 259200
    #
    # This is the amount of time (in seconds) the server will cache the addresses
    # of servers listed in server-list file (sdns.ora). When this time expires the
    # server will issue another query to the servers in those regions to refresh
    # the data.
    #
    #
    #names.auto_refresh_retry = 180
    #
    #Syntax: Number of seconds, 60-3600
    #Default: sec. 180
    #
    # This set how often the server will retry when the auto_refresh query fails.
    #
    #
    #names.cache_checkpoint_file = cache.ckp
    #
    #Syntax: filename
    #Default: $ORACLE_HOME/network/names/ckpcch.ora
    #
    # Specifies the name of the operating system file to which the Names Server
    # writes its foreign data cache.
    #
    #
    #names.cache_checkpoint_interval = 7200
    #
    #Syntax: Number of seconds, 10-259200
    #Default: 0 (off)
    #
    # Indicates the interval at which a Names Server writes a checkpoint of its
    # data cache to the checkpoint file.
    #
    #
    #names.default_forwarders=
    # (FORWARDER_LIST=
    # (FORWARDER=
    # (NAME= rootserv1.world)
    # (ADDRESS=(PROTOCOL=tcp)(PORT=42100)(HOST=roothost))))
    #
    #Syntax: Name-Value/address_list
    #Default: NULL
    #
    # A list (in NV form) of the addresses of other servers which should be used to
    # forward querys while in default_forwarder (slave) mode. NAME is the global
    # names for the server to which forwards whould be directed, and ADDRESS is its
    # address.
    #
    #
    #names.default_forwarders_only = True
    #
    #Syntax: T/F
    #Default: False
    #
    # When set to true this server will use the servers listed in default_forwarders
    # to forward all operations which involve data in foreign regions. Otherwise it
    # will use the servers defined in the server-list file (sdns.ora) in addition
    # to any defined in the default_forwarders parameter.
    #
    #
    #names.log_directory = /oracle/network/log
    #
    #Syntax: directory
    #Default: $ORACLE_HOME/network/log
    #
    # Indicates the name of the directory where the log file for Names Server
    # operational events are written.
    #
    #
    #names.log_file = names.log
    #
    #Syntax: filename
    #Default: names.log
    #
    # The name of the output file to which Names Server operational events are
    # written.
    #
    #names.log_stats_interval = 3600
    #
    #Syntax: Number of seconds, 10-ub4max
    #Default: sec. 0 (off)
    #
    #Specifies the number of seconds between statistical entries in log file.
    #
    #names.log_unique = False
    #
    #Syntax: T/F
    #Default: False
    #
    # If set to true the server will guarantee that the log file will have a unique
    # name which will not overwrite any existing files (note that log files are
    # appended to, so log information will not be lost if log_unique is not true).
    #
    #names.max_open_connections = 10
    #
    #Syntax: 3-64
    #Default: 10
    #
    # Specifies the number of connections that the Names Server can have open at any
    # given time. The value is generated as the value 10 or the sum of one
    # connection for listening, five for clients, plus one for each foreign domain
    # defined in the local administrative region, whichever is greater. Any
    # operation which requires the server to open a network connection will use
    # an already open connection if it is available, or will open a connection
    # if not. Higher settings will save time and cost network resources; lower
    # settings save network resources, cost time.
    #
    #
    #names.max_reforwards = 2
    #
    #Syntax: 1-15
    #Default: 2
    #
    # The maximum number of times the server will attempt to forward a certain
    # operation.
    #
    #
    #names.message_pool_start_size = 24
    #
    #Syntax: 3-256
    #Default: 10
    #
    # Determines the initial number of messages allocated in the server's message
    # pool. This pool provides the server with pre-allocated messages to be used
    # for incoming or outgoing messages (forwards). Messages which are in the pool
    # and unused may be reused. If a message is needed and no free messages are
    # available in the pool more will be allocated.
    #
    #
    #names.no_modify_requests = False
    #
    #Syntax: T/F
    #Default: False
    #
    # If set to true, the server will refuse any operations which modify the
    # data in its region (it will still save foreign info in the cache which is
    # returned from foreign querys).
    #
    #
    #names.password = 625926683431AA55
    #
    #Syntax: encrypted string
    #Default: NULL
    #
    # If set the server will require that the user provide a password in his
    # namesctl session (either with sqlnet.ora:namesctl.server_password or 'set
    # password') in order to do 'sensitive' operations, like stop, restart, reload.
    # This parameter is generally set in encrypted form, so it can not be set
    # manually.
    #
    #names.reset_stats_interval = 3600
    #
    #Syntax: 10-ub4max
    #Default: 0 (off)
    #
    # Specifies the number of seconds during which the statistics collected by the
    # Names Servers should accumulate. At the frequency specified, they are reset
    # to zero. The default value of 0 means never reset statistics.
    #
    #
    #names.trace_directory = /oracle/network/trace
    #
    #Syntax: directory
    #Default: $ORACLE_HOME/network/trace
    #
    # Indicates the name of the directory to which trace files from a Names Server
    # trace session are written.
    #
    #
    #names.trace_file = names.trc
    #
    #Syntax: filename
    #Default: names.trc
    #
    # Indicates the name of the output file from a Names Server trace session.
    #
    #
    #names.trace_func # NA
    #
    #Syntax: T/F
    #Default: False
    #
    # Internal mechanism to control tracing by function name.
    #
    #
    #names.trace_level = ADMIN
    #
    #Syntax: T/F
    #Default: False
    #
    #Syntax: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    #
    # Indicates the level at which the Names Server is to be traced.
    # Available Values:
    # 0 or OFF - No trace output
    # 4 or USER - User trace information
    # 10 or ADMIN - Administration trace information
    # 16 or SUPPORT - WorldWide Customer Support trace information
    #
    #
    #names.trace_mask = (200,201,202,203,205,206,207)
    #
    #Syntax: list of numbers
    #Default: NULL
    #
    # Internal mechanism to control trace behavior.
    #
    #
    #names.trace_unique = True
    #
    #Syntax: T/F
    #Default: False
    #
    # Indicates whether each trace file has a unique name, allowing multiple trace
    # files to coexist. If the value is set to ON, a process identifier is appended
    # to the name of each trace file generated.
    #
    #
    # - Namesctl ---------------------------------------------------------
    #
    #namesctl.trace_directory = /oracle/network/trace
    #
    #Syntax: directory
    #Default: $ON/trace
    #
    # Indicates the name of the directory to which trace files from a namesctl
    # trace session are written.
    #
    #
    #namesctl.trace_file = namesctl.trc
    #
    #Syntax: filename
    #Default: namesctl.trc
    #
    # Indicates the name of the output file from a namesctl trace session.
    #
    #
    #namesctl.trace_func # NA
    #
    #Syntax: word list
    #Default: NULL
    #
    # Internal mechanism to control tracing by function name.
    #
    #
    #namesctl.trace_level = ADMIN
    #
    #Syntax: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    #
    # Indicates the level at which the namesctl is to be traced.
    # Available Values:
    # 0 or OFF - No trace output
    # 4 or USER - User trace information
    # 10 or ADMIN - Administration trace information
    # 16 or SUPPORT - WorldWide Customer Support trace information
    #
    #
    #namesctl.trace_mask # NA
    #
    #Syntax: number list
    #Default: NULL
    #
    # Internal mechanism to control trace behavior.
    #
    #
    #namesctl.trace_unique = True
    #
    #Syntax: T/F
    #Default: False
    #
    # Indicates whether each trace file has a unique name, allowing multiple trace
    # files to coexist. If the value is set to ON, a process identifier is appended
    # to the name of each trace file generated.
    #
    #
    #namesctl.no_initial_server = False
    #
    #Syntax: T/F
    #Default: False
    #
    # If set to TRUE namesctl will suppress any error messages when namesctl is
    # unable to connect to a default names server.
    #
    #
    #namesctl.internal_use = True
    #
    #Syntax: T/F
    #Default: False
    #
    # If set to true namesctl will enable a set of internal undocumented commands.
    # All internal commands are preceded by an underscore ('_') in order to
    # distinguish them as internal. Without going into details, the commands
    # enabled are:
    #
    # _add_data _create_name _delete_name
    # _full_status _ireplace_data _newttl_name
    # _pause _remove_data _rename_name
    # _replace_data _start _walk*
    #
    # There are also a set of names server variables which may be set when
    # namesctl is in internal mode:
    #
    # _authority_required _auto_refresh*
    # _cache_checkpoint_interval _cache_dump
    # _default_autorefresh_expire _default_autorefresh_retry
    # _default_forwarders_only _forwarding_desired
    # _max_reforwards _modify_ops_enabled
    # _next_cache_checkpoint _next_cache_flush
    # _next_stat_log _next_stat_reset
    # _reload _request_delay
    # _restart _shutdown
    #
    #
    #namesctl.noconfirm = True
    #
    #Syntax: T/F
    #Default: False
    #
    # When set to TRUE namesctl will suppress the confirmation prompt when
    # sensitive operations (stop, restart, reload) are requested. This is
    # quite helpful when using namesctl scripts.
    #
    #
    #namesctl.server_password = mangler
    #
    #Syntax: string
    #Default: NULL
    #
    # Automatically sets the password for the names server in order to perform
    # sensitive operations (stop, restart, reload). The password may also be
    # set manually during a namesctl session using 'set password'.
    #
    #
    #namesctl.internal_encrypt_password = False
    #
    #Syntax: T/F
    #Default: True
    #
    # When set to TRUE namesctl will not encrypt the password when it is sent to
    # the names server. This would enable an unencrypted password to be set in
    # names.ora:names.server_password
    #
    # - Native Naming Adpaters -------------------------------------------
    #
    #names.dce.prefix = /.:/subsys/oracle/names
    #
    #Syntax: DCE cell name
    #Default: /.:/subsys/oracle/names
    #
    #Specifies the DCE cell (prefix) to use for name lookup.
    #
    #
    #names.nds.name_context = personnel.acme
    #
    #Syntax: NDS name
    #Default: (OSD?)
    #
    # Specifies the default NDS name context in which to look for the name to
    # be resolved.
    #
    #
    #names.nis.meta_map # NA
    #
    # Syntax: filename
    # Default: sqlnet.maps
    #
    # Specifies the file to be used to map NIS attributes to an NIS mapname.
    # Currently unused.

    # - Oracle Advanced Security Authentication Adapters ----------------

    #sqlnet.authentication_services
    #
    # Syntax: A single value or a list from {beq, none, all, kerberos5,
    # radius, nts}
    # Default: NONE
    #
    # Enables one or more authentication services. If
    # Oracle Advanced Security has been installed with Kerberos5
    # support, using (beq, kerberos5) would enable authentication via
    # Kerberos.
    #
    #sqlnet.authentication_services=(beq, kerberos5)

    ##
    ## Parmeters used with Kerberos adapter.
    ##

    #sqlnet.kerberos5_cc_name
    #
    # Syntax: Any valid pathname.
    # Default: /tmp/krb5cc_<uid>
    #
    # The Kerberos credential cache pathname.
    #
    #sqlnet.kerberos5_cc_name=/tmp/mycc

    #sqlnet.kerberos5_clockskew
    #
    # Syntax: Any positive integer.
    # Default: 300
    #
    # The acceptable difference in the number of seconds between when a
    # credential was sent and when it was received.
    #
    #sqlnet.kerberos5_clockskew=600

    #sqlnet.kerberos5_conf
    #
    # Syntax: Any valid pathname.
    # Default: /krb5/krb.conf
    #
    # The Kerberos configuration pathname.
    #
    #sqlnet.kerberos5_conf=/tmp/mykrb.conf

    #sqlnet.kerberos5_realms
    #
    # Syntax: Any valid pathname
    # Default: /krb5/krb.realms
    #
    # The Kerberos host name to realm translation file.
    #
    #sqlnet.kerberos5_realms=/tmp/mykrb.realms

    #sqlnet.kerberos5_keytab
    #
    # Syntax: Any valid pathname.
    # Default: /etc/v5srvtab
    #
    # The Kerberos secret key file.
    #
    #sqlnet.kerberos5_keytab=/tmp/myv5srvtab

    #sqlnet.authentication_kerberos5_service
    #
    # Syntax: Any string.
    # Default: A default is not provided.
    #
    # The Kerberos service name.
    #
    #sqlnet.authentication_kerberos5_service=acme

    ##
    ## Parameters used with Radius adapter
    ##

    # Need to specify the location of the Radius server
    #sqlnet.radius_authentication = localhost

    # Need to specify the port address of the Radius server
    #sqlnet.radius_authentication_port = 1654

    # If your radius server support accounting, you can enable it
    #sqlnet.radius_accounting = off

    # Turn on/off challenge response
    #sqlnet.radius_challenge_response = off

    # Keyword to request a challenge from Radius server.
    # If you use activcard, enter activcard

    # If you use something else, enter challenge
    #sqlnet.radius_challenge_keyword = challenge

    # Enter the name of the client interface you want to use for challenge response
    #sqlnet.radius_authentication_interface = DefaultRadiusInterface

    # Where is the secret file locate
    #sqlnet.radius_secret = $ORACLE_HOME/security/radius.key

    # - Oracle Advanced Security Network Security -------------------------

    #sqlnet.crypto_checksum_client
    #sqlnet.crypto_checksum_server
    #sqlnet.encryption_client
    #sqlnet.encryption_server
    #
    # These four parameters are used to specify whether a service (e.g.
    # crypto-checksumming or encryption) should be active:
    #
    # Each of the above parameters defaults to ACCEPTED.
    #
    # Each of the above parameters can have one of four possible values:
    #
    # value meaning
    #
    # ACCEPTED The service will be active if the other side of the
    # connection specifies "REQUESTED" or REQUIRED" and
    # there is a compatible algorithm available on the other
    # side; it will be inactive otherwise.
    #
    # REJECTED The service must not be active, and the connection
    # will fail if the other side specifies "REQUIRED".
    #
    # REQUESTED The service will be active if the other side specifies
    # "ACCEPTED", "REQUESTED", or "REQUIRED" and there is a
    # compatible algorithm available on the other side; it
    # will be inactive otherwise.
    #
    # REQUIRED The service must be active, and the connection will
    # fail if the other side specifies "REJECTED" or if there
    # is no compatible algorithm on the other side.
    #
    #sqlnet.crypto_checksum_types_client
    #sqlnet.crypto_checksum_types_server
    #sqlnet.encryption_types_client
    #sqlnet.encryption_types_server
    #
    # These parameters control which algorithms will be made available for
    # each service on each end of a connection:
    #
    # The value of each of these parameters can be either a parenthesized
    # list of algorithm names separated by commas or a single algorithm
    # name.
    #
    # Encryption types can be: AES256, RC4_256, AES192, 3DES168, AES128,
    # RC4_128,3DES112, RC4_56, DES, RC4_40, DES40
    #
    # Encryption defaults to all the algorithms.
    #
    # Crypto checksum types can be: SHA1, MD5
    #
    # Crypto checksum defaults to all the algorithms.
    #
    #sqlnet.crypto_checksum_server = required
    #sqlnet.encryption_server = required
    #
    #
    #ssl_server_dn_match
    #
    # Systax: ON/OFF
    # Default: OFF
    #
    # The ssl_server_dn_match parameter determines SSL behavior when the
    # server's distinguished name does not match the service name. When
    # set to ON, the names must match for a connection to be established.
    # Leaving the parameter on OFF allows connection to servers where
    # the names do not match. However, this may potentially allow servers
    # to fake their identity.
    #
    #
    #ssl_client_authentication
    #
    # Syntax: TRUE/FALSE
    # Default: TRUE
    #
    # The ssl_client_authentication parameter controls whether the client
    # is authenticated using SSL. This parameter should be set to FALSE if
    # using a cipher suite that contains Diffie-Hellman anonymous
    # authentication (DH_anon) or if using other non-SSL authentication
    # methods.
    #
    #ssl_cipher_suites
    #
    # Syntax: (SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_RC4_128_SHA,
    # SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_DES_CBC_SHA,
    # SSL_DH_anon_WITH_3DES_EDE_CBC_SHA, SSL_DH_anon_WITH_RC4_128_MD5,
    # SSL_DH_anon_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5,
    # SSL_RSA_EXPORT_WITH_DES40_CBC_SHA,
    # SSL_DH_anon_EXPORT_WITH_RC4_40_MD5,
    # SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA)
    # Default: All cipher suites enabled
    #
    # ssl_cipher_suites defines a list of cipher suites used to negotiate
    # an SSL connection in order of priority. The cipher suites selected for
    # a server must be compatible with those required by the client.
    #
    #ssl_version
    #
    # Syntax: 0/2.0/3.0
    # Default: 0 (impiles 3.0)
    #
    # The ssl_version parameter defines the version of SSL that must
    # run on the systems with which the client communicates.
    #
    # - SSL ---------------------------------------------------------------------

    #my_wallet
    #
    # Syntax: A properly formatted NLNV list.
    # Default: Platform specific. Unix: $HOME/oracle/oss
    #
    # The method for retrieving and storing my identity.
    #
    #my_wallet
    # =(source
    # =(method=file)
    # (method_data=/dve/asriniva/oss/wallet)
    # )

    # - Sqlnet(v2.x) and Net3.0 Client ------------------------------------------

    #
    # In the following descriptions, the term "client program" could mean
    # either sqlplus, svrmgrl or any other OCI programs written by users
    #
    ###########################
    #trace_level_client = ADMIN
    ###########################
    #
    #Possible values: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    #
    #Purpose: Indicates the level at which the client program
    # is to be traced.
    # Available Values:
    # 0 or OFF - No Trace output
    # 4 or USER - User trace information
    # 10 or ADMIN - Administration trace information
    # 16 or SUPPORT - Worldwide Customer Support trace information
    #
    #Supported since: v2.0
    #
    ###############################################
    #trace_directory_client = /oracle/network/trace
    ###############################################
    #
    #Possible values: Any valid directory path with write permission
    #Default: $ORACLE_HOME/network/trace ($ORACLE_HOME=/oracle at customer
    # site)
    #
    #Purpose: Indicates the name of the directory to which trace files from
    # the client execution are written.
    #
    #Supported since: v2.0
    #
    ###################################################
    #trace_file_client = /oracle/network/trace/cli.trc
    ###################################################
    #
    #Possible values: Any valid file name
    #Default: $ORACLE_HOME/network/trace/cli.trc ($ORACLE_HOME =
    # /oracle at customer site)
    #
    #Purpose: Indicates the name of the file to which the execution trace
    # of the client is written to.
    #
    #Supported since: v2.0
    #
    ###########################
    #trace_unique_client = ON
    ###########################
    #
    #Possible values: {ON, OFF}
    #Default: OFF
    #
    #Purpose: Used to make each client trace file have a unique name to
    # prevent each trace file from being overwritten by successive
    # runs of the client program
    #
    #Supported since: v2.0
    #
    ###########################################
    #log_directory_client = /oracle/network/log
    ###########################################
    #
    #Possible values: Any valid directory pathname
    #Default: $ORACLE_HOME/network/log ($ORACLE_HOME = /oracle at customer
    # site)
    #
    #Purpose: Indicates the name of the directory to which the client log file
    # is written to.
    #
    #
    #Supported since: v2.0
    #
    ################
    #log_file_client = /oracle/network/log/sqlnet.log
    ################
    #
    #Possible values: This is a default value, u cannot change this
    #Default: $ORACLE_HOME/network/log/sqlnet.log ($ORACLE_HOME=/oracle in
    # customer site)
    #
    #Purpose: Indicates the name of the log file from a client program
    #
    #Supported since: v2.0
    #
    #############################################
    #log_directory_server = /oracle/network/trace
    #############################################
    #
    #Possible values: Any valid diretcory path with write permission
    #Default: $ORACLE_HOME/network/trace ( $ORACLE_HOME=/oracle at customer
    # site)
    #
    #Purpose: Indicates the name of the directory to which log files from the
    # server are written
    #
    #Supported since: v2.0
    #
    ###############################################
    #trace_directory_server = /oracle/network/trace
    ###############################################
    #
    #Possible values: Any valid directory path with write permission
    #Default: $ORACLE_HOME/network_trace ( $ORACLE_HOME=/oracle at customer
    # site)
    #
    #Purpose: Indicates the name of the directory to which trace files from
    # the server are written
    #
    #Supported since: v2.0
    #
    #######################################################
    #trace_file_server = /orace/network/trace/svr_<pid>.trc
    #######################################################
    #
    #Possible values: Any valid filename
    #Default: $ORACLE_HOME/network/trace/svr_<pid>.trc where <pid? stands for
    # the process id of the server on UNIX systems
    #
    #Purpose: Indicates the name of the file to which the execution trace of
    # the server program is written to.
    #
    #Supported since: v2.0
    #
    ###########################
    #trace_level_server = ADMIN
    ###########################
    #
    #Possible values: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    #
    #Purpose: Indicates the level at which the server program
    # is to be traced.
    # Available Values:
    # 0 or OFF - No Trace output
    # 4 or USER - User trace information
    # 10 or ADMIN - Administration trace information
    # 16 or SUPPORT - Worldwide Customer Support trace information
    #
    #Supported since: v2.0
    #
    ##########################
    #use_dedicated_server = ON
    ##########################
    #
    #Possible values: {OFF,ON}
    #Default: OFF
    #
    #Purpose: Forces the listener to spawn a dedicated server process for
    # sessions from this client program.
    #
    #Supported since: v2.0
    #
    ################
    #use_cman = TRUE
    ################
    #
    #Possible values: {TRUE, FALSE}
    #Default: FALSE
    #
    #Purpose:
    #
    #Supported since: v3.0
    #
    ################################################
    #tnsping.trace_directory = /oracle/network/trace
    ################################################
    #
    #Possible values: Any valid directory pathname
    #Default: $ORACLE_HOME/network/trace ($ORACLE_HOME=/oracle at customer
    # site)
    #
    #Purpose: Indicates the directory to which the execution trace from
    # the tnsping program is to be written to.
    #
    #Supported since: v2.0
    #
    ############################
    #tnsping.trace_level = ADMIN
    ############################
    #
    #Possible values: {OFF,USER,ADMIN,0-16}
    #Default: OFF (0)
    #
    #Purpose: Indicates the level at which the server program
    # is to be traced.
    # Available Values:
    # 0 or OFF - No Trace output
    # 4 or USER - User trace information
    # 10 or ADMIN - Administration trace information
    # 16 or SUPPORT - Worldwide Customer Support trace information
    #
    #
    #Supported since: v2.0
    #
    ########################
    #sqlnet.expire_time = 10
    ########################
    #
    #Possible values: 0-any valid positive integer! (in minutes)
    #Default: 0 minutes
    #Recommended value: 10 minutes
    #
    #Purpose: Indicates the time interval to send a probe to verify the
    # client session is alive (this is used to reclaim watseful
    # resources on a dead client)
    #
    #Supported since: v2.1
    #
    #######################################
    #sqlnet.client_registration = <unique_id>
    #######################################
    #
    #Possible values:
    #Default: OFF
    #
    #Purpose: Sets a unique identifier for the client machine. This
    # identifier is then passed to the listener with any connection
    # request and will be included in the Audit Trail. The identifier
    # can be any alphanumeric string up to 128 characters long.
    #
    #Supported since: v2.3.2
    #
    ######################
    #bequeath_detach = YES
    ######################
    #
    #Possible values: {YES,NO}
    #Default: NO
    #
    #Purpose: Turns off signal handling on UNIX systems. If signal handling
    # were not turned off and if client programs written by users make
    # use of signal handling they could interfere with Sqlnet/Net3.
    #
    #Supported since: v2.3.3
    #
    ####################
    #automatic_ipc = OFF
    ####################
    #
    #Possible values: {ON,OFF}
    #Default: OFF
    #
    #Purpose: Force a session to use or not to use IPC addresses on the
    # client's node.
    #
    #Supported since: v2.0
    #
    ####################
    #disable_oob = ON
    ####################
    #
    #Possible values: {ON,OFF}
    #Default: OFF
    #
    #Purpose: If the underlying transport protocol (TCP, DECnet,...) does
    # not support Out-of-band breaks, then disable out-of-band
    # breaks
    #
    #Supported since: v2.0
    #
    ####################
    #sqlnet.inbound_connect_timeout = 3
    ########################
    #
    #Possible values: 0-any valid positive integer (in seconds)
    #Default: 0
    #Recommended value: 3 seconds (note: this is highly application dependent)
    #
    #Purpose: Indicates the time interval within which database authentication
    # for a client must be completed. If the client fails to complete
    # authentication within the given time period, then the database
    # server will drop the client connection. This can be used to
    # counter Denial of Service attacks in which malicious clients may
    # cause numerous servers to be spawn without fully establishing DB
    # sessions.
    #
    # A value of 0 turns off the timeout feature. If a spurious
    # timeout error occurs (e.g. due to a slow network/system),
    # reconfigure this parameter to a larger value.
    #
    #Supported since: v9.2
    #

    posted on 2013-07-03 22:00 Alexy Young 阅读(...) 评论(...) 编辑 收藏

    转载于:https://www.cnblogs.com/alexy/p/sqlnet.html

    展开全文
  • listener.ora sqlnet.ora tnsnames.ora文件详解
  • Oracle环境变量、监听listener.ora、tnsnames.ora、sqlnet.ora配置 点击(此处)折叠或打开 ...
        

    Oracle环境变量、监听listener.ora、tnsnames.ora、sqlnet.ora配置


    点击(此处)折叠或打开

    1. NLS_DATE_FORMAT=YYYY-MM-DD HH24:mi:ss
    2. NLS_LANG=AMERICAN_CHINA.ZHS16GBK
    3. ORACLE10G=D:\Program files\app\oracle\product\10.2.0\db_1
    4. ORACLE11G=D:\Program files\app\oracle\product\11.2.0.1\dbhome_1
    5. ORACLE8I=D:\Program files\app\oracle\product\ora8i
    6. ORACLE9I=D:\Program files\app\oracle\product\ora92
    7. ORACLE_HOME=D:\Program files\app\oracle\product\11.2.0.1\dbhome_1
    8. PATH=%ORACLE_HOME%\bin
    9. TNS_ADMIN=%ORACLE_HOME%\NETWORK\ADMIN




    10. ---------cmd下设置用户环境变量
    11. SETX "NLS_DATE_FORMAT" "YYYY-MM-DD HH24:MI:SS"
    12. SETX "NLS_LANG" "AMERICAN_CHINA.ZHS16GBK"
    13. SETX "ORACLE10G" "D:\Program files\app\oracle\product\10.2.0\db_1"
    14. SETX "ORACLE11G" "D:\Program files\app\oracle\product\11.2.0.1\dbhome_1"
    15. SETX "ORACLE8I" "D:\Program files\app\oracle\product\ora8i"
    16. SETX "ORACLE9I" "D:\Program files\app\oracle\product\ora92"
    17. SETX "ORACLE_HOME" "D:\Program files\app\oracle\product\11.2.0.1\dbhome_1"
    18. SETX "TNS_ADMIN" "%ORACLE_HOME%\NETWORK\ADMIN"
    19. SETX "Path" "%ORACLE_HOME%\bin"
    20. SETX "VBOX_MSI_INSTALL_PATH" "D:\Program Files\Oracle\VirtualBox"



    21. alter session set nls_language='SIMPLIFIED CHINESE';
    22. alter system set nls_language='AMERICAN' scope=spfile;




    23. ------------------------------------ sqlnet.ora----------------------------------------------
    24. ---------- windows
    25. SQLNET.AUTHENTICATION_SERVICES= (NTS)
    26. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    27. ---------- linux
    28. SQLNET.AUTHENTICATION_SERVICES= (ALL)
    29. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)



    30. --------------------------------------------------------------------- oracle
    31. # .bash_profile

    32. # Get the aliases and functions
    33. if [ -f ~/.bashrc ]; then
    34.     . ~/.bashrc
    35. fi

    36. # User specific environment and startup programs

    37. export PATH=$PATH:/sbin/:$HOME/bin

    38.   
    39. # for oracle user

    40. unset USERNAME

    41. export GLOBAL_DB_UNIQUE_NAME=orclasm
    42. export ORACLE_HOSTNAME=192.168.128.134
    43. export ORACLE_UNQNAME=orclasm

    44. export EDITOR=vi
    45. export ORACLE_SID=orclasm
    46. export ORACLE_BASE=/u01/app/oracle
    47. export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
    48. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    49. export ORACLE_ALERT=$ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace
    50. export PATH=$ORACLE_HOME/bin:$PATH
    51. export TNS_ADMIN=$ORACLE_HOME/network/admin
    52. export ORACLE_PATH=.:$ORACLE_BASE/dba_scripts/sql:$ORACLE_HOME/rdbms/admin
    53. umask 022

    54. #export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"    SELECT userenv('LANGUAGE') db_NLS_LANG FROM DUAL;
    55. export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
    56. export SQLPATH=$ORACLE_HOME/sqlplus/admin
    57. export NLS_DATE_FORMAT='YYYY-MM-DD HH24:mi:ss';

    58. alias sqlplus='rlwrap sqlplus'
    59. alias rman='rlwrap rman'
    60. alias asmcmd='rlwrap asmcmd'
    61. alias alert_log='tail -200f $ORACLE_ALERT/alert_$ORACLE_SID.log'
    62. alias alert_xml='tail -200f $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/alert/log.xml'
    63. alias alert_listener='tail -200f $ORACLE_BASE/diag/tnslsnr/rhel6/listener/trace/listener.log'


    64.  



    65. stty erase ^h
    66. ORACLE_HOME=D:\Program files\app\oracle\product\11.2.0.1\dbhome_1
    67. PATH=%ORACLE_HOME%\bin
    68. TNS_ADMIN=%ORACLE_HOME%\NETWORK\ADMIN
    69. ##NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
    70. NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
    71. #ORACLE_SCRIPT=%ORACLE_HOME%\RDBMS\ADMIN
    72. SQLPATH=.;%ORACLE_BASE%\dba_scripts\sql;%ORACLE_HOME%\rdbms\admin


    73. NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280"
    74. NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
    75. NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
    76. NLS_LANG=AMERICAN_AMERICA.UTF8
    77. NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    78. NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
    79. NLS_LANG=AMERICAN_CHINA.ZHS16GBK


    80. NLS_DATE_FORMAT='YYYY-MM-DD HH24:mi:ss'




    81. --------------------------------------------------------------------- grid

    82. # .bash_profile

    83. # Get the aliases and functions
    84. if [ -f ~/.bashrc ]; then
    85.         . ~/.bashrc
    86. fi

    87. # User specific environment and startup programs

    88. export PATH=$PATH:$HOME/bin


    89. # for grid user
    90. export ORACLE_SID=+ASM
    91. export ORACLE_BASE=/u01/app/grid
    92. export ORACLE_HOME=/u01/app/grid/11.2.0
    93. export LD_LIBRARY_PATH=$ORACLE_HOME/lib
    94. export PATH=$ORACLE_HOME/bin:$PATH
    95. umask 022


    96. alias sqlplus='rlwrap sqlplus'
    97. alias asmcmd='rlwrap asmcmd'
    98. alias alert_log='tail -200f $ORACLE_BASE/diag/asm/+asm/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
    99. alias crsd_log='tail -200f $ORACLE_HOME/log/$HOSTNAME/crsd/crsd.log'



    100. 在linux和unix上有时不知道该使用LD_LIBRARY_PATH还是LIBPATH,经过搜索和实际使用,实际的情况如下

    101. OS Environment Variable                Name
    102. Linux                        LD_LIBRARY_PATH
    103. Solaris 32-bit ruby                LD_LIBRARY_PATH_32 or LD_LIBRARY_PATH
    104. Solaris 64-bit ruby                LD_LIBRARY_PATH_64 or LD_LIBRARY_PATH
    105. HP-UX PA-RISC 32-bit ruby            SHLIB_PATH
    106. HP-UX PA-RISC 64-bit ruby            LD_LIBRARY_PATH
    107. HP-UX IA64                    LD_LIBRARY_PATH
    108. Mac OS X                    DYLD_LIBRARY_PATH
    109. AIX                        LIBPATH



    110. -----------------------------------------------------------------------------------------------
    111. ------------------------------------listener.ora--------------------------------------------
    112. --动态监听: alter system set LOCAL_LISTENER='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.157)(PORT = 1521))';
    113. -----------------------------------------------------------------------------------------------
    114. # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    115. # Generated by Oracle configuration tools.

    116. LISTENER =
    117.   (DESCRIPTION_LIST =
    118.     (DESCRIPTION =
    119.       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.129)(PORT = 1521))
    120.     )
    121.   )
    122. SID_LIST_LISTENER =
    123.   (SID_LIST =
    124.    (SID_DESC =
    125.       (SID_NAME = PLSExtProc)
    126.       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    127.       (PROGRAM = extproc)
    128.     )
    129.    (SID_DESC =
    130.      (GLOBAL_DBNAME = orcl.lhr.com)
    131.      (SID_NAME = orcl)
    132.      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    133.    )
    134.    (SID_DESC =
    135.      (GLOBAL_DBNAME = rman.lhr.com)
    136.      (SID_NAME = rman)
    137.      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    138.    )
    139.   )

    140. LSNR2 =
    141.   (DESCRIPTION_LIST =
    142.     (DESCRIPTION =
    143.       (ADDRESS_LIST =
    144.         (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.129)(PORT = 1526))
    145.       )
    146.     )
    147.   )
    148. SID_LIST_LSNR2 =
    149.   (SID_LIST =
    150.     (SID_DESC =
    151.       (SID_NAME = PLSExtProc)
    152.       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    153.       (PROGRAM = extproc)
    154.     )
    155.   )

    156. ADR_BASE_LISTENER = /u01/app/oracle


    157. ------------windows 下
    158. SID_LIST_LISTENER =
    159.   (SID_LIST =
    160.     (SID_DESC =
    161.       (SID_NAME = CLRExtProc)
    162.       (ORACLE_HOME = D:\app\oracle\product\11.2.0.1)
    163.       (PROGRAM = extproc)
    164.       (ENVS = "EXTPROC_DLLS=ONLY:D:\app\oracle\product\11.2.0.1\bin\oraclr11.dll")
    165.     )
    166.     (SID_DESC =
    167.      (GLOBAL_DBNAME = orcl.lhr.com)
    168.      (SID_NAME = orcl)
    169.      (ORACLE_HOME = D:\app\oracle\product\11.2.0.1)
    170.    )
    171.   )


    172. -----------------------/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    173. # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    174. # Generated by Oracle configuration tools.

    175. orcl =
    176.   (DESCRIPTION =
    177.     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.133)(PORT = 1521))
    178.     (CONNECT_DATA =
    179.       (SERVER = DEDICATED)
    180.       (SERVICE_NAME = orcl.lhr.com)
    181.     )
    182.   )

    183. #### 动态监听非默认端口
    184. LSNR_ORCL =
    185.   (DESCRIPTION =
    186.     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.129)(PORT = 1526))
    187.     (CONNECT_DATA =
    188.       (SERVICE_NAME = orcl)
    189.     )
    190.   )


    191. -------------------------------------------------------------------- rac
    192. --- TAF BASIC方式
    193. racdb_vip =
    194.   (DESCRIPTION =
    195.     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.132)(PORT = 1521))
    196.     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.131)(PORT = 1521))
    197.     (LOAD_BALANCE = on)
    198.     (CONNECT_DATA =
    199.       (SERVER = DEDICATED)
    200.       (SERVICE_NAME = jmrac)
    201.       (FAILOVER_MODE =
    202.          (TYPE = SELECT)
    203.          (METHOD = BASIC)
    204.          (RETRIES = 180)
    205.          (DELAY = 5)
    206.       )
    207.     )
    208.   )

    209. --- TAF preconnect方式
    210. racdb_vip1 =
    211.   (DESCRIPTION =
    212.     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.131)(PORT = 1521))
    213.     (CONNECT_DATA =
    214.       (SERVER = DEDICATED)
    215.       (SERVICE_NAME = jmrac)
    216.       (FAILOVER_MODE =
    217.          (TYPE = SELECT)
    218.          (METHOD = BASIC)
    219.          (BACKUP = preconnect)
    220.       )
    221.     )
    222.   )

    223. racdb_vip2 =
    224.   (DESCRIPTION =
    225.     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.132)(PORT = 1521))
    226.     (CONNECT_DATA =
    227.       (SERVER = DEDICATED)
    228.       (SERVICE_NAME = jmrac)
    229.       (FAILOVER_MODE =
    230.          (TYPE = SELECT)
    231.          (METHOD = BASIC)
    232.          (BACKUP = preconnect)
    233.       )
    234.     )
    235.   )

    来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2135163/,如需转载,请注明出处,否则将追究法律责任。

    展开全文
  • 一、sqlnet.ora sqlnet.ora 用在oracle client端,用于配置连接服务端oracle的相关参数。 1).NAMES.DEFAULT_DOMAIN:域名domain定义,在你用sqlplus访问数据库的时候,会在tns别名后面加上".domain" 示例:.NAMES.DE....

    一、sqlnet.ora

    sqlnet.ora 用在oracle client端,用于配置连接服务端oracle的相关参数。
    1).NAMES.DEFAULT_DOMAIN:域名domain定义,在你用sqlplus访问数据库的时候,会在tns别名后面加上".domain"

    示例:.NAMES.DEFAULT_DOMAIN=.com

    在客户端执行命令:sqlplus username/password@local_dev的时候,会出现如下错误信息:

    "ORA-12154: TNS: 无法处理服务名"或者"ORA-12154: TNS:could not resolve service name"这样的错误信息。
    因为sqlplus username/password@orcl的时候,将tns别名“orcl”转换成了“orcl.com”,所以orcl.com在tnsnames.ora中找不到,就报错了。

    修改tnsnames.ora中的定义如下:
    ORCL.com =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.147)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
        )
      )
    再执行sqlplus username/password@orcl连接成功。

    2)NAMES.DIRECTORY_PATH:定义了在客户端连接数据库时,采用什么样的匹配方式。

    示例:NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

    那么在客户端执行sqlplus username/password@local_dev连接数据库的时,首先采用tnsnames.ora的别名配置连接数据库;如果连接上;再采用ONAMES进行解析,最后采用主机名进行解析。
    ONAMES表示Oracle使用自己的名称服务器(Oracle Name Server)来解析,目前Oracle建议使用轻量目录访问协议LDAP来取代ONAMES;HOSTNAME表示使用host文件,DNS,NIS等来解析;

    3)SQLNET.AUTHENTICATION_SERVICES:定义登录数据库的认证方式,这个参数默认没有设置。
    示例:SQLNET.AUTHENTICATION_SERVICES=(NONE,NTS)

    NONE表示Oracle数据库身份验证,NTS表示操作系统身份验证,两种方式可以并用,先后顺序表明验证的优先方式。

    4)tcp.validnode_checking=yes:表示启用客户端的IP检查,非法的IP将被拒绝访问Oracle。

    5)tcp.invited_nodes=(IP1,IP2,IP3...):表示允许哪些IP访问Oracle。

    6)tcp.excluded_nodes=(IP1,IP2,IP3...):表示拒绝哪些IP访问Oracle。

    二、tnsnames.ora

    tnsnames.ora 用在oracle client端,用户配置连接数据库的别名参数,就像系统中的hosts文件一样。提供了客户端连接某个数据库的详细信息,主机地址,端口,数据库实例名等。
    示例:
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.147)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
        )
      )
    PROTOCOL参数一般是TCP,可以根据服务器情况选择一种配置方式。

    HOST 一般是ip地址,如果是主机名,则应该在客户端系统的host文件上配好主机名和ip地址的映射关系。

    PORT 标准是1521,根据服务器端的监听端口而定。

    SERVICE_NAME 就是数据库的服务名。

    三、listener.ora

    tnslsnr进程是监听、并接受远程连接数据库请求的监听进程。listener.ora是tnslsnr进程的配置文件,监听的参数都是从该配置文件中读取,该文件位于服务端。如果你只需要在本地连接数据库,不接受远程连接,那么也不需要启动tnslsnr进程,也不需要去维护listener.ora文件。
    启动监听进程的命令,在命令模式下,执行lsnrctl start命令就启动了监听进程tnslsnr。

    示例:
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /oracle/product/10.2.0/db_1)
          (PROGRAM = extproc)
        )
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = /oracle/product/10.2.0/db_1)
          (SID_NAME = orcl)
        )
        (SID_DESC =
          (ORACLE_HOME = /oracle/product/10.2.0/db_1/)
          (SID_NAME = eas)
        )
        
      )

    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.147)(PORT = 1521))
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
        )
      )

    LISTENER部分包含协议地址列表,每个实例一个入口。

    SID_LIST_LISTENER部分标识全局数据库名称、标识监听程序正在服务的每个实例的Oracle软件主目录以及实例或SID。

    当你执行命令sqlplus username/password@tnsname时,一般处理过程如下:
    1) 查询sqlnet.ora看看名称的解析方式,由参数NAMES.DIRECTORY_PATH控制,常用参数值TNSNAME和hostname,不指定参数则默认使用TNSNAME。
    2) 如果使用TNSNAME,则查询tnsnames.ora文件,从里边找tnsname的记录,并且找到主机名,端口和service_name。
    3) 如果listener进程没有问题的话,建立与listener进程的连接。
    4) 根据不同的服务器模式如专用服务器模式或者共享服务器模式,listener采取接下去的动作。默认是专用服务器模式,没有问题的话客户端就连接上了数据库的server process。
    5) 这时候网络连接已经建立,listener进程的历史使命也就完成了。

    几种连接数据库用到的命令形式:
    1)sqlplus "/ as sysdba" 这是典型的操作系统认证,不需要listener进程,数据库即使不可用也可以登录。
    2)sqlplus username/password 不需要listener进程,登录本机数据库,数据库实例启动即可。
    3)sqlplus username/password@tnsname需要listener进程,最常见的远程登录模式,需要启动数据库实例和listener进程。

     

    注:如果本地连接数据库,服务器进程显示如下:

           oracle    2878  2814  0 09:46 ?        00:00:00   oracleorcl (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))

           如果通过监听连接数据库,服务器进程显示如下:

           oracle    3124     1    0 09:48 ?         00:00:00 oracleorcl (LOCAL=NO)

     

    展开全文
  • Oracle网络配置三个配置文件 listener.ora、sqlnet.ora、tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下。 英文说明: The sqlnet.ora is an optional file expressing more parameters about the ...

    Oracle网络配置 
    三个配置文件 listener.ora、sqlnet.ora、tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下。

    英文说明:

    The sqlnet.ora is an optional file expressing more parameters about the connection (eg: the trace level for debugging, the types of authentication you would like to support and so on). It may be found on the client or the server.

    The tnsnames.ora is used to find a Net8 listener and connect to it and pass to it the details of the database instance youwould like to connect to. It will be found on the client side. Note that a SERVER can be a client of another database so it is typical to find it on the SERVER as well.

    The listener.ora is used to setup the configuration of the net8 listener. to specify the port it will listen on, give it the details of the databases it can connect to and so on. This file is on the SERVER only.

    1.  sqlnet.ora-----通过这个文件来决定怎么样找一个连接中出现的连接字符串。 
    例如我们客户端输入 
    sqlplus sys/oracle@ora 
    假如我的sqlnet.ora是下面这个样子 
    SQLNET.AUTHENTICATION_SERVICES= (NTS) 
    NAMES.DIRECTORY_PATH= (TNSNAMES,HOSTNAME,EZCONNECT) 
    那么,客户端就会首先在tnsnames.ora文件中找ora的记录.如果没有相应的记录则尝试把ora当作一个主机名,通过网络的途径去解析它的 ip地址然后去连接这个ip上GLOBAL_DBNAME=ora这个实例,当然我这里ora并不是一个主机名

    EZCONNECT表示:可以使用简单的方式连接Oracle例如:

     

    1 CONNECT username/password@host[:port][/service_name][/instance_name]  
    2 CONNECT username/password@host[:port][/service_name]  
    3 sqlplus / as sysdba  
    4 sqlplus sys as sysdba/sys@127.0.0.1:1521 

     

    如果我是这个样子 

    NAMES.DIRECTORY_PATH= (TNSNAMES) 
    那么客户端就只会从tnsnames.ora查找ora的记录,括号中还有其他选项,如LDAP等并不常用。

    2.  tnsnames.ora------这个文件类似于unix 的hosts文件,提供的tnsname到主机名或者ip的对应。 
    只有当sqlnet.ora中类似NAMES.DIRECTORY_PATH= (TNSNAMES) 这样,也就是客户端解析连接字符串的顺序中有TNSNAMES是,才会尝试使用这个文件。 
    例子: 
    ORA_TEST = 
        (DESCRIPTION = 
           (ADDRESS_LIST = 
              (ADDRESS = (PROTOCOL = TCP)(HOST = LXL)(PORT = 1521)) 
           ) 
          (CONNECT_DATA = 
             (SERVER = DEDICATED) 
             (SERVICE_NAME = ora) 
          ) 
        ) 

    ORA_TEST:客户端连接服务器端使用的服务别名。注意一定要顶行书写,否则会无法识别服务别名。 
    PROTOCOL:客户端与服务器端通讯的协议,一般为TCP,该内容一般不用改。 
    HOST:ORACLE服务器端IP地址或者hostname。确保服务器端的监听启动正常。 
    PORT:数据库侦听正在侦听的端口,可以察看服务器端的listener.ora文件或在数据库侦听所在的机器的命令提示符下通过lnsrctl status [listener name]命令察看。此处Port的值一定要与数据库侦听正在侦听的端口一样。 
    SERVICE_NAME:在服务器端,用system用户登陆后,sqlplus> show parameter service_name命令查看。

    3.  listener.ora------listener监听器进程的配置文件 
    关于listener进程就不多说了,接受远程对数据库的接入申请并转交给oracle的服务器进程。所以如果不是使用的远程的连接,listener进程就不是必需的,同样的如果关闭listener进程并不会影响已经存在的数据库连接。 
    例子: 
    #listener.ora Network Configuration File: #E:/oracle/product/10.1.0/Db_2/NETWORK/ADMIN/listener.ora 
    # Generated by Oracle configuration tools. 
    SID_LIST_LISTENER = 
        (SID_LIST = 
             (SID_DESC = 
                 (GLOBAL_DBNAME = ora) 
                 (ORACLE_HOME = E:/oracle/product/10.1.0/Db_2) 
                 (SID_NAME = ora) 
             ) 
        )

    LISTENER = 
        (DESCRIPTION = 
            (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)) 
        )

    LISTENER :监听名称,可以配置多个监听,多个监听的端口号要区分开来。 
    GLOBAL_DBNAME :全局数据库名。通过select * from global_name; 查询得出 
    ORACLE_HOME :oracle软件的跟目录 
    SID_NAME :服务器端(本机)的SID 
    PROTOCOL:监听协议,一般都使用TCP 
    HOST:本机IP地址,双机时候使用浮动IP 
    PORT:监听的端口号,使用netstat –an 检查该端口不被占用。

    当你输入sqlplus sys/oracle@orcl的时候 
    1. 查询sqlnet.ora看看名称的解析方式,发现是TNSNAME 
    2. 则查询tnsnames.ora文件,从里边找orcl的记录,并且找到主机名,端口和service_name 
    3. 如果listener进程没有问题的话,建立与listener进程的连接。 
    4. 根据不同的服务器模式如专用服务器模式或者共享服务器模式,listener采取接下去的动作。默认是专用服务器模式,没有问题的话客户端就连接上了数据库的server process。 
    5. 这时候网络连接已经建立,listener进程的历史使命也就完成了。

    sql*plus运行基本机理: 
    在用户输入sqlplus system/manager@test后,sqlplus程序会自动到sqlnet.ora文件中找NAMES.DEFAULT_DOMAIN参数,假如该参数存在,则将该参数中的值取出,加到网络服务名的后面,即此例中你的输入由sqlplus system/manager@test自动变为sqlplus system/manager@test.server.com ,然后再到tnsnames.ora文件中找test.server.com网络服务名,这当然找不到了,因为该文件中只有test网络服务名,所以报错。解决的办法就是将sqlnet.ora文件中的NAMES.DEFAULT_DOMAIN参数注释掉即可,如 #NAMES.DEFAULT_DOMAIN = server.com。假如NAMES.DEFAULT_DOMAIN参数不存在,则sqlplus程序会直接到tnsnames.ora文件中找 test网络服务名,然后取出其中的host ,port,tcp,service_name,利用这些信息将连接请求发送到正确的数据库服务器上。

    重点:上面所有的HOST值必须是计算机的主机名,否则只有本机使用127.0.0.1能访问数据库,局域网内的其他主机不能访问【血泪史,不解释】

    并使用telnet 192.168.1.51 1521能连接

    使用netstat -an可以查看到如下

    贴出我的

    sqlnet.ora内容

     1 # sqlnet.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora  
     2 # Generated by Oracle configuration tools.  
     3   
     4 # This file is actually generated by netca. But if customers choose to   
     5 # install "Software Only", this file wont exist and without the native   
     6 # authentication, they will not be able to connect to the database on NT.  
     7   
     8 SQLNET.AUTHENTICATION_SERVICES= (NTS)  
     9   
    10 NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME, EZCONNECT) 

     


    tnsnames.ora内容

     1     # tnsnames.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora  
     2     # Generated by Oracle configuration tools.  
     3       
     4     LISTENER_ORCL =  
     5       (ADDRESS = (PROTOCOL = TCP)(HOST = LXL)(PORT = 1521))  
     6     ORCL =  
     7       (DESCRIPTION =  
     8         (ADDRESS_LIST =  
     9           (ADDRESS = (PROTOCOL = TCP)(HOST = LXL)(PORT = 1521))  
    10         )  
    11         (CONNECT_DATA =  
    12           (SID = ORCL)  
    13         )  
    14       )  

     

    listener.ora内容

     1 # listener.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora  
     2 # Generated by Oracle configuration tools.  
     3   
     4 SID_LIST_LISTENER =  
     5   (SID_LIST =  
     6     (SID_DESC =  
     7       (SID_NAME = CLRExtProc)  
     8       (ORACLE_HOME = E:\app\Administrator\product\11.2.0\dbhome_1)  
     9       (PROGRAM = extproc)  
    10       (ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")  
    11     )  
    12   )  
    13   
    14 LISTENER =  
    15   (DESCRIPTION =  
    16     (ADDRESS = (PROTOCOL = TCP)(HOST = LXL)(PORT = 1521))  
    17   )  

     

    转载于:https://www.cnblogs.com/qianyuliang/p/6520515.html

    展开全文
  • 概述Oracle监听一般会涉及三个文件:sqlnet.ora、tnsnames.ora、listener.ora,这三个文件之间有什么区别呢?分别的作用是什么?sqlnet.orasqlnet.ora 用在oracle client端,用于配置连接服务端oracle的相关参数。1)...
  • Oracle的网络三大配置文件(sqlnet.ora、tnsnames.ora、listener.ora) blog文档结构图: 1说明 为了使得外部进程能够访问Oracle数据库则必须配置Oracle网络服务器环境配置,Oracle网络服务器环境是通过...
  • listener.ora、tnsnames.ora和sqlnet.ora这3个文件是关系oracle网络配置的3个主要文件,都是放在$ORACLE_HOME\network\admin目录下。其中listener.ora是和数据库服务器端相关,而tnsnames.ora和sqlnet.ora这2个文件...
  • 一、sqlnet.ora  sqlnet.ora用在oracle client端,用于配置客户端连接服务端oracle的相关参数。 读取该文件路径与tnsnames.ora一样,如果装了oracle服务端默认是%ORACLE_HOME%\NETWORK\ADMIN,可以通过TNS_ADMIN...
  • 在oracle安装目录$HOME/network/admin下,,经常看到sqlnet.ora tnsnames.ora listener.ora这三个文件, sqlnet.ora 用在oracle client端,用于配置连接服务端oracle的相关参数,提供对客户端的IP检查过滤设置 ...
  • 在oracle安装目录$HOME/network/admin下,,经常看到sqlnet.ora tnsnames.ora listener.ora这三个文件,除了tnsnames.ora,其他两个文件详细的用途很多人都不太了解。 sqlnet.ora 用在oracle client端,用于配置连接...
  • ... oracle网络配置三个配置文件listener.ora、sqlnet.ora、tnsnames.ora,都是放在$ORACLE_HOME/network/admin目录下。 sqlnet.ora -----作用类似于linux或者其他unix的nsswitch.conf文...
  • 2 .sqlnet.ora确定解析方式3 .listener.ora上设SID_NAME,通常用于JDBC访问,对应的错误码为125054 .tnsnames.ora上设SERVICE_NAME,通常用于linux sqlplus客户端,对应的错误码为12514sqlnet.ora 作用类似于linux或...
  • 在Oracle安装目录$HOME/network/admin下,,经常看到sqlnet.ora tnsnames.ora listener.ora这三个文件,除了tnsnames.ora,其他两个文件详细的用途很多人都不太了解。sqlnet.ora 用在oracle client端,用于配置连接...
  • sqlnet.ora 示例:NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME) 那么在客户端执行sqlplus username/password@local_dev连接数据库的时,首先采用tnsnames.ora的别名配置连接数据库;如果连接上;再采用...
  •  oracle网络配置  三个配置文件 listener.ora、sqlnet.ora、tnsnames.ora ,都是放在$ORACLE_HOME\network\admin目录下。  1. sqlnet.ora-----  作用类似于linux或者其他unix的nsswitch.conf文件,通过
  • Oracle uses three files (listener.ora, tnsnames.ora & sqlnet.ora) for network configuration. Or...
  • 三个配置文件 listener.ora、sqlnet.ora、tnsnames.ora ,都是放在$ORACLE_HOME\network\admin目录下。 三个文件的作用: 1. sqlnet.ora 作用类似于linux或者其他unix的nsswitch.conf文件,通过这个文件来决定...
  • 转载地址:... oracle网络配置  三个配置文件 listener.ora、sqlnet.ora、tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下。  1. sqlnet.ora—–作用类似于linux或者其他unix的nsswi

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 2,795
精华内容 1,118
关键字:

sqlnet.ora