Skip to main content
SnapManager Oracle

Operations in task scripts

Contributors

The pretask or post-task scripts that you create must follow a standard SnapManager for Oracle plug-in structure.

The pretask and post-task scripts must include the following operations:

  • check

  • describe

  • execute

If any one of these operations is not specified in the pretask or post-task script, then the script becomes invalid.

When you run the smo plugin check command for the pretask or post-task scripts, the returned status of the scripts display error (because the returned status value is not zero).

Operation Description

check

The SnapManager server runs the plugin.sh -check command to ensure that the system has execution permission on the plug-in scripts. You might also include file permission checking on the remote system.

describe

The SnapManager server runs the plugin.sh -describe command to obtain information about your script and match the elements provided by the specification file. Your plug-in script must contain the following description information:

  • SM_PI_NAME: Script name. You must provide a value for this parameter.

  • SM_PI_DESCRIPTION: Description of the script's purpose. You must provide a value for this parameter.

  • SM_PI_CONTEXT: Context in which the script should run-for example, root or oracle. You must provide a value for this parameter.

  • SM_PI_TIMEOUT: The maximum time (in milliseconds) that SnapManager should wait for the script to complete processing and terminate execution. You must provide a value for this parameter.

  • SM_PI_PARAMETER: One or more custom parameters necessary for your plug-in script to perform processing. Each parameter should be listed in a new output line and include the name of the parameter and a description. When the script completes processing, the parameter value will be provided to your script by an environment variable.

The following is the sample output of the Followup_activities script.

plugin.sh - describe

SM_PI_NAME:Followup_activities
SM_PI_DESCRIPTION:this script contains follow-up activities to be executed after the clone create
operation.
SM_PI_CONTEXT:root
SM_PI_TIMEOUT:60000
SM_PI_PARAMETER:SCHEMAOWNER:Name of the database schema owner.
Command complete.

execute

The SnapManager server runs the plugin.sh -execute command to start your script to execute the script.

Related information