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

Re: DBMS_SQL

From: Klaus Zeuch <KZeuchnospam_at_hotmail.com>
Date: 2000/07/13
Message-ID: <8kjsrv$ok4$1@papyrus.erlm.siemens.de>#1/1

Oracle 8.1.6? Forget dbms_sql for this statement, just code

execute immediate 'create user ......'; or

declare

   v_stmt varchar2(2000);
begin
  v_stmt := 'create user ' || parameter || '.....';   execute immediate v_stmt;
...

Klaus

Tao Zhang <Tao.Zhang_at_digital-dispatch.com> schrieb in im Newsbeitrag: smq0ku6gnd6145_at_corp.supernews.com...
> Hi everybody,
>
> I was trying to use DBMS_SQL to create user and I got this error message:
> ORA-01935: missing user or role name
> This is what I got when debugging to PARSE statment (Oracle 8.1.6 on NT ).
>
> v_passwd := '3';
> v_user :='FF1';
> v_cursor_id := DBMS_SQL.OPEN_CURSOR;
> v_stmt := 'create user :u identified by :p default tablespace
> USR temporary tablespace TEMPORARY;';
>
> DBMS_SQL.PARSE(v_cursor_id,v_stmt,DBMS_SQL.NATIVE);
> DBMS_SQL.BIND_VARIABLE(v_cursor_id,':u',v_user);
> DBMS_SQL.BIND_VARIABLE(v_cursor_id,':p',v_passwd);
> v_dummy := DBMS_SQL.EXECUTE(v_cursor_id);
> DBMS_SQL.CLOSE_CURSOR(v_cursor_id);
>
> Thanks!
> James
>
>
>
Received on Thu Jul 13 2000 - 00:00:00 CDT

Original text of this message

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