Re: Help: dynamic sql

From: Dennis <dennis_at_bearclaws.com>
Date: 1998/10/24
Message-ID: <3633d211.0_at_news.primary.net>#1/1


need to
grant execute on dbms_sql to ...user;

Gocha Mchedlishvili wrote in message <70m7ds$728$1_at_bandit.cyberwar.com>...
>Try to run this
>
>DECLARE
> iCr INTEGER;
>BEGIN
> iCr:=DBMS_SQL.OPEN_CURSOR;
> DBMS_SQL.PARSE(iCr,'create table t1(f1 integer)',DBMS.NATIVE);
> DBMS_SQL.CLOSE_CURSOR(iCr);
>END;
>
>badstreetboy_at_my-dejanews.com wrote in message
><70godi$rn5$1_at_nnrp1.dejanews.com>...
>>I was trying to use dynamic sql package 'dbms_sql' to execute DDL
 statements
>>within PL/SQL. After I run the 2 startup packages(dbmssql.sql,
 prvtsql.plb)
>>as user 'SYS', I am only able to run the dbms_sql package as 'SYS'. When
 I
>>connect to another user to use dbms_sql package, I got an error.
>>
>>SQL> execute exec('create table t1(f1 integer)');
>>
>>ERROR at line 1:
>>ORA-04068: existing state of packages has been discarded
>>ORA-04063: package body "ANOTHER_USER.DBMS_SQL" has errors
>>ORA-06508: PL/SQL: could not find program unit being called
>>ORA-06512: at "ANOTHER_USER.EXEC", line 5
>>ORA-06512: at line 1
>>
>>Please help. Thanks!!
>>
>>-----------== Posted via Deja News, The Discussion Network ==----------
>>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
>
Received on Sat Oct 24 1998 - 00:00:00 CEST

Original text of this message