SEM03 Networking

Embed Size (px)

Citation preview

  • 7/31/2019 SEM03 Networking

    1/26

    Copyright 2009, Oracle. All rights reserved.

    Configuring the Oracle Network Environment

  • 7/31/2019 SEM03 Networking

    2/26

    Copyright 2009, Oracle. All rights reserved.6 - 2

    Oracle Net Services

    Application

    Oracle Net

    RDBMS

    Oracle Net

    Client ormiddle tier

    Database server

    TCP/IPnetwork

    Listener

    Oracle Netconfiguration files

    Oracle Netconfiguration files

  • 7/31/2019 SEM03 Networking

    3/26

    Copyright 2009, Oracle. All rights reserved.6 - 3

    Oracle Net Listener

    Listener

    /network/admin/listener.ora./sqlnet.ora

    Oracle databases

    Oracle Netconfiguration files

    EnterpriseManagerDatabaseControl

  • 7/31/2019 SEM03 Networking

    4/26

    Copyright 2009, Oracle. All rights reserved.6 - 4

    Establishing Net Connections

    To make a client or middle-tier connection, Oracle Net requiresthe client to know the:

    Host where the listener is running

    Port that the listener is monitoring

    Protocol that the listener is using

    Name of the service that the listener is handling

    Names resolution

  • 7/31/2019 SEM03 Networking

    5/26

    Copyright 2009, Oracle. All rights reserved.6 - 5

    Server

    process

    User Sessions

    PGA

    Listener

    User session

    User process

  • 7/31/2019 SEM03 Networking

    6/26

    Copyright 2009, Oracle. All rights reserved.6 - 6

    Tools for Configuring and Managingthe Oracle Network

    Enterprise Manager Net Services Administration page Oracle Net Manager

    Oracle Net Configuration Assistant

    Command line

  • 7/31/2019 SEM03 Networking

    7/26Copyright 2009, Oracle. All rights reserved.6 - 8

    Listener Control Utility

    Oracle Net listeners can be controlled with the lsnrctlcommand-line utility (or from EM).

    $ . oraenv

    ORACLE_SID = [orcl] ? +ASM

    $ lsnrctl

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 30-JUN-2009 00:47:01Copyright (c) 1991, 2009, Oracle. All rights reserved.

    Welcome to LSNRCTL, type "help" for information.

    LSNRCTL> help

    The following operations are available

    An asterisk (*) denotes a modifier or extended command:

    start stop status

    services version reload

    save_config trace spawn

    change_password quit exit

    set* show*

  • 7/31/2019 SEM03 Networking

    8/26Copyright 2009, Oracle. All rights reserved.6 - 9

    Listener Control Utility Syntax

    Commands from the listener control utility can be issued fromthe command line or from the LSNRCTL prompt.

    Command-line syntax:

    Prompt syntax:

    $ lsnrctl

    $ lsnrctl start

    $ lsnrctl status

    LSNRCTL> LSNRCTL> start

    LSNRCTL> status

  • 7/31/2019 SEM03 Networking

    9/26Copyright 2009, Oracle. All rights reserved.6 - 10

    Using SRVCTL to Start and Stop the Listener

    If Oracle Restart is configured to monitor your listener, youshould use SRVCTL to manage that listener.

    Example syntax:

    $ srvctl -h

    $ srvctl start listener

    $ srvctl stop listener

    $ srvctl start listener l mylistener

    $ srvctl status listener

  • 7/31/2019 SEM03 Networking

    10/26Copyright 2009, Oracle. All rights reserved.6 - 11

    Listener Home Page

  • 7/31/2019 SEM03 Networking

    11/26Copyright 2009, Oracle. All rights reserved.6 - 12

    Net Services Administration Page

  • 7/31/2019 SEM03 Networking

    12/26Copyright 2009, Oracle. All rights reserved.6 - 13

    Creating a Listener

    1 2

    3

    4

  • 7/31/2019 SEM03 Networking

    13/26Copyright 2009, Oracle. All rights reserved.6 - 14

    Adding Listener Addresses

    5

    67

    8

    9

    10

  • 7/31/2019 SEM03 Networking

    14/26Copyright 2009, Oracle. All rights reserved.6 - 15

    Database Service Registration

  • 7/31/2019 SEM03 Networking

    15/26Copyright 2009, Oracle. All rights reserved.6 - 16

    Naming Methods

    Oracle Net supports several methods of resolving connectioninformation:

    Easy connect naming: Uses a TCP/IP connect string

    Local naming: Uses a local configuration file

    Directory naming: Uses a centralizedLDAP-compliant directory server

    External naming: Uses a supported non-Oracle namingservice

    Client/application server

    Oracle Net

    Oracle Net configuration files

  • 7/31/2019 SEM03 Networking

    16/26Copyright 2009, Oracle. All rights reserved.6 - 17

    Easy Connect

    Is enabled by default

    Requires no client-side configuration

    Supports only TCP/IP (no SSL)

    Offers no support for advanced connection options suchas:

    Connect-time failover

    Source routing

    Load balancing

    SQL> CONNECT hr/[email protected]:1521/dba11g

    No Oracle Net configuration files

  • 7/31/2019 SEM03 Networking

    17/26Copyright 2009, Oracle. All rights reserved.6 - 18

    Local Naming

    Requires a client-side Names Resolution file Supports all Oracle Net protocols

    Supports advanced connection options such as:

    Connect-time failover

    Source routing

    Load balancing

    SQL> CONNECT hr/hr@orcl

    Oracle Netconfiguration files

  • 7/31/2019 SEM03 Networking

    18/26Copyright 2009, Oracle. All rights reserved.6 - 19

    Directory Naming

    Requires LDAP with Oracle Net Names Resolutioninformation loaded:

    Oracle Internet Directory

    Microsoft Active Directory Services

    Supports all Oracle Net protocols Supports advanced connection options

    SQL> CONNECT hr/hr@orcl

    LDAP directory

    Oracle Netconfiguration files

  • 7/31/2019 SEM03 Networking

    19/26Copyright 2009, Oracle. All rights reserved.6 - 20

    External Naming Method

    Uses a supported non-Oracle naming service Includes:

    Network Information Service (NIS) External Naming

    Distributed Computing Environment (DCE) Cell DirectoryServices (CDS)

    Oracle Net

    Non-Oraclenamingservice

  • 7/31/2019 SEM03 Networking

    20/26Copyright 2009, Oracle. All rights reserved.6 - 21

    Configuring Service Aliases

  • 7/31/2019 SEM03 Networking

    21/26Copyright 2009, Oracle. All rights reserved.6 - 22

    Testing Oracle Net Connectivity

    The tnsping utility that tests Oracle Net service aliases: Ensures connectivity between the client and the Oracle

    Net Listener

    Does not verify that the requested service is available

    Supports Easy Connect Names Resolution:

    Supports local and directory naming:

    tnsping host01.example.com:1521/orcl

    tnsping orcl

  • 7/31/2019 SEM03 Networking

    22/26Copyright 2009, Oracle. All rights reserved.6 - 23

    User Sessions: Dedicated Server Process

    Server process

    Server process

    User sessions

    Server process

    Listener

  • 7/31/2019 SEM03 Networking

    23/26Copyright 2009, Oracle. All rights reserved.6 - 24

    User Sessions: Shared Server Processes

    Listener

    Dispatchers

    Server process

    Server process

    Server process

    User sessions

  • 7/31/2019 SEM03 Networking

    24/26Copyright 2009, Oracle. All rights reserved.6 - 25

    SGA and PGA

    Oracle Shared Server: User session data is heldin the SGA.

    Remember to consider shared server memory requirementswhen sizing the SGA.

    Stackspace

    PGA

    User SessionData

    Cursor

    State

    Sort

    Area

    Hash

    Area

    Create Bitmap Area

    Bitmap Merge Area

    UGA

    System Global Area (SGA)

  • 7/31/2019 SEM03 Networking

    25/26Copyright 2009, Oracle. All rights reserved.6 - 26

    Shared Server: Connection Pooling

    The client application has been idlepast the specified time, and an

    incoming client requests a connection.

    The maximum

    number ofconnections isconfigured to 255.

    This client connection is the 256th

    connection into the server. Connectionpooling is turned on so that thisconnection can be accepted.

    Database

    server

    Idleclient

    Activeclient

    New

    client

  • 7/31/2019 SEM03 Networking

    26/26

    When Not to Use a Shared Server

    Certain types of database work must not be performed usingshared servers:

    Database administration

    Backup and recovery operations

    Batch processing and bulk load operations Data warehouse operations

    Dispatcher Dedicatedserver process