HI folks,
I have two big oracle scripts that needs to be run first thing every morning, the problem is these two scripts takes at least 25 minutes each to run. It deletes the old records from the table and repopulates it by extracting data from many other tables, this is for analyse purpose.
It is important that these two scripts are run every morning.
Now I have done some research from web but I am not too certain if this is correct, can you check if my crontab entry is correct and the script I created for invoking sqlplus and running 2 oracle scripts.
We are using AIX 4.3 and Oracle 8.0.5.
CRONTAB entry;
0 6 * * 1-5 /u/oramon/orascript 2 > /dev/null
I am not too sure why 2 > /dev/null should be added, I copied it from other entries on the crontab.
ORASCRIPT;
su - oracle /* Oracle user for running script? */
ORACLE_SID=blb export
{Folks is there any other environment settings that I should add?}
sqlplus -s bcisv4/<password>@SID
execute up_acthist /* will that run the script? */
execute up_seg
exit
EOF
Is that all I need or is there anything I should add to the ORASCRIPT? Is execute command correct for running oracle script or should I use RUN?
Pls help me, thanking you all in advance.
Cheers
Katherine
I have two big oracle scripts that needs to be run first thing every morning, the problem is these two scripts takes at least 25 minutes each to run. It deletes the old records from the table and repopulates it by extracting data from many other tables, this is for analyse purpose.
It is important that these two scripts are run every morning.
Now I have done some research from web but I am not too certain if this is correct, can you check if my crontab entry is correct and the script I created for invoking sqlplus and running 2 oracle scripts.
We are using AIX 4.3 and Oracle 8.0.5.
CRONTAB entry;
0 6 * * 1-5 /u/oramon/orascript 2 > /dev/null
I am not too sure why 2 > /dev/null should be added, I copied it from other entries on the crontab.
ORASCRIPT;
su - oracle /* Oracle user for running script? */
ORACLE_SID=blb export
{Folks is there any other environment settings that I should add?}
sqlplus -s bcisv4/<password>@SID
execute up_acthist /* will that run the script? */
execute up_seg
exit
EOF
Is that all I need or is there anything I should add to the ORASCRIPT? Is execute command correct for running oracle script or should I use RUN?
Pls help me, thanking you all in advance.
Cheers
Katherine