Sun N1 Service Provisioning System User's Guide for Oracle Database Plug-In 3.0

Chapter 4 Using the Oracle Database Plug-In

The Oracle Database plug-in provides specific components and functions for working with Oracle 9i and 10g single-instance database software. This chapter describes the following information:

Oracle Database Plug-In Process Overview


Note –

This release of the Oracle database plug-in only supports Oracle database software in single-instance environments. Support for Oracle RAC (Real Application Clusters) is not included.


Working with the Oracle database plug-in is a multi-step process.

  1. Procure the Oracle database software for use on individual nodes.

  2. Define the directory structure in which you want your Oracle installation to reside.

  3. Download and apply any required patches from the Oracle web site.


    Note –

    At present, the known Oracle patches apply to the following releases.

    • Oracle 9i for Redhat Linux AS 3.0 systems

    • Oracle 10g Release 1 for Solaris 10 systems

    For more information about applying patches to the Oracle database software, see the Oracle database documentation at http://www.oracle.com.


  4. Define the directory structure that you want applied to your target Oracle installations.

  5. For Oracle 9i:

  6. For Oracle 10g:

Oracle Support Scripts

The Oracle support scripts primarily perform steps such as creating appropriate Oracle users, and, for Linux systems, defining shared memory and creating semaphore settings. These scripts are contained in the OraSpt component. The support scripts are installed when you install the single-instance software.

Oracle Users and Groups

The OraSpt component creates one OS user and two OS groups:

If a group exists in NIS or LDAP, the support scripts append “n1” to the group name. Thus, if a group dba exists, the plug-in creates a user n1dba.

Oracle Single-Instance Software

The SingleInst component encapsulates and deploys files for the single-node Oracle database software.

ProcedureHow to Set Session Variables

Before you install the Oracle database software or create any databases, you must set the session variable sysPass. This variable acts as the default password for the database users SYS and SYSTEM.


Note –

The password that you define here is also the password that you use to run SQL*Plus.


To set the session variable in the N1 SPS browser interface, follow these steps.

Steps
  1. At the top of the window in the N1 SPS browser interface, click Session Variables.

  2. In the Session Variable field, type sysPass.

  3. In the Password column, check the box.

  4. In the Value field, type the password to use for the database users SYS and SYSTEM.

    The password encrypts as you type.

  5. In the Action column, click Create.

  6. Provide the appropriate N1 SPS password when prompted.

ProcedureHow to Install Oracle Single-Instance Software for Oracle Database 10g

Before You Begin

You might need to perform the following tasks before you provision the Oracle Database 10g software.

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select Oracle Database 10g.

  2. On the Oracle Database 10g Common Tasks page, click Install.

  3. On the Plans Details page, click Run.

  4. Choose variables to use for the Oracle support scripts.


    Note –

    The first time you install the Oracle 10g Database Plug-In you must create a variables set other than default.


    • To use an existing variables set, select a name from the drop-down menu in the OraSpt component row of the Plan Parameters table.

    • To create a new variables set, click Select from List in the OraSpt component row of the Plan Parameters table.

      1. Click Create Set.

      2. Type a name for the variables set in the Set Name field.

      3. In the field for installPath, provide the full path to the location into which you want the support scripts installed.

        For example, /var/tmp/Ora_Spt.


        Note –

        The value for the installPath variable is treated as a relative path to the default Remote Agent directory, unless you specify an absolute path, such as /opt. For example, for a Solaris Remote Agent, if you set the installPath variable to opt and deploy the file to an Agent with a default home directory of /opt/SUNWn1sps/agent, the file is deployed to /opt/SUNWn1sps/agent/opt/.


      4. In the field for installerHome, provide the full path to the location of the Oracle software files.

        For example, /mnt/Ora10gR1.

        This path can point to a CD or to some other location in which you have placed the appropriate files. For Oracle 10g, the installerHome variable points to the top directory of the software CD, which is the parent directory above the Disk1 directory.

      5. For single-instance support files, verify that the racInstall field is set to FALSE.

      6. Save the variables set.

      7. Select the variables set that you just saved from the drop-down menu in the OraSpt component row of the Plan Parameters table.

  5. Choose variables to use for the single-instance software.

    • To use an existing variables set, select a name from the drop-down menu in the SingleInst component row of the Plan Parameters table.

    • To create a new variables set, click Select from List in the SingleInst component row of the Plan Parameters table.

      1. Click Create Set.

      2. Type a name for the variables set.

      3. In the field for installPath, provide the full path to the location where you want to place the Oracle silent response file.

        For example, /var/tmp/Oracle10g.


        Note –

        The value for the installPath variable is treated as a relative path to the default Remote Agent directory, unless you specify an absolute path, such as /opt. For example, for a Solaris Remote Agent, if you set the installPath variable to opt and deploy the file to an Agent with a default home directory of /opt/SUNWn1sps/agent, the file is deployed to /opt/SUNWn1sps/agent/opt/.


      4. If a component already exists on this host for which the default value for ORACLE_HOME_NAME is used, define a value for the variable ORACLE_HOME_NAME.


        Note –

        Two components installed in the same physical host cannot have the same ORACLE_HOME_NAME.


      5. In the field for installerHome, provide the full path to the location of the Oracle software files.

        For example, /mnt/Ora10gR1.

        This path can point to a CD or to some other location in which you have placed the appropriate files. The installerHome variable points to the top directory of the software, which is the parent directory above the Disk1 directory.

      6. In the field for ORACLE_BASE, provide the path to the root directory into which you want the Oracle software to be installed.

        For example, /opt/app/oracle.

      7. To run the Oracle listener on this host, set the value for crListener to TRUE.


        Note –

        You should run only one Oracle listener per physical host.


      8. Verify that the softGroup and dbaGroup variables are correct.

        1. On the target host, type the following command: id -a oracle.

        2. Note the group names that were created for the oracle user.

        3. If the group names are different from the default names in the softGroup or dbaGroup fields, change those values as appropriate.

      9. Verify that the oraPrflFile is set correctly.

        • If you are installing the Oracle 10g database on a Solaris system, set the oraPrflFile variable to profile.

        • If you are installing the Oracle 10g database on a Linux system, set the oraPrflFile variable to bash_profile.


        Note –

        For the oraPrflFile variable, the environment file must be either a Bourne shell, Korn shell, or bash profile. C shell is not supported.


      10. Verify that the TOPLEVEL_COMPONENT variable exactly matches the version of Oracle to install.

        For example, if you intend to install 10.1.0.3.0, you must change the value of the TOPLEVEL_COMPONENT variable from its default of 10.1.0.2.0 to 10.1.0.3.0.

      11. Change other variables as appropriate.

      12. Save the variables set.

      13. Select the variables set that you just saved from the drop-down menu in the SingleInst component row of the Plan Parameters table.

  6. To select the target host, click Select from List next to the Target Host field on the Plans Details Run page.


    Note –

    Although the plug-in enables you to install this component into a host set, host sets are more likely to make sense for a RAC install rather than a single-instance install.


  7. If necessary, modify the values for the Limit Overall Running Time of Plan and Limit Running Time of Native Calls fields.

    By default, the timeout value for plans is set to 30 minutes. In some instances, such as when executing a plan on older hardware, the amount of time that is needed for a plan to complete exceeds 30 minutes. To increase the plan timeout value, increase the values of Limit Overall Running Time of Plan and Limit Running Time of Native Calls fields.

  8. To install the software, click Run Plan (includes preflight).

ProcedureHow to Install Oracle Single-Instance Software for Oracle Database 9i

Before You Begin

You might need to perform the following tasks before you provision the Oracle Database 9i software.

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select Oracle Database 9i.

  2. On the Oracle Database 9i Common Tasks page, click Install.

  3. On the Plans Details page, click Run.

  4. Choose variables to use for the Oracle support scripts.


    Note –

    The first time you install the Oracle 9i Database Plug-In you must create a variables set other than default.


    • To use an existing variables set, select a name from the drop-down menu in the OraSpt component row of the Plan Parameters table.

    • To create a new variables set, click Select from List in the OraSpt component row of the Plan Parameters table.

      1. Click Create Set.

      2. Type a name for the variables set.

      3. In the field for installPath, provide the full path to the location into which you want the support scripts installed.

        For example, /var/tmp/Ora_Spt.


        Note –

        The value for the installPath variable is treated as a relative path to the default Remote Agent directory, unless you specify an absolute path, such as /opt. For example, for a Solaris Remote Agent, if you set the installPath variable to opt and deploy the file to an Agent with a default home directory of /opt/SUNWn1sps/agent, the file is deployed to /opt/SUNWn1sps/agent/opt/.


      4. In the field for installerHome, provide the full path to the location of the Oracle software files.

        For example, /mnt/Ora9iR2/3006854.

        The installerHome variable points to the top directory of the software, which is the parent directory above the Disk1 directory. For Oracle 9i on Redhat Linux AS 3.0, the installerHome variable points to the directory that contains Oracle Patch No. 3006854.


        Note –

        The Oracle database plug-in does not support changing CDs during the installation process. Because Oracle 9i has three physical CDs, you should copy the CDs to the subdirectories Disk1, Disk2, and Disk3, respectively, of a single location from which all information can be accessed.


      5. To run Oracle 9i on Linux, set the oracleRel variable to 9iR2.

      6. For single-instance support files, verify that the racInstall field is set to FALSE.


        Note –

        This release of the Oracle database plug-in only supports Oracle database software in single-instance environments. Support for Oracle RAC (Real Application Clusters) is not included. As a result, the racInstall variable must remain set to FALSE.


      7. Save the variables set.

      8. Select the variables set that you just saved from the drop-down menu in the OraSpt component row of the Plan Parameters table.

  5. Choose variables to use for the single-instance software.

    • To use an existing variables set, select a name from the drop-down menu in the SingleInst component row of the Plan Parameters table.

    • To create a new variables set, click Select from List in the SingleInst component row of the Plan Parameters table.

      1. Click Create Set.

      2. Type a name for the variables set.

      3. In the field for installPath, provide the full path to the location where you want to place the Oracle silent response file.

        For example, /var/tmp/Oracle9iR2.


        Note –

        The value for the installPath variable is treated as a relative path to the default Remote Agent directory, unless you specify an absolute path, such as /opt. For example, for a Linux Remote Agent, if you set the installPath variable to opt and deploy the file to an Agent with a default home directory of /opt/SUNWn1sps/agent, the file is deployed to /opt/SUNWn1sps/agent/opt/.


      4. If a component already exists on this host for which the default value for ORACLE_HOME_NAME is used, define a value for the variable ORACLE_HOME_NAME.


        Note –

        Two components installed in the same physical host cannot have the same ORACLE_HOME_NAME.


      5. In the field for installerHome, provide the full path to the location of the Oracle software files.

        For example, /mnt/Ora9iR2.

        The installerHome variable points to the top directory of the software, which is the parent directory above the Disk1 directory.

      6. In the field for ORACLE_BASE, provide the path to the root directory into which you want the Oracle software to be installed.

        For example: /opt/app/oracle9

      7. To run the Oracle listener on this host, set the value for crListener to TRUE.


        Note –

        You should run only one Oracle listener per physical host.


      8. Verify that the softGroup and dbaGroup variables are correct.

        1. On the target host, type the following command: id -a oracle.

        2. Note the group names that were created for the oracle user.

        3. If the group names are different from the default names in the softGroup or dbaGroup fields, change those values as appropriate.

      9. Verify that the oraPrflFile is set correctly.

        • If you are installing the Oracle 10g database on a Solaris system, set the oraPrflFile variable to profile.

        • If you are installing the Oracle 10g database on a Linux system, set the oraPrflFile variable to bash_profile.


        Note –

        For the oraPrflFile variable, the environment file must be either a Bourne shell, Korn shell, or bash profile. C shell is not supported.


      10. Verify that the TOPLEVEL_COMPONENT variable exactly matches the version of Oracle to install.

      11. Verify that the FROM_LOCATION_CD_LABEL variable exactly matches the disk label of the Oracle software that you want to install.

      12. Change other variables as appropriate.

      13. Save the variables set.

      14. Select the variables set that you just saved from the drop-down menu in the SingleInst component row of the Plan Parameters table.

  6. To select the target host, click Select from List next to the Target Host field on the Plans Details Run page.


    Note –

    Although the plug-in enables you to install this component into a host set, host sets are more likely to make sense for a RAC install rather than a single-instance install.


  7. If necessary, modify the values for the Limit Overall Running Time of Plan and Limit Running Time of Native Calls fields.

    By default, the timeout value for plans is set to 30 minutes. In some instances, such as when executing a plan on older hardware, the amount of time that is needed for a plan to complete exceeds 30 minutes. To increase the plan timeout value, increase the values of Limit Overall Running Time of Plan and Limit Running Time of Native Calls fields.

  8. To install the software, click Run Plan (includes preflight).

ProcedureHow To Uninstall Oracle Single-Instance Software for Oracle Database 10g

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select Oracle Database 10g.

  2. In the Oracle Database 10g Common Tasks Page, click Uninstall.

  3. In the Plan Details page, click the run button.

  4. Select the host.

    • Type the host name in the target host text field.

    • Use the Select From List link.

      1. Click the Select From List link.

      2. Select the server from the Current Found Hosts list.

      3. Click the Add Hosts to Main Window button.

  5. Select the Cleanup Users, Install File and Start Scripts check box.


    Note –

    If the Cleanup Users, Install File and Start Scripts check box is not selected for a Linux uninstall, a subsequent installation of the database might fail. If you select both the Cleanup Users, Install File and Start Scripts and markOnly Uninstallation check boxes, the markOnly Uninstallation takes precedence, and the Cleanup operation does not occur.


  6. Click Run Plan (includes preflight).

ProcedureHow To Uninstall Oracle Single-Instance Software for Oracle Database 9i

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select Oracle Database 9i.

  2. In the Oracle Database 9i Common Tasks Page, click Uninstall.

  3. In the plans > details page, click the run button.

  4. Select the host.

    • Type the host name in the target host text field.

    • Use the Select From List link.

      1. Click the Select From List link.

      2. Select the server from the Current Found Hosts list.

      3. Click the Add Hosts to Main Window button.

  5. Select the Cleanup Users, Install File and Start Scripts check box.


    Note –

    If the Cleanup Users, Install File and Start Scripts check box is not selected for a Linux uninstall, a subsequent installation of the database might fail. If you select both the Cleanup Users, Install File and Start Scripts and markOnly Uninstallation check boxes, the markOnly Uninstallation takes precedence, and the Cleanup operation does not occur.


  6. Click Run Plan (includes preflight).

Creating and Working with the Database

About the Database

The Oracle database comes in three flavors:

ProcedureHow to Create the Oracle 9i Database

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select Oracle Database 9i.

  2. On the Oracle Database 9i Common Tasks page, click Create.

  3. On the Plans Details page, click Run.

  4. On the Plan Details Run page, select the target host on which you want to create the database.

  5. On the Plan Details Run page, provide plan variables information.

    1. Change the name of the Oracle Service, if needed.

    2. To make this service the default service, click the checkbox.

    3. Type the name of the database template to apply to this database.

      By default, the database template is General_Purpose. This template implies that the database will be used for a mixture of transaction types. The other possible templates are:

      • Data_Warehouse – Database optimized for responding to long-running and “ad hoc” queries

      • Transaction_Processing – Transaction-oriented database intended for handling many short transactions and canned queries

    4. If needed, change the character set to use for the database.

      By default, the character set is Western European (ISO 8859). For more information about character sets in Oracle, see the Oracle documentation.

  6. Click Run Plan (includes preflight).

ProcedureHow to Create the Oracle 10g Database

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select Oracle Database 10g.

  2. On the Oracle Database 10g Common Tasks page, click Create.

  3. On the Plans Details page, click Run.

  4. On the Plan Details Run page, select the target host on which you want to create the database.

  5. On the Plan Details Run page, provide plan variables information.

    1. Change the name of the Oracle Service, if needed.

    2. To make this service the default service, click the checkbox.

    3. Type the name of the database template to apply to this database.

      By default, the database template is General_Purpose. This template implies that the database will be use for a mixture of transaction types. The other possible templates are:

      • Data_Warehouse – Database optimized for responding to long-running and “ad hoc” queries

      • Transaction_Processing – Transaction-oriented database intended for handling many short transactions and canned queries

    4. Choose the storage type to use for this database.

      • By default, the storage type is FS (file system).

      • ASM (Automatic Storage Management) provides support for a highly-available (RAID) solution.

        See the Oracle documentation for more information and additional user setup that you would need to perform.

        To use the ASM storage type, you need to provide additional information in four fields.

        1. Type a list of raw disks to use for ASM.

        2. Choose the type of ASM redundancy to provide.

        3. Type the name of the disk group to use for ASM.

        4. Type the password to use for ASM management.

      • RAW provides no support for file system utilities.

    5. Choose whether to manage your enterprise from a local web site or a central web site.

      If you choose to manage from a central web site, provide the URL.


      Note –

      To use centralized management, you must install the management agent on the target before you create the database. You can choose to use local management now and change to centralized management later.


    6. If needed, change the character set to use for the database.

      By default, the character set is Western European (ISO 8859). For more information about character sets in Oracle, see the Oracle documentation.

    7. (Optional) To enable Flash backups, type the path to the backup directory.

  6. Click Run Plan (includes preflight).

Using Oracle 9i and 10g on the Same Host

Once you have installed the software and created the databases, you need to combine Oracle net services configuration to run both versions of the software on a single host. Essentially, you should combine net service names and listener information into a single listener on the host. For more information, see the Oracle documentation.

Managing the Database

The Oracle Database Plug-In enables you to perform the following administrative tasks on your Oracle database.

ProcedureHow to Start the Oracle Database

This procedure describes how use the Oracle Database Plug-In to start or restart a single instance Oracle database.

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select the appropriate Oracle Database entry.

  2. On the Oracle Database Common Tasks page, click Start.

  3. On the Plans Details page, click Run.

  4. On the Plan Details Run page, provide plan variables information.

    1. Set the version settings by clicking on the appropriate link in the Plan Parameters table.

    2. Set the variable settings by clicking on the appropriate link in the Plan Parameters table.

    3. Select the target host on which you want to start the database.

    4. In the Plan Variables section, set the install path of the single instance component.

    5. In the Plan Variables section, set the name of the Oracle service that you want to start on the target host.

    6. If you are restarting the database, set the shutdown mode to use to bring down the database before the restart.

    7. If the database uses ASM, check the box next to Database uses Automatic Storage Management.

    8. If the database is already running, check the box next to Restart, if already running.

  5. Click Run Plan (includes preflight).

ProcedureHow to Stop the Oracle Database

This procedure describes how use the Oracle Database Plug-In to stop a single instance Oracle database.

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select the appropriate Oracle Database entry.

  2. On the Oracle Database Common Tasks page, click Stop.

  3. On the Plans Details page, click Run.

  4. On the Plan Details Run page, provide plan variables information.

    1. Set the version settings by clicking on the appropriate link in the Plan Parameters table.

    2. Set the variable settings by clicking on the appropriate link in the Plan Parameters table.

    3. Select the target host on which you want to stop the database.

    4. In the Plan Variables section, set the install path of the single instance component.

    5. In the Plan Variables section, set the name of the Oracle service that you want to stop on the target host.

    6. Set the shutdown mode to use to bring down the database.

    7. If the database uses ASM, check the box next to Stop Automatic Storage Management.

  5. Click Run Plan (includes preflight).

ProcedureHow to Verify That the Oracle Database Is Running

This procedure describes how use the Oracle Database Plug-In to verify that a single instance of the Oracle database is currently running..

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select the appropriate Oracle Database entry.

  2. On the Oracle Database Common Tasks page, click Verify.

  3. On the Plans Details page, click Run.

  4. On the Plan Details Run page, provide plan variables information.

    1. Set the version settings by clicking on the appropriate link in the Plan Parameters table.

    2. Set the variable settings by clicking on the appropriate link in the Plan Parameters table.

    3. Select the target host on which you want to verify that the database is running.

    4. In the Plan Variables section, set the install path of the single instance component.

    5. In the Plan Variables section, set the name of the Oracle service that you want to stop on the target host.

  5. Click Run Plan (includes preflight).

  6. Verify that the Oracle database is running by clicking the stdout link.

    The status of the database is displayed in the stdout window.

    • If the database is running, a message that is similar to the following is displayed.


      Total System Global Area  320308312 bytes
      Fixed Size             730200 bytes
      Variable Size          285212672 bytes
      Database Buffers       33554432 bytes
      Redo Buffers             811008 bytes
    • If the database is not running, a message that is similar to the following is displayed.


      ORA-01034: ORACLE not available
Troubleshooting

If the Oracle database is not running, restart the database. For more information, see How to Start the Oracle Database.

ProcedureHow to View Information About Oracle Database Remote Agents

The Oracle Database Plug-In enables you to view information about Oracle database Remote Agents. Follow these steps to view this information.

Steps
  1. In the Common Tasks section of the N1 SPS browser interface, select the appropriate Oracle Database entry.

  2. On the Oracle Database Common Tasks page, click View All.

    The Components Details Where Installed page displays. The Hosts Where Installed table lists the Remote Agents on which the Oracle database software has been installed. The Hosts Where Installed table lists the following information for each Remote Agent.

    • Host name of the Remote Agent

    • Install path of the Oracle database component that was used to install the Remote Agent

    • Variable setting that was used to install the database

    • Version of the component used to install the database

    • Date and time when the database was installed

    • Plan used to install the database

    • User name of the user that installed the database

    The Actions column of the Hosts Where Installed table enables you to view more detailed information for each host.

    • To view the host type for each host, as well as the host sets and other hosts that are related to each host, click the Details link.

    • To view information about the components installed on each host, including component dependencies, click the Relationships link.

    • To view the Plan Run History for this component, click the Results link.

Components

The Oracle Database Plug-In includes two components:

OraSpt Component

The OraSpt component provides support files for the Oracle database.

SingleInst Component

The SingleInst component encapsulates and deploys files for the single-node Oracle database software.

Troubleshooting

Problem:

You encounter an error when installing the database software.

Solution:

Check the value of your installerHome variable. The variable automatically appends certain information to the installerHome value. For example, if the Oracle software is in the directory /appsrc/Disk1/runInstaller, set the installerHome variable to just /appsrc. When needed, the plug-in appends Disk1/... to the path defined in the installerHome variable.

Problem:

You encounter a failure when deploying a component.

Solution:

Follow these steps:

  1. Remove any files deployed in the path specified by either the installPath or the ORACLE_BASE variable.

  2. Remove the file oraInst.loc in the /etc directory on Linux systems or in the /var/opt/oracle directory on Solaris systems.

  3. Kill any processes that the oracle user owns.

  4. Try the deployment again.