RE: dbms_stats via dbms_job - syntax question

2003-06-11 Thread Hallas, John, Tech Dev
Thanks for the try Igor but that doesn't work either ERROR at line 1: ORA-06550: line 2, column 24: PLS-00201: identifier 'CASCADE' must be declared ORA-06550: line 1, column 99: Wolfgang's suggestion doesn't work and I have tried every permutation of quotes (including none at all) around the

RE: dbms_stats via dbms_job - syntax question SOLVED

2003-06-11 Thread Hallas, John, Tech Dev
Thanks for all the help. The problem was not with my coding but the syntax. In my worked example I had CASCADE=TRUE whereas it should have been CASCADE=TRUE. A subtle difference but one that caused me (and fellow listers) no end of hassle. So all the answers that I said were incorrect were

RE: dbms_stats via dbms_job - syntax question

2003-06-11 Thread Igor Neyman
John, My code doesn't work probably because CASCADE = TRUE should actually be: CASCADE = TRUE. So, this should work: declare l_job number; begin dbms_job.submit (l_job,'begin dbms_stats.gather_schema_stats(ownname =' || CHR(39) || 'RPT_2G_MASTER' || CHR(39) || ', estimate_percent = 10,

RE: dbms_stats via dbms_job - syntax question SOLVED

2003-06-11 Thread Igor Neyman
But one thing I proved was that you can mix and match positional and naming parameters Hmm, I'd still rather use one OR another: you never know if mixing them would work in the next version... Why trying your luck?-:) Igor Neyman, OCP DBA [EMAIL PROTECTED] -Original Message- Hallas,

RE: dbms_stats via dbms_job - syntax question SOLVED

2003-06-11 Thread DENNIS WILLIAMS
John Then be sure to set the init.ora parameter _do_what_I_mean=true It solved most of my problems. Dennis Williams DBA, 80%OCP, 100% DBA Lifetouch, Inc. [EMAIL PROTECTED] -Original Message- Sent: Wednesday, June 11, 2003 4:35 AM To: Multiple recipients of list ORACLE-L

dbms_stats via dbms_job - syntax question

2003-06-10 Thread Hallas, John, Tech Dev
Listers, Looking for a bit of help with the syntax to submit a dbms_stats run via dbms_jobs The following syntax works fine to run the procedure interactively execute dbms_stats.gather_schema_stats(ownname='RPT_3G_MASTER',estimate_percent=10,cascade=true); but trying to get that into an

RE: dbms_stats via dbms_job - syntax question

2003-06-10 Thread Jamadagni, Rajendra
Title: RE: dbms_stats via dbms_job - syntax question you don't need quotes around cascade=true ... Raj Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD

RE: dbms_stats via dbms_job - syntax question

2003-06-10 Thread Mercadante, Thomas F
John, I think the easiest way to do this is to create a stored procedure that calls dbms_stats for you. you could then simply run your stored procedure from dbms_jobs. create or replace procedure run_stats is begin dbms_stats.gather_schema_stats(ownname='RPT_3G_MASTER',estimate_percent=10

RE: dbms_stats via dbms_job - syntax question

2003-06-10 Thread Igor Neyman
This should work: declare l_job number; begin dbms_job.submit (l_job,'begin dbms_stats.gather_schema_stats(ownname =' || CHR(39) || 'RPT_2G_MASTER' || CHR(39) || ', estimate_percent = 10, block_sample = FALSE, CASCADE = TRUE); end;', trunc(sysdate+1)+01/24,'sysdate+7'); end; / When passing

Re: dbms_stats via dbms_job - syntax question

2003-06-10 Thread Wolfgang Breitling
Why not submit it exactly the same as you do it interactively: declare l_job number; begin dbms_job.submit (l_job,'dbms_stats.gather_schema_stats(ownname=''RPT_3G_MASTER'',estimate_percent=10,cascade=true);', trunc(sysdate+1)+01/24,'sysdate+7'); end; / All you need to do is replace the single