?
Solved

dbms_job syntax

Posted on 2007-08-02
5
Medium Priority
?
1,103 Views
Last Modified: 2013-12-07
Still can't get this syntax right.  Anybody know what i'm doing wrong here.

SQL> exec dbms_job.what(188, 'dbms_stats.gather_schema_stats(ownname=>' 'CMS_FILES_ORGS' ',cascade=>TRUE,method_opt=>' 'FOR ALL INDEXEC COLUMNS SIZE AUTO' ');');
BEGIN dbms_job.what(188, 'dbms_stats.gather_schema_stats(ownname=>' 'CMS_FILES_ORGS' ',cascade=>TRUE,method_opt=>' 'FOR ALL INDEXEC COLUMNS SIZE AUTO' ');'); END;

                                                                    *
ERROR at line 1:
ORA-06550: line 1, column 69:
PLS-00103: Encountered the symbol "CMS_FILES_ORGS" when expecting one of the
following:
) , * & | = - + < / > at in is mod remainder not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
0
Comment
Question by:xoxomos
  • 3
  • 2
5 Comments
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 19619659
Get rid of the space between the 2 single quotes.  In Oracle they have to be side by side.
0
 

Author Comment

by:xoxomos
ID: 19619693

SQL> dbms_job.what(188, 'DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>''CMS_FILES_ORGS'',
SP2-0734: unknown command beginning "dbms_job.w..." - rest of line ignored.
SQL>    cascade=>TRUE, method_opt=>''FOR ALL INDEXED COLUMNS SIZE AUTO'');');
SP2-0734: unknown command beginning "cascade=>T..." - rest of line ignored.
SQL>
0
 

Author Comment

by:xoxomos
ID: 19619742
FINALLY!!!!!!!!!!
Thanx
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 19619826
No problem

Looks like you already figured out the SP2-0734.  Just to follow up, if you want to break up the line add a hyphen '-' to the end of the line.  This is the line continuation for SQL*Plus

Note: the space in front of the hypehn is important.
ie./
---------------------------
exec dbms_job.what(188, 'dbms_stats.gather_schema_stats(
ownname=>''CMS_FILES_ORGS'', -
cascade=>TRUE,method_opt=>''FOR ALL INDEXEC COLUMNS SIZE AUTO'');'
);

0
 

Author Comment

by:xoxomos
ID: 19619838
Thanx again!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses
Course of the Month13 days, 18 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question