Scripts for Application Validation

You can use one of the scripts that is provided with the Virtual Server Agent to validate VMs that run the following applications:

  • Microsoft SQL Server: By default, the SQL Server script logs on, verifies that services are running, and executes SQL queries to enumerate the databases.

    A script that can be used to validate a VM that runs SQL Server is included with the Virtual Server Agent, and is located on VSA access nodes in the following location: C:\Program Files\Commvault\ContentStore\Base\CVGetSqlServerStatus.bat.

  • Oracle database: By default, the Oracle script logs on, verifies that services are running, and executes SQL queries to enumerate the databases.

    Scripts that can be used to validate a VM that runs Oracle are included with the Virtual Server Agent, and are located on VSA access nodes in the following locations:

    • Windows: C:\Program Files\Commvault\ContentStore\Base\CVGetOracleDBStatus.bat

    • Linux: /opt/commvault/Base/CVGetOracleDBStatus.sh

    If the application validation is successful, the script return code is 0. In addition, the details for the backup job indicates whether validation was successful.

  • Microsoft Defender: This is a Microsoft command line tool that is used to scan files for malicious software. You can download the Commvault Application Validation with Microsoft Defender script and run it to validate backups using Microsoft Defender:

    1. Verify that Microsoft Defender is installed in the following location: ProgramFiles\Windows Defender\MpCmdRun.exe.

    2. Download the Application Validation with Microsoft Defender script from the Commvault Store .

You can modify the sample scripts as needed, or create a new script that can be used to validate the VM or a different application. You can use the following template as a guide when creating a new script. This template is a shell script and requires the "if...fi" format to execute a conditional command:

-- Query for CUSTOM APPLICATION service running inside OS 
-- Query all services running inside OS and apply name filter matching with 'CUSTOM APPLICATION' IS_RUNNING= <Query for CUSTOM APPLICATION service running inside OS>
-- Check if the variable IS_RUNNING is not empty
-- IF its empty then Query result is empty and no available CUSTOM APPLICATION installation/service not found
if [[ "$IS_RUNNING" != "" ]]; then
    echo "The service is running!!!"
else
    echo "The service is not running."
fi

Loading...