Oracle8i Parallel Server Setup and Configuration Guide
Release 8.1.5

A67439-01

Library

Product

Contents

Index

Prev Next

4
Configuring Oracle Parallel Server

This chapter describes the configuration tasks to create an operating Oracle Parallel Server.

Specific topics discussed are:

Configuration Options

The type of installation you chose determines the type of configuration to perform:

If you chose this installation type...   Configuration consists of...  

Typical  

This installation type requires no configuration on your part, as the Oracle Database Configuration Assistant is run as a part of installation for you.  

Custom  

If you chose to install a database, you are prompted to run the Oracle Database Configuration to create a database. It is advisable to use the Oracle Database Configuration Assistant to create a Starter, OLTP, DSS, or Hybrid database. If you choose not to run the Oracle Database Configuration Assistant, you may run it at a later time or manually configure Oracle Parallel Server.

If you choose not to install a database, you must manually create the database.  

Creating the Database

If you chose not to create a database during a Custom install, you can use the Oracle Database Configuration Assistant after installation to create an Oracle Parallel Server database.

Step 1: Create and Identify Raw Partitions

Step 2: Create the Database

Step 1: Create and Identify Raw Partitions

The Oracle Database Configuration Assistant assumes the raw devices were created and names. It will verify raw devices exist prior to database creation. If the raw devices were not set up, the Oracle Database Configuration Assistant will fail to create the database.

If the raw devices have not been created, perform these tasks:

  1. Create the raw devices and name them properly, as described in "Setting Up Raw Devices".

  2. Follow these platform-specific tips:

    On UNIX:   On Windows NT:  
    1. Create an ASCII file with entries for each data file, control file and redo log file. For an example file, see "Example ASCII File".

    2. Create an environment variable named DBCA_RAW_CONFIG that points to the ASCII file on the node from which you intend to run the Oracle Universal Installer.

     

    On each node:

    1. Go to the ORACLE_HOME\OPS\DBCA directory.

    2. Change TEMPLATE.TBL to DB_NAME.TBL, where DB_NAME is the database name you intend to use. If you intend to name your database OP, you can use OP.TBL and avoid having to change the <db_name> entries in step 2.

    3. Change <db_name> entries to the database name you intend to use, and edit the partition and hard disk numbers appropriately in the *.TBL file. For an example file, see "Example ASCII File".

    4. Run the *.TBL file through the SETLINKS utility:

          setlinks /f:dbname.tbl
      
      

    See the Oracle8i Parallel Server Getting Started for Windows NT for further information about these steps.  

Step 2: Create the Database

To create a database using the Oracle Database Configuration Assistant:

  1. Start the Oracle Database Configuration Assistant on the node from which the Oracle Universal Installer was run:

    -On Windows NT, choose Start > Programs > Oracle for Windows NT - [HOME_NAME] > Oracle Database Configuration Assistant.

    -On UNIX, run dbassist from $ORACLE_HOME\bin.

    The Oracle Database Configuration Assistant welcome page appears:



Note:

If this page does not display, it means the Oracle Database Configuration Assistant was unable to:

  • detect the Lock Manager software or the lists of nodes in the cluster on UNIX platforms

  • load the Cluster Manager software on Windows NT

See your Operating System Dependent vendor documentation to resolve the problem, then start the Oracle Database Configuration Assistant again.  


  1. Select Oracle Parallel Server Configuration, then click Next.

    The following page appears:


    The error message below may appear if there is a problem with the clusterware:


    On UNIX, this message indicates that the Oracle Database Configuration Assistant is unable to detect the lists of nodes in the cluster. See your Operating System Dependent vendor documentation for further information.

    On Windows NT, this messages indicates that Cluster Manager (CM) is installed but:

    • there is an error calling the API

    • the local node is not recognized

    • you do not have administrative privilege to any of the nodes

    To resolve this error message:

    1. Check to see if CM was installed and configured properly. See your Operating System Dependent layer vendor documentation for further information.

    2. Check if you have administrative privileges on nodes by entering:

      NET USE \\host_name\C$ 
      
      

      where host_name is the host name defined in the DefinedNodes registry value for CM.

      A successful connection results in "The command completed successfully."

      Oracle Corporation recommends using the same user name and password on each node in a cluster or use a domain user name. If you use a domain user name, log on under a domain with username and password which has administrative privileges on each node.

    3. Remove entries made to the registry by the Oracle Database Configuration, as described in "Cleaning Up the Registry After an Oracle Database Configuration Assistant Failure on Windows NT".

  2. Select the nodes where you want the software installed. You must always select at least two nodes, including the local node. If you deselect the local node, it will still be selected.

    The following page appears:


    Option   Description  

    Copy existing database files from the CD  

    Creates a standard starter database with parameters for each instance in INITSID.ORA and common parameters shared from node-to-node in INITDB_NAME.ORA.  

    Create new database files  

    Customizes the creation of the following database types.

    • Online Transaction Processing (OLTP) database

    • Decision Support System (DSS) database

    • Hybrid database (combination of OLTP and DSS)

     

  3. Respond to instructions in each Oracle Database Configuration Assistant page, then click Next when you are ready to continue to the next page.

    When you get to the page that requests the global database name and SID prefix:

    • Enter an appropriate global database name, database name and domain, for the Oracle Parallel Server, such as OP.domain.

    • Accept or change the prefix for the Oracle System Identifier (SID) that will be used in the SID field. The prefix entered here will be appended with each node's thread ID to create the SID. For example, if OP is entered here, the first node would have a SID of OP1, the second node OP2, and so on.


  4. When you get to the last screen, click Finish to start the creation of the Oracle Parallel Server database.

Using Database Creation Assistant results in the creation of the following files:

See "Understanding the Initialization Files" for further information about these files.


Note:

If the Oracle Database Creation Assistant fails to create the database, see "Cleaning Up the Registry After an Oracle Database Configuration Assistant Failure on Windows NT".  


Starting the Database in Parallel Mode

To start the Oracle Parallel Server database in parallel mode:


Note:

Prior to performing the tasks below, ensure your vendor-supplied CM component is configured and started on each node. See your Operating System Dependent vendor documentation for further information.  


  1. On Windows NT only, start OracleServiceSID instance on each node.

    • From the MS-DOS command line, enter:

      C:\> net start OracleServiceSID
      
      
    • From the Control Panel's Services window, select OracleServiceSID, then click Start.

  2. Start the listener on each of the nodes. Enter:

    lsnrctl
    lsnrctl> start [listener_name]
    
    

    where listener_name is the name of the listener defined in the LISTENER.ORA file. It is not necessary to identify the listener if you are using the default listener, named LISTENER.

    LSNRCTL will display a status message indicating that the listener has started successfully. Check that all expected services for that listener are listed in the services summary in the status message.

  3. On the one of the nodes, start the database:

    sql> CONNECT internal/password
    sql> STARTUP; 
    
    

    The first instance to start up in shared mode determines the values of the global constant parameters for the other instances. The control file records the values of the GC_* parameters when the first instance starts up.

    When another instance attempts to start up in shared mode, the Oracle Server compares the values of the global constant parameters in its parameter file with those already in use and issues a message if any values are incompatible. The instance cannot mount the database unless it has the correct values for its global constant parameters.

  4. On the remaining nodes, start the database:

    sql> CONNECT internal/password
    sql> STARTUP; 
    

Verifying Instances Are Running

To verify instances are running:

  1. On any node, enter the following:

    sql> CONNECT internal/password
    sql> SELECT * from v$active_instances;
    
    

    The following output is returned:

    INST_NUMBER  INST_NAME
    -----------  ---------
               1 node1:ops1
               2 node2:ops2
               3 node3:ops3
    . . 
    
    .
  2. On all the nodes, connect as SCOTT/TIGER, and view the EMP table.

    sql> CONNECT scott/tiger
    sql> SELECT * from emp;
    
    

    The employee table displays:

        EMPNO ENAME      JOB             MGR HIREDATE        SAL      COMM    DEPTNO
    --------- ---------- --------- --------- --------- --------- --------- ---------
         7369 SMITH      CLERK          7902 17-DEC-80       800                  20
         7499 ALLEN      SALESMAN       7698 20-FEB-81      1600       300        30
         7521 WARD       SALESMAN       7698 22-FEB-81      1250       500        30
         7566 JONES      MANAGER        7839 02-APR-81      2975                  20
         7654 MARTIN     SALESMAN       7698 28-SEP-81      1250      1400        30
         7698 BLAKE      MANAGER        7839 01-MAY-81      2850                  30
         7782 CLARK      MANAGER        7839 09-JUN-81      2450                  10
         7788 SCOTT      ANALYST        7566 19-APR-87      3000                  20
         7839 KING       PRESIDENT           17-NOV-81      5000                  10
         7844 TURNER     SALESMAN       7698 08-SEP-81      1500         0        30
         7876 ADAMS      CLERK          7788 23-MAY-87      1100                  20
         7900 JAMES      CLERK          7698 03-DEC-81       950                  30
         7902 FORD       ANALYST        7566 03-DEC-81      3000                  20
         7934 MILLER     CLERK          7782 23-JAN-82      1300                  10
    

14 rows selected.

Configuring Net8 for Nodes

A user identifies an Oracle Parallel Server instance, its database service and the location of the database on the network through a net service name. When an end user connects to an instance, the service is identified by the net service name. The nodes and clients must be configured with net service names.

Services coordinate their sessions with the help of a listener. The listener receives connection requests on behalf of a client application. Listener are configured to "listen on" an address for a database service. See the Net8 Administrator's Guide for further information about net service names and the listener.

Each node must have the following configuration files in $ORACLE_HOME/network/admin on UNIX or ORACLE_HOME\network\admin on Windows NT:

Configuration File   Description   Configuration Requirements  

LISTENER.ORA  

Includes addresses of all network listeners on a server, the SIDs of the databases for which they listen, and various control parameters used by the listener.  

Note: The LISTENER.ORA file is already configured with the necessary data by the Net8 Configuration Assistant and Oracle Database Configuration Assistant during the installation and configuration process.

In an Oracle Parallel Server environment that uses Oracle Enterprise Manager, the LISTENER.ORA file on each node must be configured with:

  • a TCP/IP address

  • an entry for the SID of the node in the SID_LIST_listener_name section. For example:

    SID_LIST_LISTENER =
     (SID_LIST =
        (SID_DESC =
          (SID_NAME = op1)
          (GLOBAL_DBNAME = op.com))
     )
    
 

TNSNAMES.ORA  

Includes a list of network descriptions of service names, called net service names.

Note: While net service names may be stored in various ways, Oracle Corporation recommends using a TNSNAMES.ORA file. In order to use the Oracle Enterprise Manager products, a TNSNAMES.ORA file is required.  

  • A net service name must be specified for each node's instance. The service name specified must be the same for all nodes, and the instance name specified must be unique for each instance.

  • A net service name should be specified for the database.

 

SQLNET.ORA  

Includes the names resolution method.  

Because the net service names are specified in TNSNAMES.ORA files, the SQLNET.ORA must specify that TNSNAMES.ORA be used when resolving a net service name.  

S


Note:

Oracle Enterprise Manager uses entries from TNSNAMES.ORA files on the managed nodes. If your network has Oracle Names servers, TNSNAMES.ORA files must still be configured.  


The steps to perform to configure the network include:

Step 1: Configure the Listener

Step 2: Configure Net Service Names

Step 3: Configure SQLNET.ORA

Configuring Net8 for Clients

Step 1: Configure the Listener

Listener configuration should not be necessary, as it is taken care of as a part of the installation process, as described in:

If configuration is still necessary, follow the instructions in "Configuring LISTENER.ORA".

Typical Installation Results

During a Typical installation, the Net8 Configuration Assistant creates a default LISTENER.ORA file for a listener named LISTENER that listens on the following protocol addresses:

Additionally, the Oracle Database Configuration Assistant configures information about the database, including the global database name and SID in the LISTENER.ORA. Typically, static configuration of this information is not necessary in a release 8.1 configuration, because instances register this information with the listener upon startup. However, this information is necessary for Oracle Intelligent Agent to work properly.

A sample LISTENER.ORA is shown below:

listener =
  (description_list =
    # IPC listenening endpoint for external procedures' connections
    (description =
      (address_list =
        (address = (protocol = ipc)(key = extproc0))
      )
    )
    # TCP/IP listenening endpoint for java option connections
    (description =
      (protocol_stack =
        (presentation = giop)
        (session = raw)
      )
      (address_list =
        (address = (protocol = tcp)(host = opshp1-pc)(port = 2481))
      )
    # TCP/IP listenening endpoint for database connections
    (description =
      (address_list =
        (address = (protocol = tcp)(host = opshp1-pc)(port = 1521))
      )
    )
  )

     
sid_list_listener =
  (sid_list =
    (sid_desc =
      (sid_name = plsextproc)
      (oracle_home = c:\orahome)
      (program = extproc)
    )
# Information about database needed for Oracle Intelligent Agent
    (sid_desc =
      (global_dbname = op.us.oracle.com)
      (oracle_home = c:\orahome\ops)
      (sid_name = op1)
    )
  )

Custom Installation Results

During a Custom installation, a LISTENER.ORA file should had been created for a listener named by you for a protocol address you configured, as described in "Custom Installation".

Additionally, the Oracle Database Configuration Assistant configures information about the database, including the global database name and SID in LISTENER.ORA. Typically, static configuration of this information is not necessary in a release 8.1 configuration, because instances register this information with the listener upon startup. However, this information is necessary for Oracle Enterprise Manager version 2 to work properly.

Configuring LISTENER.ORA

If the LISTENER.ORA is not configured for some reason, use the Net8 Assistant to perform the following procedure on each node:

  1. Stop the listener. At the command line, enter:

    lsnrctl
    lsnrctl> stop [listener_name]
    
    

    listener_name is the name of the listener defined in the LISTENER.ORA file. It is not necessary to identify the listener if for the default listener, named LISTENER.

  2. Start the Net8 Assistant:

    -On UNIX, run the shell script netasst at $ORACLE_HOME/bin.

    -On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  3. Double-click on the Listeners folder.

  4. Select the listener. If one does not exist:

    1. Select Create from the Edit menu or click on the "+" button to create a new listener. The Choose Listener Name dialog appears.

    2. Enter the listener name, then click OK. This listener is added.

  5. Choose Listening Locations from the drop-down list box.

  6. Click Add Address:


  7. Choose TCP/IP as the protocol, enter the name of the node's host, and choose port 1521.



    Note:

    If you do not choose the registered port of 1521, you must configure the LOCAL_LISTENER parameter in the INITDB_NAME.ORA file and resolve it with a net service name entry in the TNSNAMES.ORA file. For further information about configuring non-default port numbers in LISTENER.ORA, see Chapter 6, "Configuring Naming Methods and the Listener" in the Net8 Administrator's Guide.  


  8. Choose Database Services from the drop-down list box.

  9. Click Add Database:


  10. Enter the global database name for the database in the Global Database Name field, the Oracle home in the Oracle Home Directory field, and the SID of the node's instance in the SID field.

  11. Select Save Network Configuration from the File menu.

  12. Choose Exit from the File menu to exit the Net8 Assistant application.

  13. Start the listener. At the command line, enter:

    lsnrctl
    lsnrctl> start listener_name
    

listener_name is the name of the listener defined in the LISTENER.ORA file. It is not necessary to identify the listener if for the default listener, named LISTENER.



Note:

On UNIX platforms, to use a single LISTENER.ORA file that lists all listeners on all nodes, the listeners must have distinct names. This can be accomplished by setting the lsnr_listener_name parameter in the DB_NAME.CONF file, located in $ORACLE_HOME/ops:

lsnr_listener_name = "listener_%m"

The LISTENER.ORA file can then be distributed to all the nodes. For further information about the DB_NAME.CONF file, see "Parameter Descriptions".


Step 2: Configure Net Service Names

A net service name is mapped to a network address contained in a connect descriptor in a TNSNAMES.ORA file. A connect descriptor contains the location of the listener through a protocol address and the service name of the service to which to connect. Clients use this net service name when making a connection with an application.

This section discusses the following:

Creating Entries in TNSNAMES.ORA for Each Instance

A net service name must be created for each Oracle Parallel Server instance.

To configure a TNSNAMES.ORA file for an Oracle Parallel Server, use the Net8 Assistant:

  1. On one of the nodes, start the Net8 Assistant:

    -On UNIX, run the shell script netasst at $ORACLE_HOME/bin.

    -On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Double-click on the Net Service Name folder in the directory tree.

  3. Select Create from the Edit menu or click on the "+" button to create a new net service name. The Net Service Name Wizard starts.

  4. Enter a name in the New Net Service Name field, and click Next.

    For clarity, the name should reflect the SID of instance on the node, such as OP1, OP2, and so on.


    If you want to be explicit, the net service name may be qualified with the domain.

  5. Select the protocol the listener is configured to listen on (this protocol must also installed on the clients), then click Next:


  6. Enter the appropriate listener protocol address information for your chosen protocol in the fields, then click Next:


  7. Click Oracle8 Version 8.1, enter a service name in the Service Name field, then click Next:


    The service name is typically the global database name, a name comprised of the database name and domain, entered during installation. An example service name is OP.US.ORACLE.COM, where OP is the database name and US.ORACLE.COM is the domain.

  8. Click Finish

    The net service name is added to the Net Service Names folder:


  9. Click Advanced in the Service Identification group box. The Advanced Service Options dialog box appears:


  10. Enter the instance name in the Instance Name field, then click OK. The instance name value may be obtained from the INSTANCE_NAME value in INITSID.ORA

    The instance name should match the net service name or SID of the instance on the node, such as OP1, OP2, and so on.

  11. Repeat Steps 2-10 for the other net service names. The value of the service name should be identical for all instances, but the instance names should be unique.

  12. Choose Save Network Configuration from the File menu.

  13. Choose Exit from the File menu to exit the Net8 Assistant.

  14. Copy the newly created TNSNAMES.ORA configuration file to the other nodes and clients. This will ensure the files are consistent. Otherwise, you must use Net8 Assistant on every client, introducing possible errors.

A sample TNSNAMES.ORA file is shown below:

op1 = 
  (description = 
   (address = 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
   (connect_data = 
       (service_name = op.us.oracle.com)
       (instance_name = op1))
op2 = 
  (description = 
    (address = 
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
    (connect_data = 
       (service_name = op.us.oracle.com)
       (instance_name = op2))

Creating An Entry in the TNSNAMES.ORA File for the Database and Enabling Client Load Balancing

Oracle Corporation recommends creating a net service name for the Oracle Parallel Server database. Optionally, this net service name can also be created so that it randomly selects instances with client load balancing.


Note:

Besides client load balancing, this net service name can also be set up for connect-time failover and transparent application failover. Configuring both types of failover requires additional configuration to LISTENER.ORA and TNSNAMES.ORA, as described in "Configuring Net8 with Failover".  


Client load balancing (LOAD_BALANCE = ON) instructs Net8 to balance the load over the list of listener addresses by picking one at random. Client load balancing is turned ON by default for multiple connect descriptors (DESCRIPTION_LIST).

To create a net service name for the database and enable client load balancing:

  1. Create a new net service name, following steps 1-7 in "Creating Entries in TNSNAMES.ORA for Each Instance". Instead of naming the net service name after the node's instance, name it after the database, for example, OP, and configure the address for one of the nodes:

  2. Double-click the Net Service Names folder, and click the newly-created net service name.

  3. Click the "+" button:


  4. Enter the address information for the next node.

  5. Repeat steps 3-4 for each additional node.

    Addresses created in this manner will be tried by the node in the order presented. To randomly have the node choose between the multiple address during a connection:

    1. Click Advanced in the Address Configuration group.

      The Address List Options dialog box appears:


    2. Click Try one address, selected at random, then click OK.

  6. Choose Save Network Configuration from the File menu.

    The TNSNAMES.ORA file is re-created.

  7. Choose Exit from the File menu.

    The Net8 Assistant application exits.

Shown below is a 8.1 release TNSNAMES.ORA file with net service names of OP, OP1 and OP2. OP allows the node to connect to the database service OP and try one address at random. OP1 and OP2 allow the node to connect to a specific Oracle Parallel Server instance.

op = 
 (description= 
  (load_balance=on)
  (address= 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
  (address=
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
  (connect_data=
     (service_name=op.us.oracle.com)))
op1 = 
  (description = 
   (address = 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
   (connect_data = 
       (service_name = op.us.oracle.com)
       (instance_name = op1))
op2 = 
  (description = 
    (address = 
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
    (connect_data = 
       (service_name = op.us.oracle.com)
       (instance_name = op2))

Additional Configuration Required for Windows NT in the TNSNAMES.ORA File

If you plan to use Oracle Enterprise Manager and OPS is installed on a Windows NT cluster, additional net service names must be added to the TNSNAMES.ORA file.

When Oracle Enterprise Manager performs a startup of instances running on UNIX nodes, a command is passed to a process on the node to perform a local connection.

On Windows NT, a remote connection is performed from the one of the nodes to the other nodes using entries in the TNSNAMES.ORA file. This remote connection cannot accept the SERVICE_NAME and INSTANCE_NAME parameters in the TNSNAMES.ORA if the database is down. This occurs because this information about the database is not registered with the listener unless the database is up.

The workaround to this problem is to specify additional net service names that use SID rather than SERVICE_NAME and INSTANCE_NAME. If you plan to use Oracle Enterprise Manager and Oracle Parallel Server is installed on Windows NT nodes, you must perform the following:

To configure the additional net service names on Windows NT nodes:

  1. Create net service names for each node's instances, as described in "Creating Entries in TNSNAMES.ORA for Each Instance" and "Creating An Entry in the TNSNAMES.ORA File for the Database and Enabling Client Load Balancing".

  2. Create additional net service names named SID_startup for each node's instance using SID rather than SERVICE_NAME and INSTANCE_NAME.

    1. In the Net8 Assistant, double-click on the Net Service Name folder in the directory tree.

    2. Select Create from the Edit menu or click on the "+" button to create a new net service name. The Net Service Name Wizard starts.

    3. Enter a name in the New Net Service Name field, and click Next.

      The name should be SID_startup, such as OP1_startup:


    4. Select the network protocol you want to use (this protocol must also installed on the clients), and click Next.

    5. Enter the appropriate listener address information for your chosen protocol in the fields, and click Next.

    6. Click Oracle8 Version 8.0 or Previous, enter the SID in the Database SID field, such as OP1, and click Next.

      The net service name is added to the Net8 Service Names folders.

    7. Repeat Steps a-f for each node's instance in the cluster.

    8. Choose Save Network Configuration from the File menu.

    9. Choose Exit from the File menu to exit the Net8 Assistant.

    10. Copy the newly created TNSNAMES.ORA configuration file to the other nodes and clients. This will ensure the files are consistent. Otherwise, you must use Net8 Assistant on every client, introducing possible errors.

A sample TNSNAMES.ORA file is shown below:

op = 
 (description= 
  (load_balance=on)
  (address= 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
  (address=
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
  (connect_data=
     (service_name=op.us.oracle.com)))
op1 = 
  (description = 
   (address = 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
   (connect_data = 
       (service_name = op.us.oracle.com)
       (instance_name = op1))
op2 = 
  (description = 
    (address = 
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
    (connect_data = 
       (service_name = op.us.oracle.com)
       (instance_name = op2))
op1_startup = 
  (description = 
    (address = 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
    (connect_data = 
       (sid = op1))
op2_startup = 
  (description = 
    (address = 
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
    (connect_data = 
       (sid = op2))

Step 3: Configure SQLNET.ORA

Configure local naming as the first method specified in the NAMES_DIRECTORY_PATH parameter in the SQLNET.ORA file. This parameter specifies the order of naming methods Net8 will use to reconcile services.

To specify local naming as the first naming method:

  1. Start the Net8 Assistant:

    • On UNIX, run netasst at $ORACLE_HOME/bin.

    • On Windows NT, choose Start > Programs > Oracle - HOME_NAME > Network Administration > Net8 Assistant.

  2. Click the Profile icon.

  3. Choose Naming from the drop-down list box.

  4. Click the Methods tab.

  5. Choose TNSNAMES from the Available Methods list, then click ">".

  6. Select TNSNAMES in the Selected Methods list, then use the Promote button to move the selection to the top of the list:


  7. Choose Save Network Configuration from the File menu.

  8. Choose Exit from the File menu to exit the Net8 Assistant application.

    The SQLNET.ORA file should contain an entry that lists TNSNAMES first in the NAMES.DIRECTORY_PATH parameter:

    names.directory_path = (tnsnames, onames, hostname)
    
    
  9. Copy the newly created SQLNET.ORA configuration file to the other nodes and clients. This will ensure the files are consistent. Otherwise, you must use Net8 Assistant on every client, introducing possible errors.

Configuring Net8 for Clients

Clients should be configured with a TNSNAMES.ORA and SQLNET.ORA files, as described in

"Step 2: Configure Net Service Names"

"Step 3: Configure SQLNET.ORA"

If the client is running Oracle Enterprise Manager or Oracle Performance Manager, see Chapter 5, "Installing and Configuring Oracle Parallel Server Management" for further information about configuring Net8 for these applications.

Configuring Net8 with Failover

You can enable the following types of failover:

Connect-time failover instructs Net8 to fail over to a different listener if the first listener fails when set to ON. The number of addresses in the list determines how many addresses are tried. When set to OFF, instructs Net8 to try one address.

Failover is turned ON by default for multiple address lists (ADDRESS_LIST), connect descriptors (DESCRIPTION), and multiple connect descriptors (DESCRIPTION_LIST).

Transparent application failover instructs Net8 to fail over to a different listener if the first listener fails during runtime. Depending upon the configuration, session or any SELECT statements which were in progress are automatically failed over. This parameter must be embedded under CONNECT_DATA.

See the Net8 Administrator's Guide for further conceptual information about connect-time failover and Oracle8i Tuning for further conceptual information about transparent application failover.

Establishing both kinds of failover requires that you:

Configure the Listener

Implementing failover does not allow use of static service configuration parameters in the LISTENER.ORA file, such as:

sid_list_listener =
    (sid_desc =
      (global_dbname = op.us.oracle.com)
      (oracle_home = c:\orahome\ops)
      (sid_name = op1)
    )
  )

However, this information is the default implementation and is required by the Oracle Intelligent Agent for Oracle Enterprise Manager.

In order to implement failover, an additional listener must be specified on each node in the LISTENER.ORA file without service registration information. Perform the following steps:

Step 1: Stop the Listener

Step 2: Add Entry for New Listener in LISTENER.ORA

Step 3: Start the Listener

Step 1: Stop the Listener

Stop the listener. At the command line, enter:

lsnrctl
lsnrctl> stop [listener_name]
     

listener_name is the name of the listener defined in the LISTENER.ORA file. It is not necessary to identify the listener if you are using the default listener, named LISTENER.

Step 2: Add Entry for New Listener in LISTENER.ORA

Add an entry for a new listener to the LISTENER.ORA file that listens on TCP/IP protocol with the same port number as the first listener, which is typically listening on port 1521. This information must be added manually, as the Net8 Assistant does not permit using the same port number for another listener.

Do not add an service information with the SID_LIST_listener_name parameter.


Note:

If you do not use the registered port of 1521, you must configure the LOCAL_LISTENER parameter in the INITDB_NAME.ORA file and resolve it with a net service name entry in the TNSNAMES.ORA. For further information about configuring non-default port numbers in LISTENER.ORA, see Chapter 6, "Configuring Naming Methods and the Listener" in the Net8 Administrator's Guide.  


For example, a second listener named LISTENER1 has been added to the LISTENER.ORA file below:

# listening endpoints for a listener named LISTENER1
listener1 =
  # TCP/IP listenening endpoint for database connections
  (description =
    (address = (protocol = tcp)(host = opshp1)(port = 1521))
    )
  )
listener =
  (description =
    (address = (protocol = tcp)(host = opshp1)(port = 1521))
    )
  )
# Static information about services for a listener named LISTENER
sid_list_listener =
  (sid_list =
    # Database information needed for Oracle Intelligent Agent
    (sid_desc =
      (global_dbname = op.us.oracle.com)
      (oracle_home = c:\orahome\ops)
      (sid_name = op1)
    )
  )

Step 3: Start the Listener

Start only the newly configured listener. At the command line, enter:

lsnrctl
lsnrctl> start listener_name
     

listener_name is the name of the new listener defined in the LISTENER.ORA file (LISTENER1).

Configuring the TNSNAMES.ORA File for Failover

Failover is configured in the TNSNAMES.ORA file:

Configuring Connect-Time Failover

To configure connect-time failover for a client:

  1. Create a new net service name, following steps 1-7 in "Creating Entries in TNSNAMES.ORA for Each Instance". Instead of naming the net service name after the node's instance, name it after the database, for example, OP, and configure the address for one of the nodes:

  2. Double-click the Net Service Names folder, and click the newly-created net service name.

  3. Click the "+" button:


  4. Enter the address information for the next node.

  5. Repeat steps 3-4 for each additional node.

  6. Click Advanced in the Address Configuration group.

    The Address List Options dialog box appears:


  7. Ensure the Use Options Compatible with Net8 8.0 Clients option is OFF.

  8. Use one of the connect-time failover options indicated below, then click OK.

    Net8 Assistant Option   TNSNAMES.ORA Parameter Setting  

    Try each address, in order, until one succeeds  

    FAILOVER=ON  

    Try each address, randomly, until one succeeds

    This option turns both connect-time failover and client load balancing to ON.  

    LOAD_BALANCE=ON

    FAILOVER=ON  

  9. Choose Save Network Configuration from the File menu.

    The TNSNAMES.ORA file is re-created.

  10. Choose Exit from the File menu.

    The Net8 Assistant application exits.

Shown below is a 8.1 release TNSNAMES.ORA file with net service names of OP, OP1 and OP2. OP allows the node to connect to the database service OP and try each address at random until one succeeds. OP1 and OP2 allow the node to connect to a specific Oracle Parallel Server instance.

op = 
 (description= 
  (load_balance=on)
  (failover=on)
  (address= 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
  (address=
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
  (connect_data=
     (service_name=op.us.oracle.com)))
op1 = 
  (description = 
   (address = 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
   (connect_data = 
       (service_name = op.us.oracle.com)
       (instance_name = op1))
op2 = 
  (description = 
    (address = 
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
    (connect_data = 
       (service_name = op.us.oracle.com)
       (instance_name = op2))

Configuring Transparent Application Failover

Transparent application failover involves manual configuration that includes specification of a primary node with a typical ADDRESS parameter and a backup node, failover type and failover method with a FAILOVER_MODE parameter.

FAILOVER_MODE can be implemented with connect-time failover with multiple addresses. In the example below, Net8 will try to make a connection to the one of the listener address (OPSHP1 or OPSHP2) at random. If, after the connection, the node should go down, Net8 will fail over to the other node, reserving any SELECT statements in progress.

op = 
 (description= 
  (load_balance=on)
  (failover=on)
  (address= 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
  (address=
       (protocol = tcp) 
       (host = opshp2) 
       (port = 1521))
  (connect_data=
     (service_name=op.us.oracle.com)
     (failover_mode =
       (type = select))
  )
 )

A specific address can be specified to initially make a connection. Additionally, a backup node can specified in the FAILOVER_MODE parameter in case of a failure. In the example below, there is no connect-time failover. Net8 will try only OPSHP1. If, after the connection, OPSHP1 should go down, Net8 will fail over to OPSHP2, reserving any SELECT statements in progress.

op = 
 (description= 
  (address= 
       (protocol = tcp) 
       (host = opshp1) 
       (port = 1521))
  (connect_data=
     (service_name=op.us.oracle.com)
     (failover_mode = 
        (backup = opshp2)
        (type = select)
        (method = basic)
     )
  )

)

FAILOVER_MODE parameters are described below:

PARAMETER   Description  

BACKUP  

Specifies the failover node.  

TYPE (Required)  

Specifies the type of failover. Three types of Net8 failover functionality are available by default to Oracle Call Interface (OCI) applications:

SESSION: Fails over the session; that is, if a user's connection is lost, a new session is automatically created for the user on the backup. This type of failover does not attempt to recover selects.

SELECT: Allows users with open cursors to continue fetching on them after failure. However, this mode involves overhead on the client side in normal select operations.

NONE: This is the default, in which no failover functionality is used. This can also be explicitly specified to prevent failover from happening.

 

METHOD  

Determines how fast failover occurs from the primary node to the backup node:

BASIC: Establishes connections at failover time. This option requires almost no work on the backup server until failover time.

PRECONNECT: Pre-establishes connections. This provides faster failover but requires that the backup instance be able to support all connections from every supported instance

 

Testing the Net8 Configuration

To ensure the files are configured correctly:

  1. On any node or client machine, connect to an instance:

    sql> CONNECT internal/password@net_service_name
    
    

    A "Connected" message should be returned to the screen.

    If there is an error in connecting, you must troubleshoot your installation. Typically, there is a problem with the IP address, host name, service name, or instance name.

  2. On the one node, increase MILLER's salary by $1000 and commit the change:

    sql> UPDATE emp
    set sal = sal + 1000
    where ename = 'miller';
    sql> commit;
    
    
  3. On the other nodes, select the EMP table again:

    sql> SELECT * from emp;
    
    

    MILLER's salary should now be $2,300, indicating all the instances can see the database.




Prev

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index