IBM Books

ADSMConnect Agent for Oracle Backup

ADSTAR Distributed Storage Manager
ADSMConnect Agent for
Oracle Backup on Sun Solaris
Installation and User's Guide

Version 2

SH26-4063-02

Program Number: 5639-C69

Note

Before using this information and the product it supports, read the general information under Notices.

Third Edition (June 1998)

This edition applies to Version 2 of the ADSMConnect Agent for Oracle Backup on Sun Solaris, 5639-C69, and to any subsequent releases until otherwise indicated in new editions or technical newsletters. Make sure you are using the correct edition for the level of the product.

Order publications through your IBM representative or the IBM branch office serving your locality.

IBM welcomes your comments. You can send your comments to the following address:

International Business Machines Corporation
RCF Processing Department
M86/050
5600 Cottle Road
San Jose, CA 95193-0001
U.S.A.

You can send us comments about this book electronically:

When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.

© Copyright International Business Machines Corporation 1997, 1998. All rights reserved.
Note to U.S. Government Users -- Documentation related to restricted rights -- Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule contract with IBM Corp.


Table of Contents

Notices

  • Trademarks
  • About This Book

    Summary of Amendments

  • Third Edition, July 1998
  • Second Edition, January 1998
  • Chapter 1. Introducing the ADSMConnect Agent for Oracle Backup

  • Understanding ADSM
  • The ADSMConnect Agent for Oracle Backup
  • Chapter 2. Installing the Oracle Backup Agent on Solaris

  • Oracle Backup Agent Environment
  • Space and Hardware Requirements
  • Software Requirements
  • Operating System
  • Software Support
  • Communications Method
  • Step 1: Installing the ADSM API and Oracle Backup Agent on Solaris
  • ADSM API Files
  • Oracle Backup Agent Files
  • Step 2: Defining the Environment Variables
  • Step 3: Editing the Client Options Files
  • Editing the Client System Options File
  • Specifying the ADSM Management Class
  • Step 4: Registering Your Workstation with the Server
  • Step 5: Initializing the Password
  • Chapter 3. Before Using the Oracle Backup Agent

  • Using Command Scripts in Oracle7
  • Using RMAN and the Oracle Backup Agent
  • Removing Old Backups
  • Removing Old Backups for Oracle7
  • Removing Old Backups for Oracle8
  • Using the Management Class
  • Using Hierarchical Storage Management (HSM) with Archive Log Files (Solaris 2.5.1)
  • Setting up Environment Variables
  • Modifying the dsm.sys File
  • Modifying the dsm.opt File
  • Adding Space Management to the File Systems
  • Reporting Problems
  • If You Cannot Start ADSMConnect Agent for Oracle Backup
  • If ADSMConnect Agent Starts and a Problem is Encountered
  • ADSM Service
  • Chapter 4. Using the ADSM Central Scheduler Service to Automate Online Backups

  • Example of Central Scheduler Service to Automate Backups
  • Chapter 5. API Return Codes and Client Messages

  • API Return Codes
  • Client Messages
  • Index


    Notices

    References in this publication to IBM* products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe upon any of the intellectual property rights of IBM may be used instead of the IBM product, program, or service. The evaluation and verification of operation in conjunction with other products, except those expressly designated by IBM, are the responsibility of the user.

    IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give one any license to these patents. Send license inquiries, in writing, to the IBM Director of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood NY 10594-1907, USA.

    Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information that has been exchanged, should contact IBM Corporation, Information Enabling Requests, Dept. M13, 5600 Cottle Road, San Jose CA 95193-0001, USA. Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.


    Trademarks

    The following terms are trademarks of the IBM Corporation in the United States, other countries, or both:
    ADSMConnect Agent
    ADSTAR
    AIX
    IBM

    The following terms are trademarks of other companies:
    Oracle Oracle Corporation
    Oracle7 Oracle Corporation
    Oracle7 Enterprise Backup Utility Oracle Corporation
    Oracle8 Oracle Corporation
    Solaris Sun Microsystems, Inc.
    Sun Sun Microsystems, Inc.
    Sun Microsystems Sun Microsystems, Inc.

    UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Limited.


    About This Book

    This book describes the installation and operation instructions for the system administrator and user. You should be familiar with your Sun** workstation, your operating system, and your file backup systems.

    The following publications provide additional information.

    Table 1. Related Books
    Title Order Number
    ADSTAR Distributed Storage Manager for Sun Solaris Quick Start GC35-0262
    ADSTAR Distributed Storage Manager: Using the Application Programming Interface Version 2 SH26-4002
    ADSTAR Distributed Storage Manager Using the Application Program Interface Version 3 SH26-4081
    ADSTAR Distributed Storage Manager: Installing the Clients Version 2 SH26-4049
    ADSTAR Distributed Storage Manager Installing the Clients Version 3 SH26-4080
    ADSTAR Distributed Storage Manager: Using the UNIX Backup-Archive Clients Version 2 SH26-4053
    ADSTAR Distributed Storage Manager: Using the UNIX Backup-Archive Clients Version 3 SH26-4075
    ADSTAR Distributed Storage Manager Using the UNIX Hierarchical Storage Management Clients Version 2 SH26-4030
    ADSTAR Distributed Storage Manager Using the UNIX Hierarchical Storage Management Clients Version 3 SH26-4083
    Using ADSM to Back Up Databases SG24-4335
    Enterprise Backup Utility Installation Guide for AIX, Release 2.0.10 A43148-1
    Oracle7 Server Administrator's Guide 6694-70-1292
    Oracle7 Enterprise Backup Utility Administrator's Guide, Release 2 A42580-2
    Oracle SQL Net Administrator's Guide --


    Summary of Amendments

    This section summarizes changes made for this edition of the book.


    Third Edition, July 1998

    The updates include:


    Second Edition, January 1998

    The updates include:


    Chapter 1. Introducing the ADSMConnect Agent for Oracle Backup

    This section provides a brief overview of ADSM and the ADSMConnect Agent.


    Understanding ADSM

    ADSTAR Distributed Storage Manager (ADSM) is a client/server program that provides storage management services in a multivendor, multiplatform computer environment.

    ADSM:

    ADSM provides these services:


    The ADSMConnect Agent for Oracle Backup

    The ADSMConnect Agent for Oracle Backup is also referred to as the Oracle Backup Agent in this document. The Oracle Backup Agent on Sun Solaris supports these databases:

    The Oracle7 EBU and Oracle8 RMAN perform backups (online and offline) and restore (online and offline) of Oracle databases. After the Oracle7 EBU or Oracle8 RMAN initiates a backup or restore, the Oracle Backup Agent acts as the interface to ADSM. The ADSM server then applies its storage management functions to the data, which can be done while users are working, with minimal disruption.

    The Oracle Backup Agent can work with any Version 2 or Version 3 ADSM server. The Oracle Backup Agent translates the Oracle7 or Oracle8 API commands into ADSM API calls for the ADSM server.

    The Oracle Backup Agent runs on a workstation with the Sun Solaris operating system.

    See Figure 1 for an understanding of how Oracle7 or Oracle8 works in conjunction with the Oracle Backup Agent and the ADSM server.

    Figure 1. How Oracle7 or Oracle8 Interfaces with the Oracle Backup Agent

    How Oracle7 or Oracle8 Interfaces with the Oracle Backup Agent


    Chapter 2. Installing the Oracle Backup Agent on Solaris

    The Oracle Backup Agent is ordered separately on a CD-ROM and has its own installation program. The CD-ROM also contains the ADSM API. The CD-ROM provides you with a permanent license to use the product.

    The Solaris operating systems suppored are:

    The ADSM API Version 3 is shipped with the Oracle Backup Agent. For Solaris 2.5.1, you need ADSM API Version 3 Release 1.4. For Solaris 2.6, you need ADSM API Version 3 Release 1.3. If you do not have this version of the API, you will have to install it.

    Before you can install the Oracle Backup Agent, make sure that the ADSM Version 2 or Version 3 server is installed.

    A root user must install the ADSM API and Oracle Backup Agent on a Solaris workstation.

    Check the current README.AOB file for any changes to the installation procedures.

    The steps for installing are:


    Oracle Backup Agent Environment

    This section contains client environment information and hardware and software requirements for installing the Oracle Backup Agent.

    Space and Hardware Requirements

    The space requirements are:

    Software Requirements

    For Solaris 2.5.1, you must have ADSM API 3.1.4. For Solaris 2.6, you must have ADSM API 3.1.3. Even if you have the ADSM API 3.1.3 installed on your system, you must install the ADSM API packaged with the Oracle Backup Agent CD-ROM.

    Operating System

    The operating system requirement is Solaris 2.5.1 or 2.6.

    Software Support

    The Oracle Backup Agent supports:

    Communications Method


    Table 2. Communication Software
    To use this communication method: Install this on the workstation To connect to these ADSM servers:
    TCP/IP Standard with Solaris operating system AIX, HP-UX, MVS, OS/2, OS/400, Sun, VM, Windows NT


    Step 1: Installing the ADSM API and Oracle Backup Agent on Solaris

    Follow the steps below to install the ADSM API and Oracle Backup Agent. This example assumes that your CD-ROM drive is /cdrom.

    1. Insert the CD-ROM containing the client package into the CD-ROM drive.

    2. Log in as the root user.

    3. To install the ADSM API for Solaris 2.5.1, issue this command:
        $ pkgadd -d /cdrom/adsmorc/adsmAPI251.pkg 
      

      To install the ADSM API for Solaris 2.6, issue this command:

        $ pkgadd -d /cdrom/adsmorc/adsmAPI26.pkg
      

    4. To install the Oracle Backup Agent, issue this command:
        $ pkgadd -d /cdrom/adsmroc/adsmorc.pkg
      

    5. The following is sample output from the Oracle Backup Agent installation:
      The following packages are available:
        1  IBMDSMoba  ADSTAR Distributed Stroage Manager Oracle Backup Agent 
           for Sun (sparc) Version 2 Release 1 Level 0.7
       
      Select package(s) you wish to process (or 'all' to process all packages).
      (default: all) [?,??,q]: all
       
      Processing package instance <IBMDSMoba> from </cdrom/adsmorc/adsmorc.pkg>
       
      ADSTAR Distributed Storage Manager Oracle Backup Agent for Sun
      (sparc) Version 2 Release 1 Level 0.7
      Licensed Materials - Property of IBM
       
      5655-A30
      (C) Copyright International Business Machines Corp. 1990, 1998.
       
      All rights reserved.
      US Government Users Restricted Rights - Use, duplication or disclosure
      restricted by GSA ADP Schedule Contract with IBM Corp.
       
      Using </opt> as the package base directory.
      ## Processing package information.
      ## Processing system information.
         1 package pathname is already properly installed.
      ## Verifying disk space requirements.
      ## Checking for conflicts with packages already installed.
      ## Checking for setuid/setgid programs.
       
      This package contains scripts which will be executed with super-user
      permission during the process of installing this package.
       
      Do you want to continue with the installation of <IBMDSMoba> [y,n,?] y 
       
      Installing ADSTAR Distributed Storage Manager Oracle Backup Agent for Sun
      as <IBMDSMoba>
       
      ## Executing preinstall script.
       
      ADSMConnect Agent for Oracle Backup Preinstall Program
      ------------------------------------------------------
      ## Installing part 1 of 1.
      /opt/IBMDSMoba/README.AOB
      /opt/IBMDSMoba/agent.lic
      /opt/IBMDSMoba/aobpswd
      /opt/IBMDSMoba/libobk.so
      [ verifying class <none>]
      ## Executing postinstall script.
       
                                                                                                          
       
      
      ADSMConnect Agent for Oracle Backup Postinstall Program
      --------------------------------------------------------
      Creating symbolic links in /usr/lib
      ADSMConnect Agent for Oracle Backup installation complete.
       
      Installation of <IBMDSMoba> was successful.
       
      

    ADSM API Files

    The following files are included with the ADSM API and are installed in the /opt/IBMadsm-a path.

    Table 3. ADSM API Files
    File Name Description
    dsm.sys.smp Sample client system options file
    dsm.opt.smp Sample client user options file
    en_US/dsmclientV3.cat Messages file
    README.API Readme file
    libApiDS.so ADSM API library file
    libXApi.so ADSM X/Open library file
    dsmtca Trusted Communication Agent file
    sample/xxxxxxxx ADSM API files for developers
    xopen/xxxxxxxx ADSM X/Open API files for developers
    Note:Symbolic links are made to associate libApiDS.so with /usr/lib/libApiDS.so and libXApi.so with /usr/lib/libXApi.so.

    Oracle Backup Agent Files

    The following files are included with the Oracle Backup Agent and are installed in the /usr/adsmagent/oba path.

    Table 4. Oracle Backup Agent Files
    File Name Description
    README.AOB Last-minute updates and other special information
    libobk.so ADSMConnect Agent library file
    aobpswd Password management program
    agent.lic Permanent license
    Note:A symbolic link is made to associate libobk.so with /usr/lib/libobk.so.


    Step 2: Defining the Environment Variables

    The API uses unique environment variables to locate files. This allows you to use different files for API applications from those that are used by the interactive client, if necessary.

    Specify the following files that you want to use for the Oracle Backujp Agent:

    See below for examples of how to specify these environment variables.

    DSMI_DIR
    Points to the ADSM API installed path.

    If this is not set, the Oracle Backup Agent uses the API default installed path of /opt/IBMadsm-a.

    This environment variable needs to be defined only if the ADSM API is installed under a different path from the default path.

    DSMI_CONFIG
    Points to the user options file (dsm.opt).

    It is not required to set this environment variable. If DSMI_ORC_CONFIG is set, the Oracle Backup Agent uses the value from DSMI_ORC_CONFIG. If DSMI_ORC_CONFIG is not set, and DSMI_CONFIG is set, the Oracle Backup Agent uses the DSMI_CONFIG value.

    If none is set, the Oracle Backup Agent uses /usr/sbin/dsm.opt if it exists. If /usr/sbin/dsm.opt does not exist, the Oracle Backup Agent uses the first server stanza from /opt/IBMadsm-c/dsm.sys.

    DSMI_LOG
    Points to the directory that contains the API error log file (dsierror.log).

    For error log files, create a directory for the error logs to be created in, and let the DSMI_LOG environment variable point to that directory.

    If the error log directory is /home/yourlogin/logdir, use:

      export DSMI_LOG=/home/yourlogin/logdir
    

    DSMI_ORC_DIR
    Points to the Oracle Backup Agent installed path. If this is not set, the Oracle Backup Agent uses the default installed path /opt/IBMDSMoba. This environment variable needs to be defined only if the Oracle Backup Agent is installed under a different path from the default path.

    DSMI_ORC_CONFIG
    Points to the user options file (dsm.opt). If the dsm.opt file is in your home directory, use this command:
      export DSMI_ORC_CONFIG=/home/yourlogin/dsm.opt
    

    If this is not set and DSMI_CONFIG is set, the Oracle Backup Agent uses the DSMI_CONFIG value. If both environment variables are not set, /usr/sbin/dsm.opt is used. If /usr/sbin/dsm.opt does not exist, the first server stanza from /opt/IBMadsm-a/dsm.sys is used.

    DSMO_AVG_SIZE
    The average size of objects in megabytes. This information is passed to the ADSM server where it is used to determine storage pool usage and device usage. The default is 50 MB.
    Important:Set this environment variable to a value in the approximate range of your database sizes so the ADSM server can determine device usage.

    DSMO_FS
    The file space name on the ADSM server with a string of one to 1024 characters. When setting up this option, do not use / in front of the file system name. For example, if the file system name is oracle, then enter this:
      export DSMO_FS=oracle
    

    The default is adsmorc.

    DSMO_NODE
    The node name that contains a string of one to 64 characters. This environment variable is used to specify a unique node name for the Oracle Backup Agent. This prevents any confusion with an existing ADSM backup-archive client.

    The default is the value that is returned by gethostname.
    Note:The Oracle Backup Agent does not use the nodename value from dsm.opt and dsm.sys.

    DSMO_OWNER
    A session name and object owner name that contains a string of from one to 64 characters. The default is a value that is returned by getuid.
    Note:We recommend that you do not use this environment variable. If necessary, however, it can be used to override the login user ID to restore an object that is backed up by another owner.

    DSMO_PSWDPATH
    This environment variable should point to the directory where your password file, ADSMO.yourhostname resides.

    If you do not specify DSMO_PSWDPATH, the default is to search the installation directory.

    If the password file is in /opt/IBMDSMoba, use:

      export DSMO_PSWDPATH=/opt/IBMDSMoba
    

    This environment variable needs to be defined only if the password file is not in /opt/IBMDSMoba.


    Step 3: Editing the Client Options Files

    ADSM uses the following options in the client system options file (dsm.sys):

    ADSM uses a client options file that is called dsm.opt to specify the ADSM server.

    These options are in effect for the entire ADSM session.

    During the initial installation and set up of ADSM on your workstation, you are provided with a sample client system options file that is called dsm.sys.smp. The dsm.sys.smp file contains just the communication options and a sample include-exclude list. These basic options are the ones you need to get started quickly.

    ADSM also provides a sample client user options file (dsm.opt.smp) to help you get started quickly.

    The client options file resides in your ADSM API installation directory. The sample options files that are distributed with the ADSM API can be used for the Oracle Backup Agent.

    Editing the Client System Options File

    The root user should edit the dsm.sys file. It must refer to the correct ADSM server method and communication option method. Set the PASSWORDACCESS option to prompt in the client system options (dsm.sys) file. Prompt is the default if a parameter is not specified.

    Specifying the ADSM Management Class

    When you back up a database, the default management class for your node is used. You can override the default value with a different value that is specified in the Include option. This option is placed in the Include-Exclude options file. The file name of the Include-Exclude options file is placed in the client system's option file. See ADSTAR Distributed Storage Manager Installing the Clients.

    To assign a management class name orcbackup to all of the Oracle backups with a default file space name of adsmorc:

    1. Add the following entry under the server stanza that you will be using in the dsm.sys file where the ADSM API is installed:
        inclexcl /u01/oracle/include.def
      

    2. Add the following entry in /u01/oracle/include.def:
        include /adsmorc/.../* orcbackup
      

    All the files backed up with a default file space name of adsmorc will be assigned to management class orcbackup.

    If you do not want to use the inclexcl option, you can create a new domain just for Oracle backups. You must then register your node with the new domain.

    For the management class you use, define the backup copy group parameters VERDELETED=0 and RETONLY=0. This aids in the clean up of files that the ebutool command deletes.


    Step 4: Registering Your Workstation with the Server

    Before you can begin requesting services from an ADSM server, the server must recognize your workstation. ADSM uses a node name and a password (if one is required) to identify each workstation. ADSM maintains a password for each node name. The process of setting up a node name and password is called registration.

    Your ADSM administrator must register your workstation as a client with the server. You can then back up and restore documents from the server.

    You need to provide the following information to your administrator:

    Your administrator defines the following for you:

    Note:If an ADSM client already exists on your workstation, it is recommended that you use a separate and unique node name for the ADSMConnect Agent on the same workstation.

    Instruct the ADSM administrator to register your node with the server and to inform you of the password. The administrator should specify BACKDELETE=yes so that you can later delete old backups.


    Step 5: Initializing the Password

    Important:The root user must run the aobpswd program before using the Oracle Backup Agent.

    Follow the steps below to initialize the password.

    1. Set DSMO_PSWDPATH to the path where the password file resides. If this is not specified, the password file will be created in the current working directory.

    2. Start the aobpswd program. This sets up a connection with the server that you specified in the dsm.opt file. The following screen displays:

      +--------------------------------------------------------------------------------+
      |          ADSMConnect Agent for Oracle Backup                                   |
      |Password file authorization/update program                                      |
      |>> this must be run by the ROOT user if updating the value <<                   |
      |                                                                                |
      +--------------------------------------------------------------------------------+

    3. Enter your current ADSM node password to start the file.

    4. When the Enter your new password prompt displays, press Enter without entering a value. The following messages are displayed:

      +--------------------------------------------------------------------------------+
      |   Your password has been written to the file.                                  |
      |   Verify that the DBA has read access to the ADSMO.pigeon file.                |
      |                                                                                |
      +--------------------------------------------------------------------------------+

      The aobpswd program creates a file that is called ADSMO.yourhostname in the directory that is specified by DSMO_PSWDPATH. Make sure that the user who runs the ADSMConnect Agent for Oracle Backup has read permission to ADSMO.yourhostname.

      You can use the aobpswd program later to update the password. Update the password before it expires on the ADSM server.


    Chapter 3. Before Using the Oracle Backup Agent

    Oracle7 and Oracle8 provides backup and restore functions for Oracle databases. You can perform full or partial, offline or online backups. Once you identify which database you want to back up, Oracle locates all of the necessary files and sends them to ADSM. The ADSMConnect Agent for Oracle Backup provides an interface between the Oracle API calls and the ADSM API routines. The ADSMConnect Agent translates the Oracle API calls into ADSM API calls.


    Using Command Scripts in Oracle7

    Use Oracle command scripts to define and start backup and restore operations, or to register information in the Backup Catalog. To start the operations, enter the OBACKUP command that is followed by the appropriate script name. For example, to register databases in the Backup Catalog, use an OBACKUP register script.

    To back up a database, use the OBACKUP scripts that are customized to execute the following tasks:

    To restore a database, use OBACKUP scripts that are customized to execute the following tasks:

    If a backup is interrupted, the operation starts from the beginning.


    Using RMAN and the Oracle Backup Agent

    To use RMAN with the Oracle Backup Agent:

    1. Link RMAN with the Oracle Backup Agent. Before relinking, make sure that no other Oracle process is running. Shut down all the databases and listeners, and so forth. An example is shown below:
      $ cd $ORACLE_HOME/rdbms/lib
      $make -f ins_rdbms.mk ioracle LLIBMM=/usr/lib/libobk.so
       
      

      This will relink the Oracle8 objects with the ADSMConnect Agent library. Make sure the relinking process finishes successfully.

    2. Invoke RMAN for backup and restore of Oracle8 database. The following example assumes that the catalog database is set up and the target database is registered with the catalog database.
      Note:RMAN does not pick up the environment variables you specify from the shell. In other words, environment variables like DSMI_DIR and DSMI_CONFIG will not take effect in the RMAN sessions. You will have to use the parm option while allocating the RMAN channels.
      Invoke RMAN with the following command:
      $>  rman target xxx/yyy@target rcvcat rman/rman@catalog 
        cmdfile bkdb.scr msglog bkdb.log
                                                                                   
      

      This will start RMAN in the following sequence:

      target xxx/yyy@target: connect to target database 
      using user xxx and password yyy with connect string target
      rcvcat rman/rman@catalog: connect to catalog database
      using user rman and password rman with connect string catalog
      cmdfile bkdb.scr:  run bkdb.scr script
      msglog bkdb.log:  log the output messages in bkdb.log
      bkdb.scr Script:
      run
      {
        #ENV is case sensitive
        allocate channel t1 type 'sbt_tape' parms
             'ENV=(DSMI_ORC_CONFIG=/home/oracle/dsm.opt,
                   DSMO_AVG_SIZE=1000)';
        allocate channel t2 type 'sbt_tape' parms
             'ENV=(DSMI_ORC_CONFIG=/home/oracle/dsm.opt,
                   DSMO_AVG_SIZE=1000)';
        backup
          filesperset 10
          format 'df_%t_%s_%p'
          (database); 
      }    
                                          
      

      This script allocates two parallel connections to the ADSM server with environment variables DSMI_ORC_CONFIG and DSMO_AVG_SIZE.

    3. If you run the example above, RMAN creates a log file bkdb.log in the current working directory. If an error occurs, you will see the error stack in the log file.

    4. To get an ADSM trace, add the following options to your dsm.opt file:
      tracefile   /home/oracle/adsmapi.trace 
      traceflag api pid                                                                                                                                 
      

      This will create the /home/oracle/adsmapi.trace file. Some other logs are available under $ORACLE_HOME/rdbms/log. Check sbtio.log for some of the ADSMConnect Agent messages.


    Removing Old Backups

    The ADSMConnect Agent for Oracle Backup uses the ADSM backup repository. Each database backup creates a new object with a new unique name. Since these have unique names, they always remain active and never expire. This happens so the Database Administrator (DBA) can control when copies are removed from the ADSM server and can coordinate this with the Oracle7 EBU and Oracle8 RMAN.

    Removing Old Backups for Oracle7

    Oracle7 ships a utility that is called ebutool. This utility should be used to delete old database backups that are no longer needed from the Backup Catalog. When backups are deleted from the Backup Catalog, ebutool sends delete object API calls to ADSM. ADSM then marks the objects inactive to ensure that they expire with the next ADSM file expiration process. For example, to delete backups that are older than 30 days, enter this command:

       ebutool -db_name=xxxx -purgejobs=30
    

    You can define ebutool commands as part of a script that is started from the ADSM central scheduler to automate the deletion process.

    Removing Old Backups for Oracle8

    To remove an old backup on Oracle8, issue this command from the RMAN prompt:

      RMAN> allocate channel for delete type 'sbt_tape';
      RMAN> change backuppiece 'name_of_backup_piece' delete; 
    

    See the Oracle RMAN manual for more information on the change command and its options.

    Using the Management Class

    Use parameters in the Management Class definition to control when the inactive object expires on the ADSM server.

    For the backup copy group, use:

       VERDELETED=0
       RETONLY=0
    

    This erases the inactive objects from the server after the next inventory expiration.

    In order to delete backup objects, the ADSM administrator must register your node by specifying BACKDELETE=yes.


    Using Hierarchical Storage Management (HSM) with Archive Log Files (Solaris 2.5.1)

    This section is for users who are using Solaris 2.5.1.

    Customers can take advantage of the HSM functions on the ADSM Solaris client by ordering the optional Space Management feature. The use of the HSM functions on the ADSM Solaris client can save space by archiving the redo log files to the ADSM server. This is a great benefit for an active database where the logs can get very large and become difficult to manage.

    To use HSM with archive log files, the root user must perform the following tasks:

    Setting up Environment Variables

    Specify the client system options file (dsm.sys) and the client user options file (dsm.opt) that you want to use for backups, using the DSM_CONFIG and DSM_DIR environment variables. See below for examples of how to specify these files.

    DSM_CONFIG
    Points to the client user options file (dsm.opt). It can be the same file that the DSMI_CONFIG variable points to. An example is:
      export DSM_CONFIG=/opt/IBMadsm-c/dsm.opt
    

    DSM_DIR
    Points to the ADSM client directory that contains the client system options file (dsm.sys). An example is:
      export DSM_DIR=/opt/IBMadsm-c
    
    Note:Do not place a slash (/) at the end of the directory path.

    Modifying the dsm.sys File

    The list below provides a brief description of some important space management options you can set in your dsm.sys file.

    DEFAULTSERVER
    Specifies the ADSM server to which ADSM backs up and archives files from local file systems by default. If the MIGRATESERVER option is not specified, DEFAULTSERVER is the ADSM server to which ADSM migrates files from local file systems.

    The default is the server specified in the first stanza of the dsm.sys file. An example is:

      defaultserver cougar
    

    MIGRATESERVER
    Specifies the ADSM server to which ADSM migrates files from your local file systems.

    The default is the default server. An example is:

      migrateserver pigeon
    

    Modifying the dsm.opt File

    The OPTIONFORMAT option determines whether users must enter space management commands using the standard format for options (similar to the format used for backup-archive commands), or the short format (similar to the format used for UNIX commands). The default is STANDARD.

    Modify the dsm.opt file to suit your needs.

    Adding Space Management to the File Systems

    Because you only want to migrate archive log and control files, it is best to exclude space management services from all the files except the files you want to migrate. If you do not use include-exclude options, HSM might automatically migrate system files whenever the disk space is filled up to its high threshold mark (this will affect performance).

    It is recommended that you should back up the files before migrating them. You can use a management class that requires backing up the files before migrating them to ensure this. If the default management class to the machine does not provide backups required before migration facility, use the include-exclude file to assign a management class to the files.

    To add space management to a file system or to update space management settings for a file system, enter the dsmmigfs command:

      dsmmigfs add  /u01
    

    This command adds space management to file system /u01.

    To meet the above requirements, use the inclexcl option, adding the following statement in a server stanza in your dsm.sys file:

      inclexcl  /u01/oracle/include.def
    

    Then, edit this file:

      /u01/oracle/include.def
    

    To edit the include-exclude file, enter these commands:

      include /u01/oracle/dbs/arch
      exclude.spacemgmt /.../u01/.../
      include /u01/oracle/dbs/arch  migsel
    

    The following is an explanation of these commands:

    include.def
    Is parsed from the bottom to the top.

    include /u01/oracle/dbs/arch* migsel
    Assigns the management class migsel to the /u01/oracle/dbs/arch* files.

    exclude.spacemgmt /.../u01/.../*
    Means that all the files in the /u01 directory are excluded for space management services.

    include /u01/oracle/dbs/arch*
    Means that the fileset /u01/oracle/dbs/arch* is included for ADSM services.

    If the migrated files are referenced while the database is in use, they are recalled automatically and will occupy the space again. In order to prevent being recalled every time they are referenced, use the dsmattr command to change the attribute of the files. for example:

      dsmattr -recallmode=readwithoutrecall arch1_290.dbf
    

    The dsmattr command changes the attribute of the arch1_290.dbf file to readwithoutrecall. The readwithoutrecall attribute prevents the file from being restored to the disk if referencing to the file is for read only.

    For more information on HSM, see ADSTAR Distributed Storage Manager Using the UNIX Hierarchical Storage Management Clients.


    Reporting Problems

    If You Cannot Start ADSMConnect Agent for Oracle Backup

    If you encounter a problem while using ADSMConnect Agent for Oracle Backup or if you cannot start ADSMConnect Agent for Oracle Backup, collect this information:

    If ADSMConnect Agent Starts and a Problem is Encountered

    If you start ADSMConnect Agent for Oracle Backup successfully and then encounter a problem, collect this information:


    ADSM Service

    If you need ADSM customer assistance, call this number: 1-800-237-5511. Inform the customer service representative of the following information to determine the problem:


    Chapter 4. Using the ADSM Central Scheduler Service to Automate Online Backups

    This section shows an example on how to use the ADSM Central Scheduler Service with the Oracle Backup Agent to automate online backups of Oracle server databases. This example illustrates the use of the ADSM Version 3 central scheduler client. You can also use the ADSM Version 2 scheduler client as well.

    For more information on using the scheduler, see Using the UNIX Backup-Archive Clients.

    Once the Oracle Backup Agent has been registered to an ADSM server and installed on the Oracle server, the procedure involves the following steps:

    1. On the ADSM server:

      1. Define a schedule to execute an AIX command file in the policy domain to which the Oracle Backup Agent is registered.

      2. Associate the Oracle Backup Agent node to the defined schedule.

    2. On the Oracle Server where the Oracle Backup Agent is installed:
      1. Create the bkdb script.
      2. Start the scheduler.


    Example of Central Scheduler Service to Automate Backups

    The example below uses the following assumptions:

    This method is flexible because you can define a command file with any set of commands you choose.

    On the ADSM server:

    1. Enter the following command to define the schedule. You can enter this command on the server console or from an administrative client. The administrative client does not have to be running on the same system as the ADSM server.
        def sched oracle daily_orcbkup desc="07Daily Online DB Backup"
        action=command objects="/home/oracle/sched/bkdb"
        starttime=21:00 duration=15 duru=minutes period=1 perunits=day
        dayofweek=any
      

      ADSM displays this message:

        ANR2500I Schedule daily_orcbkup defined in policy domain oracle. 
      

    2. To associate the Oracle Backup Agent to this schedule, issue the following command:
        define association oracle daily_orcbkup rangoon
      

      ADSM displays this message:

        ANR2510I Node rangoon associated with schedule orc_dailybkup 
                 in policy domain oracle. 
                 
      

      At this point, a schedule has been defined on the ADSM server that runs a command file that is called /home/oracle/sched/bkdb. The schedule starts around 9:00 pm. The schedule is re-executed once a day and can start on any day of the week.
      Note:If you want to confirm that the schedule and association have been set correctly, you can use the Query Schedule and Query Association ADSM administrative commands.

    On the Oracle Server:

    This example assumes that you have installed the ADSM client on the Oracle Server.

    1. Create the bkdb script. An example of the script is shown below:
      #!/bin/ksh
      export ORACLE_HOME=/orc7/app/oracle/product/734
      export OBK_HOME=/orc7/app/oracle/product/734/obackup
      export ORACLE_SID=t1
      export DSMO_NODE=pigeon_orc7
      export DSMI_ORC_CONFIG=/orc7db/dbs/t1/svtscripts/dsm.opt
      ebu /orc7db/dbs/t1/svtscripts/bkoff.scr
                                                             
      

      An example of the bkoff.scr file is shown below:

      backup offline database
        db_name = "t1"
        parallel = 3
        trace = "/orc7db/dbs/t1/svtscripts/bkoff.a06-00.trace"
        log = "/orc7db/dbs/t1/svtscriipts/bkoff.a06-00.log"
                                                                
      

    2. Start the scheduler. Follow the steps below.
      Note:Only the root user can restore the backups done by the scheduler.
      1. Login as the root user.
      2. Define the following environment variable:
        $ export DSM_CONFIG=/orc7db/dbs/t1/svtscripts/dsm.opt
        
      3. Issue the following command:
          dsmc sched
        

    Chapter 5. API Return Codes and Client Messages

    This section describes the API return codes and client messages.


    API Return Codes

    This section describes what the return codes mean, and how you, as an application developer, should deal with them.

    In this section, the return codes are listed in numerical order. For each return code, the following information is given:

    return code number
    This number corresponds to the number in the header file dsmrc.h.

    severity code
    This letter is an indication of the severity of the situation that caused the return code to be generated. The possible severity codes and their meanings are:

    S
    Severe error. Processing could not continue.

    E
    Error. Processing could not continue.

    W
    Warning. Processing can continue, but problems might develop later. You should be cautious.

    I
    Information. Processing continues. No user response necessary.

    symbolic name
    This name corresponds to the definition in the header file, dsmrc.h.
    Note:You should always use the symbolic name for a return code in your application rather than the return code number.

    explanation
    This field explains the circumstances under which this return code might be generated.

    system action
    This field describes what action the ADSMConnect Agent is going to take in response to the return code.

    user response
    This field explains what you should do in response to the system action.
    Note:Many of the return codes describe errors that cause processing to stop. You might want to send a message to the end user that describes the problem and suggest some course of action. To identify different messages, you can use these return code values or develop your own numbering system.



    2400 E DSM_RC_ALMGR_OPEN_FAIL
    Explanation: The license file was not found, or could not be opened because of permissions, or the file is corrupted.
    System Action: The system returns to the calling procedure.
    User Response: Check the permissions on the file. See if the license file is in the correct place.

    2401 E DSM_RC_ALMGR_READ_FAIL
    Explanation: The license file was not found, or could not be opened because of permissions, or the file is corrupted.
    System Action: The system returns to the calling procedure.
    User Response: Check the permissions on the file. See if the license file is in the correct place.

    2402 E DSM_RC_ALMGR_WRITE_FAIL
    Explanation: The license file was not found, or could not be opened because of permissions, or the file is corrupted.
    System Action: The system returns to the calling procedure.
    User Response: Check the permissions on the file. See if the license file is in the correct place.

    2403 E DSM_RC_ALMGR_DATA_FMT
    Explanation: The license file is not valid.
    System Action: The system returns to the calling procedure.
    User Response: The user needs to obtain a new license.

    2404 E DSM_RC_ALMGR_CKSUM_BAD
    Explanation: The registration string is not valid.
    System Action: The system returns to the calling procedure.
    User Response: The user needs to obtain a new license.

    2405 E DSM_RC_ALMGR_TRIAL_EXPRD
    Explanation: The registration string is not valid.
    System Action: The system returns to the calling procedure.
    User Response: The user needs to obtain a new license.

    2410 E DSM_RC_ORC_INVALID_MODE
    Explanation: Invalid mode passed by Oracle.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    2411 E DSM_RC_ORC_NULL_FILENAME
    Explanation: Null file name passed by Oracle.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    2412 E DSM_RC_ORC_WRONG_BLKSIZE
    Explanation: Wrong data block size.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    2413 E DSM_RC_ORC_OBJ_EXISTS
    Explanation: Backup or restore object already exists.
    System Action: The system returns to the calling procedure.
    User Response: If backing up an object, make sure you generate a unique object name.

    2414 E DSM_RC_ORC_NOTSAME_HANDLE
    Explanation: The handle passed from Oracle is not the same handle that ADSM passed back.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    2415 E DSM_RC_ORC_END_OF_FILE
    Explanation: End of file reached.
    System Action: The system returns to the calling procedure.
    User Response: No action required.

    2416 E DSM_RC_ORC_WRONG_RDSTATE
    Explanation: The operation must be in read state.
    System Action: The system returns to the calling procedure.
    User Response: Contact IBM ADSM support.

    2417 E DSM_RC_ORC_LOWER_APIVER
    Explanation: The run time API is lower than the compile time API.
    System Action: The system returns to the calling procedure.
    User Response: Use the what command to find out the compile time API level. Obtain the same or higher level of the API library.

    2418 E DSM_RC_ORC_WRONG_WRTSTATE
    Explanation: The operation must be in write state.
    System Action: The system returns to the calling procedure.
    User Response: Contact IBM ADSM support.

    2419 E DSM_RC_ORC_INVALID_FLAG
    Explanation: Invalid flag passed from Oracle.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.



    Client Messages

    This section describes what the client messages mean.

    In this section, the client messages are listed in numerical order. For each client message, the following information is given:

    message number
    This is the number of the message.

    severity code
    This letter is an indication of the severity of the situation that caused the message to be generated. The possible severity codes and their meanings are:

    S
    Severe error. Processing could not continue.

    E
    Error. Processing could not continue.

    W
    Warning. Processing can continue, but problems might develop later. You should be cautious.

    I
    Information. Processing continues. No user response necessary.

    message text
    This message is a brief indication of the cause of the message.

    explanation
    This field explains the circumstances under which this message might be generated.

    system action
    This field describes what action the ADSMConnect Agent is going to take in response to the message.

    user response
    This field explains what you should do in response to the system action.



    ANS0400E License file could not be opened.
    Explanation: The license file was not found, or could not be opened because of permissions or the file is corrupted.
    System Action: The system returns to the calling procedure.
    User Response: Check the permissions on the file. See if the license file is in the correct place.

    ANS0401E Read failure on the license file.
    Explanation: The license file was not found, or could not be opened because of permissions, or the file is corrupted.
    System Action: The system returns to the calling procedure.
    User Response: Check the permissions on the file. See if the license file is in the correct place.

    ANS0402E Write failure on the license file.
    Explanation: The license file was not found, or could not be opened because of permissions or the file is corrupted.
    System Action: The system returns to the calling procedure.
    User Response: Check the permissions on the file. See if the license file is in the correct place.

    ANS0403E Data in the license file is not in a valid format.
    Explanation: The license file is not valid.
    System Action: The system returns to the calling procedure.
    User Response: The user needs to obtain a new license.

    ANS0404E The checksum in the license file does not match the licenseregistration string.
    Explanation: The registration string is not valid.
    System Action: The system returns to the calling procedure.
    User Response: The user needs to obtain a new license.

    ANS0405E This is an expired try and buy license.
    Explanation: The registration string is not valid.
    System Action: The system returns to the calling procedure.
    User Response: The user needs to obtain a new license.

    ANS0410E Oracle passed invalid mode.
    Explanation: Invalid mode passed by Oracle.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    ANS0411E Oracle passed null file name.
    Explanation: Null file name passed by Oracle.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    ANS0412E Wrong data block size.
    Explanation: Wrong data block size.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    ANS0413E Object exists.
    Explanation: Backup or restore object already exists.
    System Action: The system returns to the calling procedure.
    User Response: If backing up an object, make sure you generate a unique object name.

    ANS0414E Not same Oracle handle.
    Explanation: The handle passed from Oracle is not the same handle that ADSM passed back.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    ANS0415E End of file reached.
    Explanation: End of file reached.
    System Action: The system returns to the calling procedure.
    User Response: No action required.

    ANS0416E Wrong Read State.
    Explanation: The operation must be in read state.
    System Action: The system returns to the calling procedure.
    User Response: Contact IBM ADSM support.

    ANS0417E Runtime API version is outdated.
    Explanation: The run time API is lower than the compile time API.
    System Action: The system returns to the calling procedure.
    User Response: Use the what command to find out the compile time API level. Obtain the same or higher level of the API library.

    ANS0418E Wrong write state.
    Explanation: The operation must be in write state.
    System Action: The system returns to the calling procedure.
    User Response: Contact IBM ADSM support.

    ANS0419E Invalid flag passed.
    Explanation: Invalid flag passed from Oracle.
    System Action: The system returns to the calling procedure.
    User Response: Contact your system administrator.

    REFID='R698'.

    Index

    A B C D E F H I L M O P Q R S
    A
  • ADSM scheduler, using (177)
  • ADSMConnect Agent
  • ADSM scheduler (179)
  • before using (139)
  • client messages (185)
  • installing on Solaris (122)
  • overview (120)
  • return codes (184)
  • API return codes (188)
  • archive log files, using (159)
  • B
  • backups
  • automating (176)
  • example of using Central Scheduler Service (182)
  • removing for Oracle7 (148)
  • removing for Oracle8 (153)
  • C
  • Central Scheduler Service
  • example of to automate backups (181)
  • using to automate backups (174)
  • command
  • OBACKUP (143)
  • scripts (141)
  • communication method supported
  • for installing on Solaris (128)
  • D
  • dsm.opt file
  • modifying for HSM (164)
  • dsm.sys file
  • modifying for HSM (163)
  • dsmmigfs command, using (167)
  • E
  • EBU (Enterprise Backup Utility)
  • using to remove old backups (151)
  • Enterprise Backup Utility (EBU)
  • using to remove old backups (150)
  • environment variables
  • defining when installing on Solaris (132)
  • using with HSM (162)
  • example of
  • Central Scheduler Service to automate backups (180)
  • F
  • file systems, adding space management to (166)
  • H
  • HSM, using (158)
  • I
  • installing on Solaris
  • ADSM API files (129)
  • communications method supported (127)
  • defining environment variables (131)
  • editing the client options files (133)
  • editing the client system options file (134)
  • initializing the password (137)
  • operating system requirement (125)
  • Oracle Backup Agent files (130)
  • registering your workstation (136)
  • software support (126)
  • space requirements (124)
  • specifying the ADSM management class (135)
  • L
  • log files, using (161)
  • M
  • management class, when used (157)
  • messages, client (189)
  • O
  • OBACKUP command
  • use of (144)
  • obkcatutl utility (152)
  • Oracle Backup Agent
  • ADSM service (173)
  • before using (140)
  • client messages (187)
  • installing on Solaris (123)
  • overview (121)
  • reporting problems (170)
  • return codes (186)
  • using the scheduler to automate backups (175)
  • Oracle7
  • removing backups (149)
  • using command scripts (145)
  • Oracle8
  • removing backups (154)
  • P
  • password
  • initializing when installing on Solaris (138)
  • problems, reporting (169)
  • Q
  • q status command, using (172)
  • R
  • Recovery Manager (RMAN)
  • using to remove old backups (155)
  • using with Oracle Backup Agent (147)
  • reporting problems (168)
  • return codes (183)
  • RMAN (Recovery Manager)
  • using to remove old backups (156)
  • using with Oracle Backup Agent (146)
  • S
  • scheduler, ADSM (178)
  • scripts, using (142)
  • service, ADSM (171)
  • Space Management feature, using (160)
  • space management, adding to file systems (165)