Are we forgetting that your current schema is SCOTT ??
 
comment that line, and then try running the procedure ...
 
Raj
--------------------------------------------------------------------------------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !
-----Original Message-----
From: Ranganath K [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 11:31 AM
To: Multiple recipients of list ORACLE-L
Subject: Bug in Execute Immediate clause???

Hi Listers,

 

The below procedure gets created successfully in TEST Schema.  But when I execute the procedure by starting a fresh session connecting as TEST schema I get the below error and when I execute the procedure for the second time it executes successfully.  I have granted the dba privileges and explicit granted select on TEMP1 to TEST Schema.  Inspite of that I am getting the below errors.  I tried this 8.1.7 and 9.2.1.0.  Is it a bug in the code or the database? 

 

CREATE OR REPLACE procedure test authid current_user is

c number;

n number;

a varchar2(1000);

Begin

Execute Immediate 'Alter Session Set Current_Schema = SCOTT';

Dbms_output.put_line(sys_context('userenv', 'Current_schema'));

Select count(*) into c From temp1;

Dbms_output.put_line(c);

End;

 

ERROR at line 1:

ORA-00942: table or view does not exist

ORA-06512: at "TEST.TEST", line 9

ORA-06512: at line 1

 

Can anybody help me out?  Any help in this regard is very much appreciated.

 

Thanks and Regards,

 

Ranganath

********************************************************************This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*********************************************************************2

Reply via email to