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

Reply via email to