Scheduling utilities to run automatically
The utilities can be run on a one-time basis, or scheduled to run every day to automatically keep your hosts and host groups up to date. Scheduling can be accomplished by creating an Oracle job. IT Analytics already makes use of Oracle jobs to run many background tasks such as purging old data and rebuilding indices.
The sample SQL file in Example-Scheduling Utilities to Run Automatically sets up an Oracle job to run every day at 5:00 a.m. and call the moveOrCopyClients utility to move clients from one folder to another. This example can be used as a template for other automatic jobs you need to set up. Simply customize the text in bold for your particular requirements.
To see the Oracle jobs that are automatically configured as part of a new install, review the following files:
<database_home>/stored_procedures/setup_base_jobs.plb<database_home>/stored_procedures/nbu/setup_nbu_jobs.sql<database_home>/stored_procedures/nbu/setup_nbu_jobs.sql<database_home>/stored_procedures/tsm/setup_leg_jobs.plb
Where database_home is /opt/aptare/database for Linux servers and C:\opt\oracle\database for Windows servers.
In order to execute the following sample SQL file, as user aptare on a Linux system or on a Windows system as an Administrator who is a member of the ORA_DBA group execute the following:
sqlplus portal/<portal_password>@//localhost:1521/scdb@setup_ora_job.sql
The following example uses two methods:
moveOracleClients | The name you want to assign to this job you are defining. |
MoveOrCopyClients | The utility you are calling along with the parameters you are passing. |
Note:
The parameters passed to the moveOrCopyClients method which must be quoted actually have two single quotes. The two single quotes is the standard Oracle syntax to incorporate a literal quote within an already quoted string.