Loading...

Database Readiness Check - SAP for Oracle Agent

Table of Contents

Introduction

The Database Readiness Check verifies the pre-requisites are met for the Oracle iDataAgent to successfully perform backups and restores.It is available on Unix clients.

It verifies the following:

  1. The database user has read/write permissions on the SnapProtect registry, log files and base directories.
  2. The database user is a member of the SnapProtect install group as recommended.
  3. RMAN can load the CommVault SBT Media Management library.
  4. SAP backint symbolic links are configured and correctly pointing to the SnapProtect backint.

The Database Readiness Check is run from the command line on the client. It can run with the verify option, or the fix option which interactively fixes the permission failures. If the fixes require the SnapProtect services to be restarted, the Database Readiness Check automatically handles the restart.

Running the Database Readiness Check

For a root install, the Database Readiness Check uses root credentials to access the CommServe. For a non-root install, the Database Readiness Check prompts for the CommCell GUI credentials to access the CommServe.

Navigate to the software_installation_directory/iDataAgent directory and execute the following command.

./DBAgentReadinessCheck.sh -o <fix|verify> -f <log_file_full_path>

Option Description
o Specify whether the Database Readiness Check will verify or fix the permissions.
  • verify - This is the default option and performs the verification as specified in the Introduction.
  • fix - This option fixes the permissions.
f Specify the full path for the log file. The default log file path is "/tmp/CV_DBAgentReadinessCheck.log".

When using the Database Readiness Check, follow these steps.

  1. Run it with the verify option.
  2. Check the output, If there are no failed cases, then the database agent is ready for backup and restore operations.
  3. If there are permission failures, use the -o fix option to correct the database user permissions. The Database Readiness Check prompts for a user confirmation before changing the permissions. See Example of Fixing the Database User Permissions.

Example of a Database Agent Ready for Backups and Restores

This is an example of the Database Readiness Check showing the database agent is ready.

[root@dbserve4 iDataAgent]# ./DBAgentReadinessCheck.sh -o verify
[root@oel564 iDataAgent]# ./DBAgentReadinessCheck.sh -o verify
****************************************************************
Tool: Check Readiness of "Database Agents"
****************************************************************
- SnapProtect instance: [Instance001]
- snapprotect install group: [dba]
- SnapProtect database agents installed:
- SAP for Oracle Agent:
- Instance: [CER] DbHome: [/ORACLE_HOME/oracle/product/11.2.0/dbhome_1]

Checking [SAP for Oracle] Agent Readiness
*****************************************
- Database user name:[oracle]
- Database home: [/ORACLE_HOME/oracle/product/11.2.0/dbhome_1]
- Check if user is member of snapprotect install group [dba] ... [OK]
- Check if install group has (Read & Write) permissions on:
        - /opt/snapprotect/Base/Temp ... [OK]
        - /etc/CommVaultRegistry ... [OK]
        - /var/log/snapprotect/Log_Files ... [OK]
        - /opt/snapprotect/iDataAgent/jobResults ... [OK]
        - /opt/snapprotect/Base/certificates ... [OK]
- Check if RMAN can load CommVault SBT library for: (Connecting to rman TARGET / )
        - SID=CER ... [OK]
- Check if SAP backint symbolic Link exists:
        - [/usr/sap/CER/SYS/exe/run/backint] ---[/opt/snapprotect/iDataAgent/backint] ... [OK]
##############################################
##### SAP for Oracle Agent is READY #####
##############################################

Example of a Database Agent not Ready for Backups and Restores

This is an example of running the Database Readiness Check with the verify option.  In this example errors are indicated by "[FAILED]".

root@oel564 iDataAgent]# ./DBAgentReadinessCheck.sh -o verify
****************************************************************
Tool: Check Readiness of "Database Agents"
****************************************************************
- SnapProtect instance: [Instance001]
- snapprotect install group: [dba]
- SnapProtect database agents installed:
- SAP for Oracle Agent:
- Instance: [CER] DbHome: [/ORACLE_HOME/oracle/product/11.2.0/dbhome_1]

Checking [SAP for Oracle] Agent Readiness
***************************************** - Database user name:[oracle]
- Database home: [/ORACLE_HOME/oracle/product/11.2.0/dbhome_1]
- Check if user is member of snapprotect install group [dba] ... [OK]
- Check if install group has (Read & Write) permissions on:
        - /opt/snapprotect/Base/Temp ... [FAILED]
        - /etc/CommVaultRegistry ... [OK]
        - /var/log/snapprotect/Log_Files ... [OK]
        - /opt/snapprotect/iDataAgent/jobResults ... [OK]
         -/opt/snapprotect/Base/certificates ... [OK]
- Check if RMAN can load CommVault SBT library for: (Connecting to rman TARGET / )
        - SID=CER ... [FAILED]
- Check if SAP backint symbolic Link exists:
        - [/usr/sap/CER/SYS/exe/run/backint] ---> [/opt/snapprotect/iDataAgent/backint] ... [OK]

##############################################
#### SAP for Oracle Agent is NOT READY ####
##############################################
Please correct the FAILED checks.
Please see [/tmp/CV_DBAgentReadinessCheck.log] for more details.

Example of Fixing the Database User Permissions

This option presents changes that must be approved.  See the lines in bold starting with "WARNING".

When it is required, the Database Readiness Check automatically restarts the SnapProtect services.

[root@oel564 iDataAgent]# ./DBAgentReadinessCheck.sh -o fix
****************************************************************
Tool: Check Readiness of "Database Agents"
****************************************************************
- SnapProtect instance: [Instance001]
- snapprotect install group: [dba]
- SnapProtect database agents installed:
- SAP for Oracle Agent:
- Instance: [CER] DbHome: [/ORACLE_HOME/oracle/product/11.2.0/dbhome_1]

Checking [SAP for Oracle] Agent Readiness
***************************************** - Database user name:[oracle]
- Database home: [/ORACLE_HOME/oracle/product/11.2.0/dbhome_1]
- Check if user is member of snapprotect install group [dba] ... [OK]
- Check if install group has (Read & Write) permissions on:
        - /opt/snapprotect/Base/Temp ... [FAILED]
        - /etc/CommVaultRegistry ... [OK]
        - /var/log/snapprotect/Log_Files ... [OK]
        - /opt/snapprotect/iDataAgent/jobResults ... [OK]
        - /opt/snapprotect/Base/certificates ... [OK]
- Check if RMAN can load CommVault SBT library for: (Connecting to rman TARGET / ) - SID=CER ... [FAILED]
- Check if SAP backint symbolic Link exists:
        - [/usr/sap/CER/SYS/exe/run/backint] ---> [/opt/snapprotect/iDataAgent/backint] ... [OK]

##############################################
#### SAP for Oracle Agent is NOT READY ####
##############################################

Please correct the FAILED checks.
Please see [/tmp/CV_DBAgentReadinessCheck.log] for more details.

Fixing database group [dba] permissions
*****************************************
WARNING!! Group [dba] will be given WRITE permissions. Please answer [y/n] to proceed: y
Using installer version 11.
Assigning setup GUID ... test.commvault.com-168.42.96.4-19602
Stopping NetApp services for Instance001 ...

NetApp 11 Change
Changing Unix Group for Instance001


Changing group to dba for the following directories...
- Registry(/etc/CommVaultRegistry) ... done.
- Executables(/opt/snapprotect) ... done.
- Logs(/var/log/snapprotect) ... done.
- DC Cache(/opt/snapprotect/iDataAgent/jobResults/cvdccache) ... done.
- Job Results for oel564(/opt/snapprotect/iDataAgent/jobResults) ... done.
- Index Cache for oel564(/opt/snapprotect/MediaAgent/IndexCache) ... done.
Updating /opt/snapprotect/Base/pkginfo for GALAXY_GROUP=dba ... done.
Updating /opt/snapprotect/Base0/pkginfo for GALAXY_GROUP=dba ... done.

SnapProtect 11 Change
Changing Group and Other User's Access Permissions for Instance001


Changing access permissions for group users to 7 and other users to 5 for the following directories...
- Registry(/etc/CommVaultRegistry) ... done.
- Executables(/opt/snapprotect) ... done.
- Logs(/var/log/snapprotect) ... done.
- DC Cache(/opt/snapprotect/iDataAgent/jobResults/cvdccache) ... done.
- Job Results for oel564(/opt/snapprotect/iDataAgent/jobResults) ... done.
- Index Cache for oel564(/opt/snapprotect/MediaAgent/IndexCache) ... done.
Updating /opt/snapprotect/Base/pkginfo for GALAXY_OTHER_ACCESS=5 ... done.
Updating /opt/snapprotect/Base0/pkginfo for GALAXY_OTHER_ACCESS=5 ... done.
Updating /opt/snapprotect/Base/pkginfo for GALAXY_GROUP_ACCESS=7 ... done.
Updating /opt/snapprotect/Base0/pkginfo for GALAXY_GROUP_ACCESS=7 ... done.
Cleaning up /opt/snapprotect/Base/Temp ...
Starting NetApp services for Instance001 ...



SnapProtect 11 Change
Done


[ PLEASE READ THE FOLLOWING NOTES ]

(1) Depending on the file type, the actual permission might be more restrictive.
For example, a text file may not have executable bit on.

(2) If you run installer to add more instances or modules, you might need to
rerun this utility to fix certain files changed during the install.


Thank you for using CommVault Systems, Inc. SnapProtect.


Exiting the tool. Please check logs at /tmp/CV_DBAgentReadinessCheck.log