Home » RDBMS Server » Performance Tuning » Automating - Gathering Satistics
Automating - Gathering Satistics [message #206439] Thu, 30 November 2006 01:05 Go to next message
Messages: 315
Registered: June 2002
Senior Member

I have a PL/SQL for gathering statistics(dbms_stats.GATHER_TABLE_STATS). I want to automate the the scripts. At present I'm submitting a DBMS_JOB.

Can anybody help me in to cron the job, i mean running the sql from OS.

Re: Automating - Gathering Satistics [message #206506 is a reply to message #206439] Thu, 30 November 2006 06:12 Go to previous message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
That should be quite simple.
Write a wrapper shell script, say myshellscript.sh
Something like this (untested code)
sqlplus -s scott/tiger <<EOF
exec dbms_job(.............);

give the execute rights for the file myshellscript.sh.
schedule it in cronjob. Search forum/google for examples.
Previous Topic: SQL vs. PLSQL
Next Topic: Index Rebuild Taking Long
Goto Forum:

Current Time: Wed Oct 26 01:13:46 CDT 2016

Total time taken to generate the page: 0.05747 seconds