• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 684
  • Last Modified:

dbms_job.isubmit syntax help

I exported this job from one machine and i'm trying to put onto another but getting an error saying i'm missing an ending quote somewhere.  Where is it?


SQL> BEGIN
  2  dbms_job.isubmit(job=>184,what=>'BEGIN
  3  DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>''BBADMIN'', cascade=>TRUE,
  4  method_opt=>''FOR ALL INDEXED COLUMNS SIZE AUTO'');
  5  END;
  6  BEGIN
  7  DBMS_STATS.GATHER_SCHEMA_STATS(ownname=> ''BB_BB60'', cascade=>TRUE,
  8  method_opt=>"FOR ALL INDEXED COLUMNS SIZE AUTO");');
  9  END;
 10  BEGIN
 11  DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>''BB_BB60_STATS'',
 12  cascade=>TRUE, method_opt=>''FOR ALL INDEXED COLUMNS SIZE AUTO'');
 13  END;
 14  ',next_date=>to_date('2012-08-26:02:00:00','YYYY-MM-DD:HH24:MI:SS
 15  '),interval=>'NEXT_DAY(TRUNC(SYSDATE), ''SUNDAY'')+2/24',no_parse=>TRUE);
 16  END;
 17  /
ERROR:
ORA-01756: quoted string not properly terminated
0
xoxomos
Asked:
xoxomos
  • 3
  • 2
1 Solution
 
lwadwellCommented:
extra quote and close ); of the gather stats on the end of line 8 above.
0
 
xoxomosAuthor Commented:
SQL> BEGIN
  2  DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>''BB_BB60'',
  3  cascade=>TRUE,
  4  method_opt=>''FOR ALL INDEXED COLUMNS SIZE
  5  AUTO'');
  6  END;
  7  BEGIN
  8  DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>''BB_BB60_STATS'',
  9  c
 10  ascade=>TRUE, method_opt=>''FOR ALL INDEXED COLUMNS SIZE
 11  AUTO'');
 12  END;
 13  ',next_date=>to_date('2012-09-16:02:00:00','YYYY-MM-DD:HH24:MI:SS'
 14  ),interval=>'NEXT_DAY(TRUNC(SYSDATE), ''SUNDAY'')+2/24',no_parse=>TRUE);
 15  /
ERROR:
ORA-01756: quoted string not properly terminated



My mistake.  Should not have posted that as it was a wild guess I was taking.
0
 
xoxomosAuthor Commented:
I'm using what dbms_job.export exports.


QL> set serveroutput on;
SQL>  declare callstr varchar2(5000);
  2        begin
  3       dbms_job.user_export(184, callstr);
  4        dbms_output.put_line(callstr);
  5       end;
  6       /
SQL> BEGIN
  2  DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>''BB_BB60'', cascade=>TRUE,
  3  method_opt=>''FOR ALL INDEXED COLUMNS SIZE
  4  AUTO'');
  5  END;
  6  BEGIN
  7  DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>''BB_BB60_STATS'',
  8  cascade=>TRUE, method_opt=>''FOR ALL INDEXED COLUMNS SIZE
  9  AUTO'');
 10  END;
 11  ',next_date=>to_date('2012-09-16:02:00:00','YYYY-MM-DD:HH24:MI:SS
 12  '),interval=>'NEXT_DAY(TRUNC(SYSDATE), ''SUNDAY'')+2/24',no_parse=>TRUE);
 13  /
ERROR:
ORA-01756: quoted string not properly terminated
0
 
lwadwellCommented:
Is the put_line line wrapping?  Try 'set linesize 1000' first on the export.
0
 
xoxomosAuthor Commented:
Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now