Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> DBMS_SQL (NO PRIVILIGES TO CREATE TABLES)
It seems i miss some privileges to create tables with the dbms_sql package:
id1 varchar2(30);
Any answers/comments welcome
c1 integer;
nom varchar2(30);
nb_snp number;
serial2 number;
cursor c2 is select name from dba_snapshots
where owner=3D'SCOTT'
AND NAME <> 'TEST';
return1 integer;
begin
open c2;
loop
fetch c2 into nom;
exit when c2%notfound;
dbms_output.put_line('CREATE TABLE SCOTT.' || nom || ' ('||NOM|| ' NUMBER)'); c1:=3Ddbms_sql.open_cursor;
dbms_sql.parse(c1,'CREATE TABLE SCOTT.' || nom || ' ('||NOM|| ' NUMBER)',dbms_sql.v7);
return1 :=3D dbms_sql.execute(c1);
dbms_output.put_line('RESULTAT: '||RETURN1);
dbms_sql.close_cursor(c1);
end loop;
dbms_output.put_line(SYSDATE);
dbms_output.NEW_line;
end;
execute scott.tgr_select
execute scott.tgr_select
ORA-01031: privil=E8ges insuffisants
ORA-06512: =E0 "SYS.DBMS_SYS_SQL", ligne 239
ORA-06512: =E0 "SYS.DBMS_SQL", ligne 25
ORA-06512: =E0 "SCOTT.TGR_SELECT", ligne 24
ORA-06512: =E0 ligne 2
CREATE TABLE SCOTT.TEST1XX (TEST1 NUMBER) Received on Tue Dec 02 1997 - 00:00:00 CST
![]() |
![]() |