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 -> Re: why 922 error?

Re: why 922 error?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 26 Jul 1999 12:53:30 GMT
Message-ID: <379d5a23.3291963@newshost.us.oracle.com>


A copy of this was sent to "C. Ferguson" <c_ferguson_at_rationalconcepts.com> (if that email address didn't require changing) On Sun, 25 Jul 1999 23:04:40 -0700, you wrote:

>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.

You say "the script thows a 922 error". JDBC doesn't do 'scripts'. How exactly are you submitting this via jdbc?

>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
>
>

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Jul 26 1999 - 07:53:30 CDT

Original text of this message

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