Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> why 922 error?

why 922 error?

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Sun, 25 Jul 1999 23:04:40 -0700
Message-ID: <379BFA78.6E42388C@rationalconcepts.com>


Ok gang, need some help in figuring out what's going on... I've create a stored procedure via the following script.

CREATE OR REPLACE PROCEDURE makeauser (who VARCHAR2) AS

   v_Cursor       integer  default dbms_sql.open_cursor;
   v_s            dbms_sql.VARCHAR2S;

 BEGIN
   v_s(1) := 'CREATE USER ' || who;
   v_s(2) := '    IDENTIFIED BY test' || who;
   v_s(3) := '    DEFAULT TABLESPACE MYUSERS ';
   v_s(4) := '    TEMPORARY TABLESPACE  MYTEMP ';
   v_s(5) := '    QUOTA UNLIMITED ON MYUSERS ';
   v_s(6) := '    QUOTA UNLIMITED ON MYTEMP ';
   v_s(7) := '    QUOTA UNLIMITED ON MYTBS ';
   v_s(8) := '    QUOTA 5M ON SYSTEM ';


   DBMS_SQL.PARSE(v_Cursor, v_s, 1, 8, TRUE, DBMS_SQL.NATIVE);

   v_s(1) := ' GRANT CODE TO ' || who;

   DBMS_SQL.PARSE(v_Cursor, v_s, 1, 1, TRUE, DBMS_SQL.NATIVE);

 EXCEPTION
   WHEN OTHERS THEN

     if (dbms_sql.is_open(v_Cursor)) then
        DBMS_SQL.CLOSE_CURSOR(v_Cursor);
     end if;
     DBMS_OUTPUT.PUT_LINE(SQLERRM);
     raise;

 END makeauser;
/

GRANT EXECUTE ON makeauser TO PUBLIC;

COMMIT; Tablespaces exist and code role exists. So here's the problem. The script runs just fine in sqlplus. When I connect through jdbc, the script throws a 922 error, missing or invalid option.
So, what's going on here?

Any help would be greatly appreciated.
Thanks in advance,
Cindy

P.S. Oracle 8.0.4 on Solaris 2.6 and winNT4.0 Received on Mon Jul 26 1999 - 01:04:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US