Scripts

This chapter presents the available scripts. All our scripts have a detailed synopsis please check the option “-h” or “—help”.

alldgcheck.ksh

This script serves to print all database Data Guard status using the database view V$DATABASE.

Syntax

alldgcheck.ksh

check_primary.ksh

This script serves to execute a script only if the database role is PRIMARY.

check_primary.ksh [SID] [Command & Parameters]

check_standby.ksh

This script serves to execute a script only if the database role is STANBDY. It executes the script if the database is either stopped, in nomount, mounted or open read-only.

check_standby.ksh [SID] [Command & Parameters]

sdg.ksh

This script serves to printout the Data Guard broker configuration and his state of the current database instance (in your environment). Parameters permit to print either the status of the configuration or the detail of a database.

sdg.{ksh|ps1} [-p|-s|none] [–v] [-m]

purge_standby_applied_archlog.ksh

This script serves for the deletion of standby database archive logs. Starting with Oracle 11g this script has become obsolete as of the new RMAN parameter “ARCHIVELOG DELETION POLICY”. Please check the Swiss Oracle User Group article, available within the package under “${DMK_HA}/doc”

purge_standby_applied_archlog.ksh [SID] [Keep interval in days]

convert_standby.sh

This script converts a standby database to a snapshot or physical standby database. Use -sn to convert a standby database from physical to snapshot. Use -ph to convert a standby database from snapshot to physical. Username and password needs to be provided to connect to the standby database using Oracle Net. It is recommended to use SYSDG priviledged user rather than a SYSDBA priviledged user for security concern.

convert_standby.sh [SID] [username] [password] [tnsname_entry] [-sn|-ph]

Last updated