17_oracle network services.pdf

Upload: ppiioouu

Post on 02-Jun-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 17_Oracle Network Services.pdf

    1/33

    pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    module17-network.htm; Updated July 14, 2013; Some figures in these notes are from the Oracle Database Net Services Administrator's Guide 11gRelease 2(11.2) E10836-07

    Module 17 Oracle Network Services

    ObjectivesThese notes cover Oracle network administration for an Internet environment.

    Familiarize with network environments, connect operations, exception operations, databaseidentification by service name rather than SID, service resolution through naming methods,establishing a connection, and configuring a listener.

    An E-Commerce ArchitectureThis figure shows a typical Internet architecture.

    The organization has an Intranet that connects client computers to one or more Database Servers. The client computers also connect to the Internet through an Application Web Server.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    2/33

    pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    Oracle NetOracle Net Servicesis Oracle'ssolution for providing enterprise wide connectivity in distributed,heterogeneous computing environments.

    Objective is for Oracle Net Servicesto make it easy to manage network configurations whilemaximizing performance and enabling network diagnostic capabilities when problems arise.

    Connectivity is provided by Oracle Net.o Oracle Net is a component of Oracle Net Services and is the software that enables a connection

    from a client application to an Oracle database server.o

    Oracle Net maintains the connection and exchanges messages between client and server

    computers.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://otn.oracle.com/docs/products/oracle9i/doc_library/release2/network.920/a96580/glossary.htm#1000117
  • 8/10/2019 17_Oracle Network Services.pdf

    3/33

    pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    o Oracle Net software is located on each computer in the network.

    o Oracle Net is a layer of software that interfaces with the network protocol, that is, the set of rules

    that determine how data is subdivided and transmitted into packets on a network.o

    Oracle Net uses the TCP/IP protocol for connectivity.

    Oracle Net includes two components:

    Oracle Net foundation layerestablishes and maintains connections. Oracle protocol supportthat maps the foundation layer's technology to industry-standard protocols.

    Oracle supports Java client applications that access an Oracle database with a Java DatabaseConnectivity (JDBC) Driver. This is a standard Java interface to connect to a relational DBMS. Oracleoffers the following drivers:

    JDBC OCI Driver used for clients with Oracle client software installed.

    JDBC Thin Driver used for clients without an Oracle installation that use applets.

    Web Client Connections Without an Application ServerWeb clientscan run programs that access Oracle databases directly withouta Web Server.

    The .NET framework from Microsoft enables this type of connection.o Used to program Visual Basic ADO.NET applications to connect to Oracle.oAlso used to program ASP.NET (active-x server pages) applications to connect to Oracle.

    A database can accept HTTP, FTP, or WebDAV protocol connections that can connect to OracleXML DB in an Oracle database instance.

    The figure shows a client with a HTTP connection that connects through a web server like Apache.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    4/33

    pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    This figure shows a client using a Web Browser such as Internet Explorer with a JDBC Thin driver thatuses a Java version of Oracle Net called JavaNetto communicate with the Oracle database server that isconfigured with Oracle Net.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    5/33

    pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    Location TransparencyMany companies have more than one databases, often distributed, that support different clientapplications.

    Each database is represented in Oracle Net by one or more services. Service identified by a service name. Client computers use the service name to identify the database to be accessed.

    The information about the database service and its location in the network is transparentto the client

    because the information needed for a connection is stored in a repository.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    6/33

    pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    The repository is represented by one or more naming methods.

    Oracle Net Services offer several types of naming methods that support localized configuration oneach client computer, or centralized configuration that can be accessed by all clients in the network.

    Easy-to-use graphical user interfaces enable you to manage data stored in the naming methods.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    7/33

    pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    Naming Methods Centralized Configuration and ManagementOne approach to establishing network connectivity is to centralizethe management of a repository ofservice names by the use of a Directory Serveras is shown in the figure below.

    This approach provides network administrators the ability to configure and manage the network ofdatabases with a central facility.

    It authenticates database access and eliminates the need for any client and server configuration files.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    8/33

    pdfcrowd comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    Oracle Net and Oracle software are scalablemeaning that an organization can maximize the use ofsystem resources. One way this is done is through a shared serverarchitecture that allows many clientcomputers to connect to a server.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    9/33

    df d mi b PRO i Are you a developer? Try out the HTML to PDF API

    The shared server approach: Client computers communicate their requests for data by routing requests through one or more

    dispatcherprocesses. The dispatcher process(es) will queue client requests in a common queue. When a server process becomes idle, it will select the next client to serve in the queue. Server processes are pooledand a small pool of server processes can share a large number of

    client computers.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    10/33

    df di b PRO i Are you a developer? Try out the HTML to PDF API

    The dedicated serverapproach:

    One server process starts and is dedicated to each client connection until the connection iscompleted.

    This does introduce a little processing delay required to create the server process in memory. Shared server works better than dedicated server if there are a large number of connections because

    it reduces server memory requirements.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    11/33

    df di b PRO i A d l ? T t th HTML t PDF API

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    12/33df di b PRO i A d l ? T t th HTML t PDF API

    Oracle Connection ManagerThe Oracle Connection Managersoftware is another component of Oracle Net Services.

    It enables multiple client network sessions to be multiplexed (funneled) through a single networkdatabase connection.

    Reduces the resource demands needed to maintain multiple network sessions. It enables thousands of concurrent users to connect to a server.

    Connection Pooling:

    Enables a database server to timeout an idle web session and assign the connection to an activesession.

    The idle session remains open and the connection can be reestablished when the session becomes

    active with a data request. Enables accommodating accommodates thousands of concurrent network users in a web

    environment.Connection Manageralso provides firewallprotection. A host server called an application gatewayruns the Oracle Connection Manager software.

    Oracle Net ListenerAn Oracle Database Server receives initial connection information from a client through use of the OracleNet Listener commonly referred to as simply a listener.

    The listener process handles client requests and hands the request off to the appropriate server. A listener process can listen for more than one database instance.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    13/33df di b PRO i

    Are you a developer? Try out the HTML to PDF API

    Client computers are configured with protocol addresses that enable them to send connectionrequests to a listener.

    After a connection is established, the client computer and Oracle Database Server communicatedirectly.

    Database Service and Database Instance IdentificationAn Oracle database is a serviceto a client computer that runs on a server (In a Windows server, you cansee these services quite easily through the Control Panel).

    A database can have more than one service associated with it although one is typical.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    14/33df di b PRO iAre you a developer? Try out the HTML to PDF API

    For example, one service might be dedicated to system users accessing financial data while anotherone is dedicated to system users accessing warehouse data.

    Using more than one service can enable a DBA to allocate system resources.Service Name:

    Each database service is identified by a service name.

    SERVICE_NAMESinit.ora parameter specifies the service name in the databases initializationparameter file.

    The service name defaults to a global database namewhen it is not specified this is a name thatcomprises the database name from the DB_NAMEparameter and the domain name from theDB_DOMAINparameter.

    The SERVICE_NAMESparameter in the initialization parameter file (init.ora)can specify more thanone service entry as shown below.

    o

    This enables a single instance to be identified in different ways by different client computers.o This also enables a DBA to limit resource allocations for clients requesting a service.

    SERVICE_NAMES = sobora1.siue.edu, sobora2.siue.edu

    This enables using a pool of Multi-threaded service dispatchersto be used for clients requesting

    sobora1.siue.edu, for example, while a different dispatcher or pool of dispatchers could beconfigured to service sobora2.siue.edu, for example.

    Instance Name:

    Each database instance is identified by an instance name. INSTANCE_NAMEparameter in the initialization parameter f ile specif ies the instance name. The instance name defaults to the Oracle System Identifier (SID). This figure shows two database servers, each connected to a single database that is opened as two

    t i t h ith i t fil ll d i t t fil (ifil )

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    15/33df di b PRO iAre you a developer? Try out the HTML to PDF API

    separate instances, each with a unique parameter file called aninstance parameter file (ifile).

    Accessing a ServiceClient computersconnect to a database service by using a connect descriptor.

    Th t d i ti d ib th d t b l ti d d t b i

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    16/33

    Are you a developer? Try out the HTML to PDF API

    The connect description describes the database location and database service name. Example for a database service named sobora2.

    DBORCL = (DESCRIPTION = (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu )(PORT = 1521) ) ) (CONNECT_DATA = (SID=DBORCL) (SERICE_NAME=DBORCL.siue.edu) ) )

    ADDRESS=clause specifies the protocol address of the listenerservice. Includes the HOST=specification of the database server (the specification can be the database

    name, e.g., sobora2.siue.eduor the IP address, e.g. 146.163.252.41). Includes the PROTOCOL=specification for the network protocol (TCP). Includes the PORT=specification the standard listener port is 1521for Oracle software other

    ports can be used as long as no other service is using the port on the server an alternative port,such as 1523could be assigned if port 1521was already in use for another service on the host.

    Server Computerslisten for calls from client computers. The listener process for a database instance knows the services for which it can handle connection

    requests, because an Oracle database dynamically registers this information with the listener. This process of registration is called service registration. Service registration provides a listener process with information about the database instances and the

    service handlers available for each instance

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://otn.oracle.com/docs/products/oracle9i/doc_library/release2/network.920/a96580/glossary.htm#434100http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/network.920/a96580/glossary.htm#435026
  • 8/10/2019 17_Oracle Network Services.pdf

    17/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    service handlersavailable for each instance. Service handlers act as connection points to an Oracle database server. A service handler can be a dispatcheror a dedicated server.

    INSTANCE_NAMEparameter: Can be added to the connect descriptor to listen for a specific instanceof a database where

    multiple instances may be in use. This is useful if you are running Oracle Real Application Clusters. We are not using this on SOBORA1 or SOBORA2.

    DBORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu)(PORT = 1521)) (CONNECT_DATA=(SERVICE_NAME=DBORCL) (INSTANCE_NAME=DBORCL_repository) ) )

    SERVER=parameter another approach is to specify a particular service handler as part of the connectdescriptor.

    One example is when a dispatcher is used for a shared server configuration. Another example is SERVER=dedicatedfor a dedicated server. The default is SHARED; however, if no dispatcher is available, then a DEDICATEDconnection is

    made.DBORCL = (DESCRIPTION =

    (ADDRESS LIST =

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://otn.oracle.com/docs/products/oracle9i/doc_library/release2/network.920/a96580/glossary.htm#435026http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/network.920/a96580/glossary.htm#431815http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/network.920/a96580/glossary.htm#431788
  • 8/10/2019 17_Oracle Network Services.pdf

    18/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu)(PORT=1521)) ) (CONNECT_DATA=(SERVICE_NAME=DBORCL) (SERVER=shared) ) )

    This figure shows more detail with a Listener and a Dispatcher for a Shared Server Process.

    The Listener hands the connection request to the Dispatcher for future communcation. The stepsare:

    1.The listener receives a client connection request.2.

    The listener hands the connect request directly to the dispatcher.

    3.The client is now connected to the dispatcher.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    19/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    This figure shows more detail with a Listener for a Dedicated Server Process.

    The Listener passes a connection request to a dedicated server process -- first it starts the process.The steps are:

    1.The listener receives a client connection request.2.The listener starts a dedicated server process.3.The listener provides the location of the dedicated server process to the client in a redirect message.4.The client connects directly to the dedicated server.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    20/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    Naming Method ConfigurationA naming method is a resolution method used by a client application to resolve a connect identifierto aconnect descriptorwhen attempting to connect to a database service.

    Users initiate a connection request by providing a connect string. A connect string includes a user nameand password, along with a connect identifier. A connect identifier can be either:

    o the connect descriptor or

    o a name that resolves to a connect descriptor.

    o a common connect identifier is a simple net service name

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://docs.oracle.com/cd/E11882_01/network.112/e10836/glossary.htm#BGBIFGAGhttp://docs.oracle.com/cd/E11882_01/network.112/e10836/glossary.htm#BGBBGCEG
  • 8/10/2019 17_Oracle Network Services.pdf

    21/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    o a common connect identifier is a simple net service name.

    The connect descriptor contains:o

    Network route to the service, including the location of the listener through a protocol address.

    oA database service nameor Oracle system identifier (SID)

    Example: This example CONNECT string has a complete connect descriptor:

    CONNECT dbock/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=sobora2.siue.edu)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=DBORCL)))

    Example: This example uses a simple net service nameof DBORCLas the connect identifier.

    o The net service name is mapped to the proper connect descriptorby using a repository of

    connection information that is access through one of Oracles naming methods.CONNECT dbock/password@dborcl

    Oracle Net supports the following naming methods:

    Local Naming.o

    With this approach a local configuration file named tnsnames.orais stored on each client

    computer.o

    Net service namesare stored in the tnsnames.orafile as was described above.o

    The file can be configured for individual client machines and client needs. This is the approach

    taken at SIUE.o Local naming is most appropriate for simple distributed networks with a small number of

    services that change infrequently. Directory Naming.

    o This approach was described earlier in these notes.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdfhttp://docs.oracle.com/cd/E11882_01/network.112/e10836/glossary.htm#BGBGIHFGhttp://docs.oracle.com/cd/E11882_01/network.112/e10836/glossary.htm#BGBFBBAI
  • 8/10/2019 17_Oracle Network Services.pdf

    22/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    o This approach was described earlier in these notes.

    o Service addresses and net service names are stored in a Lightweight Directory Access

    Protocol(LDAP)-compliant directory server. Easy Connect Naming.

    o Clients connect to a database without any configuration.

    o Clients use a connect string for a simple TCP/IP address that consist of a host name and

    optional port and service name.o Example: CONNECT username/password@host[:port][/service_name]

    o Recommended for simple TCP/IP environments.

    External Naming.o

    A third-party naming service already configured for your environment is used.

    After a naming method is configured, the client computers must be enabled for the naming method

    following three steps:1. The clientcontacts a naming methodo This step converts the connect identifierto a connect descriptor.

    o With local namingfor a Windowscomputer, this is accomplished by storing the

    tnsnames.orafile on the $Oracle_Home/Network/Admin directory specified for the clientmachine when the Oracle software was initially loaded onto the machine.

    2. Based on the identified connect descriptor, the client forwards a request to the listener

    addressgiven in the connect descriptor.3. The client connection is accepted by the listener(usually uses a TCP/IPprotocol). If the clientinformation received in the connect descriptor matchesclient information in the database and inits listener configuration file (named listener.ora), a connection is made; otherwise, an errormessage is returned.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    23/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    Configuring the Local Naming Method

    Client Configuration

    Local Naming configuration requires storing a tnsnames.orafile on each client computer. The local naming method adds net service namesto the tnsnames.ora file. Each net service name maps to a connect descriptor. The tnsnames.ora file specifies connect descriptors for one or more databases. Examine the tnsnames.ora file located on a computer in the computer classroom/laboratory

    located in $Oracle_Home/Network/Admin . Example from the tnsnames.orafile on a client computer in our laboratory:

    DBORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu )(PORT = 1521)) ) (CONNECT_DATA =

    (SID = DBORCL) ) )

    Oracle Net Configuration Assistant Oracle software that runs automatically during installation of theOracle RDBMS.

    Provides a wizardinterface that prompts for information needed to build a tnsnames.orafile

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    24/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    p pautomatically.

    If you select Custom Installation as an option when configuring your network connection, you canselect the naming method to use.

    If you select Directory Naming or any other method other than Local Naming, the naming method hasto already be set up.

    You can also configure the tnsnames.orafile manuallyby adding service names to the file by using asimple text editor like Notepad.

    Listener Configuration on the Server

    Listener service configured to listen for one or more databases. Includes one or more listening protocol addresses and associated destination service information. Listener.ora the listener configuration file.

    o Stores the protocol addresses.

    o It may or may not store the service information.

    o The default location for the listener.orafile is the ORACLE_HOME/network/admindirectory

    on the Database Server.

    Here is the sample code stored in the listener.orafile on the SIUE sobora2server.LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu )(PORT = 1521))

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    25/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    ) ) )

    SID_LIST_LISTENER =

    (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = DBORCL.siue.edu) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) (SID_NAME = DBORCL ) ) )

    Listener Name Alias

    A listener name aliascan resolved through atnsnames.orafile located on the server (NOT theclient tnsnames.ora f ile).

    We do not use this approach at SIUE, but if we did, an example entry in the tnsnames.ora file wouldbe:

    # tnsnames.ora Network Configuration File:# /u01/app01/oracle1/product/11.2.0.3/dbhome_1/network/admin/tnsnames.ora# Generated by Oracle configuration tools.DBORCL.SIUE.EDU = (DESCRIPTION =

    (ADDRESS_LIST =

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    26/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    (ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu)(PORT = 1521)) ) (CONNECT_DATA = (SID = DBORCL) ) )EMTEST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = EMTEST.siue.edu)

    ) )LISTENER_DBACLASS = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 146.163.252.41)(PORT = 1523)) )

    The LISTENER_DBACLASSalias specified above can be used to enable any Oracle software to

    connect to a student database through the listener. The LOCAL_LISTENERparameter shown below is from the dbockstd(student database)

    initdbockstd.orafile. It specifies the alias for the listener used to connect to this particulardatabase.

    ###########################################

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    27/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    # Listener alias###########################################local_listener = "LISTENER_DBACLASS"

    Listener Control Utility.

    A configured listener can be managed with the Listener Control Utility (LSNRCTL). Ensure software release of the listeneris appropriate for the Oracle database software release, e.g.,

    use a listener designed for Oracle 11g, 10g or 9i as appropriate. The screen shot below gives an example of using the lsnrctlcommand in a LINIX environment.

    dbock/@sobora2.isg.siue.edu=>lsnrctl

    LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 22-JUL-2009 11:12:36Copyright (c) 1991, 2007, Oracle. All rights reserved.

    Welcome to LSNRCTL, type "help" for information.

    LSNRCTL>

    A listener.ora file can be configured manually.o

    Stop the listener process.

    o Configure the listener.ora file.

    o Start the listener process.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    28/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    $ lsnrctl start LISTENER$ lsnrctl stop LISTENER

    Identifying the Current Listener.

    Use the SHOW CURRENT_LISTENERcommand.LSNRCTL> show current_listenerCurrent Listener is LISTENER

    Listener Services Status.

    The status of services for which a listener is listening can be checked with the listener SERVICES

    command.Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sobora2.isg.siue.edu)(PORT=1521)))Services Summary...Service "DBORCL.siue.edu" has 2 instance(s).

    Instance "DBORCL", status UNKNOWN, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:25 refused:3 LOCAL SERVER Instance "DBORCL", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:3281 refused:0 state:ready

    LOCAL SERVERS i "DBORCLXDB i d " h 1 i t ( )

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    29/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    Service "DBORCLXDB.siue.edu" has 1 instance(s). Instance "DBORCL", status READY, has 1 handler(s) for this service... Handler(s): "D000" established:0 refused:0 current:0 max:972 state:ready DISPATCHER (ADDRESS=(PROTOCOL=tcp)(HOST=sobora2.isg.siue.edu)(PORT=11615))

    Service "DBORCL_XPT.siue.edu" has 1 instance(s). Instance "DBORCL", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:3281 refused:0 state:ready LOCAL SERVERService "USER305.siue.edu" has 1 instance(s). Instance "USER305", status READY, has 1 handler(s) for this service...

    Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVERService "USER305_XPT.siue.edu" has 1 instance(s). Instance "USER305", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER

    Service "USER350.siue.edu" has 1 instance(s). Instance "USER350", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:3661 refused:0 state:ready LOCAL SERVERService "USER350_XPT.siue.edu" has 1 instance(s).

    Instance "USER350", status READY, has 1 handler(s) for this service...H dl ( )

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    30/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    Handler(s): "DEDICATED" established:3661 refused:0 state:ready LOCAL SERVERThe command completed successfullyLSNRCTL>

    The DBA can assign different names to listener processes. This is done in the listener.ora file. Thedefault name of a listeneris LISTENERand is configured to listen on the following default protocoladdresses:

    TCP/IP protocol - port 1521.(address=(protocol=tcp)(host=host_name)(port=1521))

    IPC protocol.(address=(protocol=ipc)(key=PNPKEY))

    When a listenerservice is contacted by a client, one of these actions is performed as is shown in thisfigure.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    31/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    If the database serviceis running a dispatcherservice, then the listenerhands the request to thedispatcher the processthat manages the connection of many clients to the same server in a multi-threaded server environment.If a dispatcher is not in use, the listenercan spawn a dedicated server processor allocate a pre-spawned dedicated server processand pass the client connection to this dedicated server process

    (one server per client as we have discussed in earlier lectures).Either way, a redirect messageis sent back to the client informing the client of the location of thedispatcher or dedicated server process.

    Disconnecting from Servers

    If a user or application requests disconnectionfrom a server, the server disconnects when all

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    32/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    pp q ,transactions are complete. If this server is connected to a second serverin order to support theuser/application, then these additional connections are also disconnected.Additional Connection Request. When an application is connected to a server and attempts to accessanother user account (same or different server), the application is usually disconnected from the current

    connection.Abnormal Connection Termination. If communications are aborted without Oracle Net being notified,Oracle Net will recognize the failure and eventually clean up the client/server operations (during the nextdata operation) and disconnect the operation.Timer Initiated Disconnect or Dead Connection Detection. This feature is enabled to minimize

    wasted resources by invalid connections. Uncommitted transactions are automatically rolled back andlocks are released for the broken connection. Oracle detects dead connections by periodically sending asmall probe packet to each client at a user-defined interval (several minutes is typical) and initiates thedisconnection through the allocated Serverprocess if the connection is invalid.

    Additional Configuration InformationRefer to the Net Services Administrator's Guide for additional information on configuring other namingmethods, pre-spawned dedicated servers, and handling large connection volumes.

    END OF NOTES

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf
  • 8/10/2019 17_Oracle Network Services.pdf

    33/33

    pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API

    END OF NOTES.

    http://pdfcrowd.com/http://pdfcrowd.com/redirect/?url=http%3a%2f%2fwww.siue.edu%2f~dbock%2fcmis565%2fmodule17-network.htm&id=ma-141201155436-10a7e1d9http://pdfcrowd.com/customize/http://pdfcrowd.com/html-to-pdf-api/?ref=pdf