Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Sequence exists but not accessible from script

Sequence exists but not accessible from script

From: David McNelis <dmcnelis_at_gmail.com>
Date: 25 Jan 2007 08:31:57 -0800
Message-ID: <1169742717.120647.129490@j27g2000cwj.googlegroups.com>


Good morning,

I'm hoping someone can help me out with a problem I'm having. I've created a sequence, and the public synonym for the sequence.

In a PL/SQL script I have the following line:

SELECT sequencename.nextval into l_seqNum FROM dual;

When the script runs I get the following: ERROR at line 47:
ORA-06550: line 47, column 11:
PL/SQL: ORA-02289: sequence does not exist ORA-06550: line 47, column 4:
PL/SQL: SQL Statement ignored

However, when I run the same statement from the SQL prompt outside of the script it works fine:
SELECT sequencename.nextval FROM dual;

Is there any reason why the sequence would be accessible outside of my script, but not inside? I'm running the script as the same user I run the working statement from.

Any help is appreciated.

David McNelis Received on Thu Jan 25 2007 - 10:31:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US