Automate NetBackup utilities
The Cohesity NetBackup utilities listed in this section can be set up to run automatically. A stored procedure can be edited to customize the list of utilities to be run as a background job on a particular schedule.
Windows: C:\opt\oracle\database\stored_procedures\nbu\setup_nbu_jobs_manual.sql
Linux: opt/aptare/database/stored_procedures/nbu/setup_nbu_jobs_manual.sql
All five are included in this file. To omit a particular utility from the scheduled job, use the following syntax before and after the block of code.
See Veritas NetBackup utilities.
Before the block of code to be omitted, use: /*
After the block of code to be omitted, use: */
In a text editor, open the setup_nbu_jobs_manual.sql file and modify the schedule to meet your needs. The following example illustrates how to edit syntax to customize the schedule.
----------------------------------------------------------------------------------------
-- Move clients that are in inactive policies
-- Frequency: Every day at 02:30
----------------------------------------------------------------------------------------
jobName := dba_package.getSchedulerJobName('setupInactivePolicyClients');
IF (jobName IS NOT NULL AND LOWER(jobName) <> LOWER('setupInactivePolicyClients')) THEN
DBMS_OUTPUT.PUT_LINE('setupInactivePolicyClients exists with default name '|| jobName ||
' hence will be removed and recreated.');
DBMS_SCHEDULER.DROP_JOB(job_name => jobName);
jobName := NULL;
END IF;
IF jobName IS NULL THEN
DBMS_SCHEDULER.CREATE_JOB(
job_name => 'setupInactivePolicyClients',
job_type => 'PLSQL_BLOCK',
job_action => 'server_mgmt_pkg.setupInactivePolicyClients(NULL, NULL, 0, 0);', -- What to run
start_date => SYSDATE + (5/48), -- First run is 150 mins from initial installation
repeat_interval => 'TRUNC(SYSDATE+1,''DD'') + (5/48)', -- Next run is 2:30 each subsequent day
enabled => TRUE);
ELSE
DBMS_OUTPUT.PUT_LINE('setupInactivePolicyClients exists and will be altered with updated version.');
DBMS_SCHEDULER.SET_ATTRIBUTE(
name => jobName,
attribute => 'job_type',
value => 'PLSQL_BLOCK'
);
DBMS_SCHEDULER.SET_ATTRIBUTE(
name => jobName,
attribute => 'job_action',
value => 'server_mgmt_pkg.setupInactivePolicyClients(NULL, NULL, 0, 0);'
);
DBMS_SCHEDULER.SET_ATTRIBUTE(
name => jobName,
attribute => 'repeat_interval',
value => 'TRUNC(SYSDATE+1,''DD'') + (5/48)'
);
END IF;
DBMS_OUTPUT.put_line('setupInactivePolicyClients set to run at 2:30 every day');