Oracle® Enterprise Manager Administrator's Guide for Software and Server Provisioning and Patching 10g Release 5 (10.2.0.5.0) Part Number E14500-04 |
|
|
PDF · Mobi · ePub |
The Deployment Procedures offered by Enterprise Manager Grid Control are default procedures that have been created considering all the best practices in the industry. The steps embedded within a Deployment Procedure ensure that they meet all your provisioning and patching requirements. You can, of course, use them with the default settings to provision or patch your targets in the environment, however, you also have the choice of customizing them to include additional custom steps, disable unwanted steps, and use authentication tools to run some steps as another user.
By customizing Deployment Procedures, you can also implement different error handling methods. For example, in a patching operation where multiple hosts are patched in parallel, it may be wise to skip the host on which a failure occurs. However, failure on a device creation could render the remaining provisioning operation ineffective. Therefore, it may be necessary to abort the entire procedure for failure of such a step.
This chapter helps you understand how you can customize Deployment Procedures to make them suit your needs. In particular, this chapter covers the following:
The following describes the types of customization you can perform with Deployment Procedures:
Type 1 | Type 2 |
---|---|
Editing Default Deployment Procedures
You can edit an existing, default Deployment Procedure that is offered by Enterprise Manager Grid Control. You can perform the following tasks:
|
Creating Custom Deployment Procedures
You can create your own custom Deployment Procedure with new steps, phases, privilege levels, and so on. However, note that you can create custom Deployment Procedures only using Patching Deployment Procedures. You can perform the following tasks:
|
The following shows the different sections that need to be edited while customizing a Deployment Procedure to add or delete steps, enable or disable steps, enable e-mail notifications, and enable other privilege-level settings.
Before you start customizing the Deployment Procedures, keep in mind the following points:
When you customize any default patching Deployment Procedure offered by Enterprise Manager Grid Control, you must not disable or delete the Stage step and the Apply Patch step. You can disable or delete one of them, but not both. If you still do so, then the <Target> Updates section on the Software Updates page of the Deployment Procedure will not appear. As a result, you will not be able to select a patch. If you want to add a custom step to replace them, them without disabling or deleting these steps, add an additional step while customizing the Deployment Procedure.
When you create a new custom patching Deployment Procedure with the default steps disabled or deleted, you must also disable or delete the Initialize step. Otherwise, the custom Deployment Procedure will fail.
If you do not have the privileges of a super administrator, then you will not be able to customize the Deployment Procedures (The Create Like button will be disabled for the Deployment Procedures). You will also not be able to update Oracle Software Library (Software Library).
The first step towards customizing a Deployment Procedure is to create a copy of the default Deployment Procedure that is offered by Enterprise Manager Grid Control. Note that only a copy can be edited and customized with your changes; the default Deployment Procedures must always and will always remain unchanged.
To create a copy of a default Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, edit the procedure to customize it according to your needs, and click Save.
You can add additional phases or steps to a Deployment Procedure to run additional custom scripts, host commands, or jobs. For more information about phases and steps, see Understanding Phases and Steps.
This section explains how you can add different types of phases or steps to a Deployment Procedure. In particular, it covers the following:
To add a rolling phase to a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select the phase before or after which you want to add a new phase, and click Insert.
In the Create wizard, do the following:
On the Create page, specify general information about the phase as described in Table 23-1.
On the Select Target List page, select a target list to indicate the type of targets on which the new phase should run.
On the Review page, review the information you have provided for creating a new phase, and click Finish.
Table 23-1 Field Description - Adding Rolling Phase
Field Name | Description |
---|---|
Select |
Select Phase. |
Name |
Specify a name for the custom phase. |
Description |
Provide a description for the custom phase. |
Condition |
Leave this field blank. |
Insert Location |
If you want to insert the custom phase after the phase or step you selected, then select After <phase or step name>. Otherwise, select Before <phase or step>. |
Type |
If you are adding a rolling phase, then select Rolling. If you are adding a parallel phase, then select Parallel. |
Error Handling |
Select the error handling mode you want to set for the custom phase. To understand these error handling modes, see Changing Error Handling Modes. |
To add a job step to a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.
In the Create wizard, do the following:
On the Create page, specify general information about the step as described in Table 23-2.
On the Select Type page, select a job type that best describes the task that you want the step to perform. For example, if you want to job to transfer files across the network, then select File Transfer.
On the Map Properties page, specify values for the parameters that are required by the selected job type.
On the Review page, review the information you have provided for creating a new step, and click Finish.
To add a directive step to a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.
In the Create wizard, do the following:
On the Create page, specify general information about the step as described in Table 23-2.
On the Select Directive page, select a directive from the Software Library that you want to run on the targets.
On the Map Properties page, specify values for the properties associated with the selected directive.
On the Review page, review the information you have provided for creating a new step, and click Finish.
To add a generic component step to a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.
In the Create wizard, do the following:
On the Create page, specify general information about the step as described in Table 23-2.
On the Select Component page, select a component from the Software Library that you want to stage on the targets.
On the Select Directive page, select a directive from the Software Library that you want to run on the targets.
On the Map Properties page, specify values for the properties associated with the selected component and directive.
On the Review page, review the information you have provided for creating a new step, and click Finish.
To add a registered component step to a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.
In the Create wizard, do the following:
On the Create page, specify general information about the step as described in Table 23-2.
On the Select Type page, select a component type.
The list is a subset of the component types displayed on the Components page in the Provisioning tab. Each type in the list has a specific job associated with it. These jobs stage and install the components.
On the Select Component page, select a component from the Software Library that you want to stage on the targets.
On the Map Properties page, specify values for the parameters that are required by the job associated with the selected component.
On the Review page, review the information you have provided for creating a new step, and click Finish.
To add a host command step to a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.
In the Create wizard, do the following:
On the Create page, specify general information about the step as described in Table 23-2.
On the Enter Command page, specify the command or script, which you want to run on the target, and the privilege to run it.
To run the host command as a script, select Script from the Command Type list. Specify the shell that can interpret the script. The script is passed as standard input to the specified interpreter.
To run the host command as a command line, select Single Operation from the Command Type list. Specify the text you want to execute used as a command line. No assumptions are made about the shell to interpret this command line. The first entry in the command line is assumed to be the process to spawn and the rest of the command line as passed as arguments to this process. Therefore, a command line of ls -a /tmp
spawns a process of "ls" (from the current path; also depends on the Oracle Management Agent) and passes "-a" as the first argument and then "/tmp" as the second argument to this process.
Note: The command line mode assumes that the first part of the command line is the process to be spawned. Therefore, shell internals and the commands that rely on the PATH environment variable for resolution are not recognized. If any such commands need to be used, then you need to prepend the shell that interprets the command line.
For example, the command cd /tmp && rm -rf x
expands to "cd" as a process and then "/tmp, &&, rm, -rf, x" as arguments. To fix this, change the command line to /bin/csh -c "cd /tmp && rm -rf x"
.
Another example, the command export PATH=/opt:${PATH}; myopt -install
expands to "export" as a process and then "PATH=/opt:${PATH};, myopt, -install" as arguments. To fix this, use /bin/sh -c "export PATH=/opt:${PATH}; myopt -install"
.
On the Map Properties page, specify values for the parameters that are required by the job associated with the selected component.c
On the Review page, review the information you have provided for creating a new step, and click Finish.
To add a manual step to a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.
In the Create wizard, do the following:
On the Create page, specify general information about the step as described in Table 23-2.
On the Enter Instructions page, provide a message to inform the operator about a manual step. For example, if want to instruct the operator to log in to a system and update the kernel parameter, then specify the following:
You have been logged out of the system. Log in and update the Kernel parameters.
On the Review page, review the information you have provided for creating a new step, and click Finish.
Table 23-2 Field Description - Adding Steps
Field Name | Description |
---|---|
Select |
Select Step. |
Name |
Specify a name for the custom step. |
Description |
Provide a description for the custom step. |
Condition |
Leave this field blank. |
Insert Location |
If you want to insert the custom step after the step you selected, then select After <step name>. Otherwise, select Before <step>. |
Type |
|
Error Handling |
Select the error handling mode you want to set for the custom step. To understand these error handling modes, see Changing Error Handling Modes. |
You can delete the phases or steps that you do not want in a Deployment Procedure. For more information about phases and steps, see Understanding Phases and Steps.
To delete phases or steps in a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select the step or phase you want to delete, and click Delete.
Oracle recommends that you disable the steps or phases instead of deleting them because steps or phases once deleted cannot be retrieved, but steps or phases disabled can always be enabled later. For information about enabling and disabling steps or phases, see Enabling or Disabling Phases or Steps.
If you do not want to have some phases or steps in a Deployment Procedure, you can always disable them instead of deleting them. This is a preferred option because phases or steps once deleted cannot be retrieved, but phases or steps disabled can always be enabled later. For more information about phases and steps, see Understanding Phases and Steps.
To enable or disable phases or steps in a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, do the following:
To disable a phase or step, select the phase or step you want to disable, and click Disable.
To enable a phase or step, select the phase or step you want to enable, and click Enable.
The following is an example that illustrates how you customize the Oracle Database Provisioning Deployment Procedure to enable the Prepare Create Directory step:
All the Deployment Procedures offered by Enterprise Manager Grid Control require administrator privileges to run. While most steps within a Deployment Procedure can be run as a normal user, there are some steps that require special permissions and privileges, and unless you provide the administrator's credentials, you cannot proceed with the deployment. For more information about steps, see Understanding Phases and Steps.
Under such circumstances, you can do one of the following. Although the former option is recommended, you are always free to use the latter option to suit your needs.
Customize the Deployment Procedure to disable the steps that require special privileges, run the other steps as a normal user, and have the administrator run the disabled steps later.
Use authentication utilities to run some steps within the Deployment Procedure with the privileges of another user. The authentication utilities supported by Enterprise Manager Grid Control are SUDO, PowerBroker, and Privilege Delegation.
This section explains the how Privilege Delegation scores over other two utilities, and describes how you can customize the steps within a Deployment Procedure to run them as another user.
In particular, this section covers:
While SUDO and PowerBroker are third-party utilities supported in Enterprise Manager Grid Control, Privilege Delegation is proprietary to Oracle. Privilege Delegation is a framework that allows you to use either SUDO or PowerBroker to perform an activity with the privileges of another user. Privilege Delegation can use either SUDO or PowerBroker, but not both, and the settings are only for a single host. Therefore, if a host is set up with pbrun, then it will use only pbrun.
The support for SUDO and PowerBroker is offered in Enterprise Manager 10g Grid Control Release 4 (10.2.0.4) or lower, but the support for Privilege Delegation is offered only in Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) or higher.
Note:
The supported version of SUDO is 1.6.9.5 P5, and the supported version of PBRUN is 4.0.8.You can use any of these authentication utilities to run the deployment procedure. However, some limitations involved in using SUDO and PowerBroker are:
While SUDO is supported in a password-protected mode, PowerBroker is not. Therefore, every time you use PowerBroker, you will have to run them without a password.
You have to configure SUDO and PowerBroker settings every time you edit a deployment procedure. You cannot create a standard template with these settings that can be reused wherever required.
You can use SUDO and PowerBroker settings only for deployment procedures, and not for jobs that can be run for performing critical tasks on hosts.
Privilege Delegation, a framework that combines SUDO and PowerBroker, offers the same functionality with the following advantages:
You have the flexibility to use either SUDO or PowerBroker within the same framework.
Using the framework, you can now run PowerBroker in a password-protected mode. This offers more security.
You can create a template with these Privilege Delegation settings and reuse it for multiple hosts. This not only allows you to standardize Privilege Delegation setting across your enterprise, but also facilitates the process of configuring Privilege Delegation Settings. It simplifies the Privilege Delegation setting management as well.
You can use the Privilege Delegation settings not only for deployment procedures, but also for jobs in Enterprise Manager Grid Control.
If you want to use SUDO authentication utility, then before editing a Deployment Procedure, update the /etc/sudoers
file to allow a normal user to switch to another user who has the privileges to run the Deployment Procedure. Also, if you want to restrict the normal user to have SUDO access only to certain commands, then specify a list of those commands for which SUDO access is required.
The following provides a list of commands for which SUDO access is required for different Deployment Procedures:
Table 23-3 Updating SUDOERS File with a List of Commands
Deployment Procedure Name | Commands Requiring SUDO Access |
---|---|
|
In addition, add the following line:
|
If you want to use Privilege Delegation authentication utility, then before editing a Deployment Procedure, create a Privilege Delegation template with the required settings for a host. To do so, follow these steps:
In Grid Control, from the top-right corner, click Setup.
On the Overview of Setup page, from the vertical menu, click Manage Privilege Delegation Settings.
On the Manage Privilege Delegation Settings page, from the Related Links section, click Manage Privilege Delegation Settings Template.
On the Manage Privilege Delegation Settings Templates page, from the Create list, select a privilege delegation type, either Sudo or PowerBroker, and click Go.
On the Create '<delegation type>' Setting Template page, provide the template name and the command to run (for PowerBroker, you can optionally provide the password prompt), and click Save.
On the Manage Privilege Delegation Setting Templates page, select the template you created and click Apply.
On the Apply '<delegation type>' Setting: New page, click Add Targets to apply the privilege delegation template settings to selected hosts, and click Apply.
Note:
If you do not apply the privilege delegation template to a target, and if you configure a step in the deployment procedure to run in Privilege Delegation mode, then the deployment procedure for that target runs the step in normal mode instead.After creating the template, to understand how it can be applied to Deployment Procedures, see Using SUDO, PowerBroker, and Privilege Delegation Settings.
You can use SUDO, PowerBroker, and Privilege Delegation Settings globally, that is, for all steps, or only for some steps within a Deployment Procedure. This section explains the following:
For SUDO and PowerBroker, you can specify the SUDO and PowerBroker commands to run, and also set environment variables and the preferred command interpreter for them.
For Privilege Delegation, you can specify the user and the profile that the step must run as.
For each step, from the Run Privilege column, you can select either SUDO, PAM, or Privilege Delegation.
If you select SUDO or PAM, then in the Run Privilege Command/Privilege Delegation column, specify the Run As command. If you select Privilege Delegation, then specify the Run As value in the first text box and the Profile value in the second text box.
Note:
If you select SUDO or PAM, and leave the Run Privilege Command column blank, then the commands as set in the SUDO Command and PAM Command fields are used. However, if you want some steps to override these globally declared commands, then in the Run Privilege Command column for that step, specify the commands that need to be used instead. If these settings are not made, then the Run As and Profile values specified along with preferred credential are used.See Also:
You can access My Oracle Support note 603108.1 to view use cases that describe how SUDO and PAM settings can be applied.For file transfer-based job steps, you can apply the Privilege Delegation settings while editing that step. For example, one of the steps in the One Click Extend Cluster Database deployment procedure is Copy Archives. This is a file transfer-based job step for which you can apply the Privilege Delegation settings. To do so, you can click the step name and on the Map Parameters page, in the Run Mode section, from the Run Privilege for Source Target list and Run Privilege for Destination Target list, select Privilege Delegation. Then provide the Run As value and profile that must be used.
Note:
For configuration collection-based job step, you can NOT apply any Privilege Delegation settings. For example, one of the steps in the One Click Extend Cluster Database deployment procedure is Refresh Host Configuration. This is a configuration collection-based step for which Privilege Delegation settings cannot be applied.Every step in a Deployment Procedure is preconfigured with an error handling mode that indicates how the Deployment Procedure will behave when the phase or step encounters an error. The error handling modes offered by Enterprise Manager Grid Control are:
Inherit - Inherits the error handling mode that was set for the enclosing phase. (When set for a step that is outside a phase, it inherits the error handling mode from the Deployment Procedure).
Stop On Error - Stops when an error is encountered. Deployment Procedure does not proceed to the next step until you correct the errors or override them.
Continue On Error - Continues even when an error is encountered.
Skip Target - Ignores the failed target on the list and continues with other targets.
For more information about steps, see Understanding Phases and Steps.
To change the error handling modes, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.
On the Create Like Procedure page, select a phase or step, and from the list provided in the Error Handling Mode column against that phase or step, select the mode you want to set.
Once the mode is selected from the list, Enterprise Manager Grid Control automatically refreshes the page with the newly selected mode for that phase or step.
The following is an example that illustrates how you customize the Oracle Database Provisioning Deployment Procedure to change the error handling mode of the Destination User Permission Checks phase:
Directives are essentially scripts stored in the Software Library. They are used in Deployment Procedures within a Directive Step, which is a special type of action step. For more information about Directive Step, see Understanding Phases and Steps.
If you want to customize a directive offered by Enterprise Manager Grid Control, then first create a copy of the Perl script associated with that Directive and make a new directive out of that copy. Then customize the Deployment Procedure to modify a step to use this new directive, and then schedule the deployment. This section explains the following:
To create a new customized directive using a default directive, follow these steps:
In Grid Control, click the Deployments tab and then the Provisioning secondary tab.
On the Provisioning page, click Directives.
On the Directives page, from the table, expand Oracle Directives and then expand other levels under this category to reach the directive you want to copy.
For example, if you want to copy the Apply Patch directive of a patching operation, then expand Oracle Directives and then expand Patching. From this level, expand Common, and then All, and finally Generic. Under Generic, you should see the directive Apply Patch.
Select the directive you want to copy and click Edit. Open the Perl script, copy the contents of it to a local editor, and save it locally.
To store the new directive, follow these steps:
In Grid Control, click the Deployments tab and then the Provisioning secondary tab.
On the Provisioning page, click Directives.
On the Directives page, click Create Folder to create a folder titled Custom Directives. This is to ensure that you separate the custom directives from the default directives.
On the Directives page, from the table, select Custom Directives and click Create Directives.
In the Create Directive wizard, do the following:
On the Describe page, describe the directive you are creating.
On the Configure page, click Add to specify the command line arguments to be passed to the Directive. Set the Shell Type to Perl because you are adding a Perl script. If the script is neither Perl nor Bash, then set it to Defined in Script.
Each entry represents a single command line argument. Each argument may include a variable to be set later, a prefix and suffix. The prefix and suffix text are appended before and after the property value to produce the command line argument.
Repeat this step to add all the command line arguments.
On the Upload File page, select Upload from Local Machine and click Browse to select the script from the local system where you saved the file.
On the Review page, review the information you have provided for this new directive, and click Finish.
To customize a Deployment Procedure to use the new directive, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure for which you want to use this new directive, and click Create Like.
On the Create Like Procedure page, do the following:
From the table that lists all the steps within that Deployment Procedure, select the directive step with which you want to associate the new directive, and click Edit Step.
In the Edit Directive Step wizard, do the following:
On the Edit page, click Next.
On the Select Directive page, select Select New Directive. Then search and select the new directive you created, and click Next.
On the Map Properties page, specify the values for the directive properties, and click Next.
On the Review page, click Finish.
Click Save.
To run the customized Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the customized Deployment Procedure and click Schedule Deployment.
Enterprise Manager Grid Control can send e-mail notifications to report the status of a Deployment Procedure. However, by default, Deployment Procedures do not have this feature enabled. To configure Deployment Procedures to send e-mail notifications, you must first customize them and enable the e-mail notification option, and then enable the Send E-mail option for the standard PAF Status Notification rule. This section describes how you can enable e-mail notifications for Deployment Procedures. In particular, this section covers the following:
IMPORTANT:
As a prerequisite, you are expected to have configured the Mail Server and set up the e-mail address in Enterprise Manager Grid Control. If you have not already done this, see the chapter on Configuring Notifications in the Enterprise Manager Configuration Guide available at:To enable e-mail notifications in a Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the Deployment Procedure for which you want to set up e-mail notification, and click Create Like.
On the Create Like Procedure page, do the following:
Select Enable Notification.
(Optional) For Procedure Status Notification Job Tag, provide a notification tag name.
Note:
Ensure that you specify not more than 30 characters. The text you specify here will be prepended to the notification job name.For Status for which Notification is to be Sent, select the state for which you want the notifications to be sent.
Click Save.
Enterprise Manager Grid Control displays the Deployment Procedure Manager page.
On the Deployment Procedure Manager page, from the top-right corner, click Preferences.
On the General page, do the following:
In the E-mail Address section, click Add Another Row to add a row in the table, and specify the e-mail address to which the notification should be sent.
Click Apply.
From the left menu bar, click Rules.
On the Notification Rules page, do the following:
From the table, select PAF Status Notification, and for this notification rule, enable the Send E-mail option from the Subscribe (Send E-mail) column.
Click Apply.
You can customize the standard PAF Status Notification rule to receive notifications in required ways for specific deployment procedures. For example, you might want to be notified by e-mail for a test system procedure, but for a production run you might want to be informed of the status through SMS Alerts.
To incorporate specific requirements and enable different methods of notification, you should use the Create Like function to modify the standard notification rule and edit the job with the specific notification tag name used in the Deployment Procedure and associating specific method of notification from the pre-defined notification methods.
To customize the standard PAF Status Notification rule, follow these steps:
In Grid Control, from the top-right corner, click Preferences.
On the General page, from the left menu bar, click Rules.
On the Notification Rules page, from the table, select PAF Status Notification, and click Create Like.
On the Create Notification Rule page, do the following:
On the General page, specify a notification rule name and a brief description for the rule.
To roll back patches, you must first download the rollback Perl script, then upload it as a directive to the Software Library, and then use it with a customized Deployment Procedure. This section explains how can perform each of these tasks. In particular, this section covers the following:
To roll back patches, you have to use the Perl script rollback_patch.pl
. This script is available as an attachment to My Oracle Support Note: 577557.1. Access this note and download the script to your local system.
To store the rollback_patch.pl
script as a directive in the Software Library, follow these steps:
In Grid Control, click the Deployments tab and then the Provisioning secondary tab.
On the Provisioning page, click Directives.
On the Directives page, click Create Folder to create a folder titled Custom Directives. This is to ensure that you separate the custom directives from the default directives.
On the Directives page, from the table, select Custom Directives and click Create Directives.
In the Create Directive wizard, do the following:
On the Describe page, specify the name Rollback Patches and provide the description Directive to roll back patches in rollback or nrollback mode. Click Next.
On the Configure page, click Add to specify the following command line arguments to be passed to the Directive: oh, patchid, stageDir, command, patchsetRelease.
Set the Shell Type to Perl because you are adding a Perl script.
On the Upload File page, select Upload from Local Machine and click Browse to select the script from the local system where you saved the rollback_patch.pl
file.
On the Review page, review the information you have provided for this new directive, and click Finish.
To customize a Deployment Procedure to use the new Rollback Patches directive, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select a patching Deployment Procedure that you want to customize for using this new directive, and click Create Like.
On the Create Like Procedure page, do the following:
From the table that lists all the steps within that Deployment Procedure, select the Apply Patch directive step with which you want to associate the new directive, and click Insert.
In the Insert Directive Step wizard, do the following:
On the Create page, provide a name and description. From the Insert Location list, select Before "Apply Patches". From the Type list, select Library: Directive. Click Next.
On the Select Directive page, select Select New Directive. Then search and select the new Rollback Patches directive you created. Select Always Use Latest Revision. Click Next.
On the Map Properties page, specify the following values for the directive properties, and click Next.
Directive Property | Display Name to be Specified | Description to be Specified | Variable to be Specified |
---|---|---|---|
Oh |
ORACLE_HOME |
Oracle home of the target |
Select Choose Variable and then select Target Variable: oraHome from the associated list. |
patchid |
Patch ID |
Comma-separated list of patch numbers |
Select Ask User at Run-Time |
stageDir |
Stage Directory |
Directory where the patch can be staged |
Select Choose Variable and then select replacedStageDir from the associated list. It can be also be set to a value where the patch is staged. However, this is required only for patches of release 10.1.0.x |
command |
Rollback Command |
Rollback command to run |
Select Ask User at Run-Time |
patchsetRelease |
Patch Set Release Version |
Patch set release number |
Select Ask User at Run-Time |
On the Review page, click Finish.
Click Save.
To run the customized Deployment Procedure, follow these steps:
In Grid Control, click the Deployments tab.
On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.
On the Deployment Procedure Manager page, select the customized Deployment Procedure and click Schedule Deployment.
In the Deployment Procedure Wizard, provide the required information and submit it for deployment.
On the Library Step Properties page, you will be prompted to specify the patch ID, the rollback command, and the patch set release version. Specify the following vales on this page:
Table 23-5 Values for Library Step Properties Page for Rolling Back Patches
Library Step | Values to be Specified |
---|---|
Patch ID |
Specify the patch number you want to roll back. If you want to roll back multiple patches, then specify the patch number separated by a comma. |
Rollback Command |
Specify rollback for normal patches and nrollback for Napply CPU patches. |
Patchset Release Version |
Specify the release for which the patch is being applied. |