Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: create view using DBMS.SQL
Is the create view privilege granted to the procedure owner?
-----Original Message-----
Sent: Thursday, January 02, 2003 10:30 AM
To: Multiple recipients of list ORACLE-L
Dear All,
I can CREATE and EXECUTE others procedures however can not execute procedure
with DBMS_SQL. I'm created procedure has parameters to create a view using DBMS_SQL. Oracle gave me an error insufficent privileges. Can give some hints how make it works or any example.
TIA
Truong.
SQL> exec proc_refresh_view('010-03');
BEGIN proc_refresh_view('010-03'); END;
*
ERROR at line 1:
ORA-01031: insufficient privileges ORA-06512: at "SYS.DBMS_SYS_SQL", line 826 ORA-06512: at "SYS.DBMS_SQL", line 32 ORA-06512: at "AISDB.PROC_REFRESH_VIEW", line 17 ORA-06512: at line 1 CREATE OR REPLACE PROCEDURE PROC_REFRESH_VIEW(pfileno IN VARCHAR2 DEFAULT NULL, pfilename IN VARCHAR2 DEFAULT NULL, pfileyear IN NUMBER DEFAULT NULL, precordtype IN VARCHAR2 DEFAULT NULL)IS
cursor_name INTEGER; cursor_id INTEGER;
BEGIN
cursor_name := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cursor_name,'CREATE OR REPLACE VIEW V_FILTER AS '
||'SELECT * FROM TBL_FILE_DEFINITIONS ' ||'WHERE FILE_NUMBER_TX = '||''''||NVL(pfileno,'DUMMY')||'''' ||' OR FILE_NAME_TX = '||''''||NVL(pfilename,'DUMMY')||'''' ||' OR FILE_YEAR_NR = '||NVL(pfileyear,1800) ||' OR REC_TYPE_TX = '||''''||NVL(precordtype,'DUMMY') ||'''',DBMS_SQL.NATIVE);
cursor_id := DBMS_SQL.EXECUTE(cursor_name); DBMS_SQL.CLOSE_CURSOR(cursor_name);
END;
/
SHOW ERROR
SQL>Procedure created.
SQL>No errors.
SQL> exec proc_refresh_view('010-03');
BEGIN proc_refresh_view('010-03'); END;
*
ERROR at line 1:
ORA-01031: insufficient privileges ORA-06512: at "SYS.DBMS_SYS_SQL", line 826 ORA-06512: at "SYS.DBMS_SQL", line 32 ORA-06512: at "AISDB.PROC_REFRESH_VIEW", line 17 ORA-06512: at line 1 _________________________________________________________________MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Donate Clothes
INET: truongbatgioi_at_hotmail.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Koivu, Lisa
INET: Lisa.Koivu_at_efairfield.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jan 02 2003 - 10:45:47 CST
![]() |
![]() |