-
Hi friends,
I have never used dbms_job before and need some advice on how to add a new job to run every 2 weeks.
I want to use dbms_job to analayse a schema at 10pm every 2 weeks. The sql is as follows :
EXECUTE SYS.DBMS_UTILITY.ANALYZE_SCHEMA('USERNAME','COMPUTE');
Can someone please supply syntax.
Thanks.
Once you have eliminated all of the impossible,
whatever remains however improbable,
must be true.
-
SQL*Plus:
Code:
var j number
begin
dbms_job.submit
(
:j,
'SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''USERNAME'',''COMPUTE'');',
trunc(sysdate)+22/24,
'trunc(sysdate)+22/24+14'
);
COMMIT;
end;
/
print j
Ales The whole difference between a little boy and an adult man is the price of toys
-
Sureshy i think dbms_stats is ok to use 8.0 up. Utility was for 73.
Tarry Singh
I'm a JOLE(JavaOracleLinuxEnthusiast)
--- Everything was meant to be---
-
Thanks foe your help ales.
Tarry, I will use dbms stats.
Thanks again
Once you have eliminated all of the impossible,
whatever remains however improbable,
must be true.
-
Hello Again,
can I set the next_date and interval parameters to specify a time using to_char ?
Once you have eliminated all of the impossible,
whatever remains however improbable,
must be true.
-
Please excuse my ignorance.
I have just read dbms_job documentation properly and realise that the code ales supplied does exactly what I want.
Once you have eliminated all of the impossible,
whatever remains however improbable,
must be true.
-
Originally posted by Sureshy
Please excuse my ignorance.
I have just read dbms_job documentation properly and realise that the code ales supplied does exactly what I want.
Yep it does have detailed documentation. BTB did you notice the difference between 'sysdate' and 'SYSDATE' used as in arguement for interval?????
-nagarjuna
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|