Don't see the sequence in all_sequences but dba_sequences, why?

I created a sequence with below sql on several environments:
CREATE SEQUENCE  IMSDBA.BLTR_BATCH_SQNCE  MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;
grant select  on IMSDBA.BLTR_BATCH_SQNCE to dmm_role;
but the strange thing is I can't line for the sequence of all_sequences, but only dba_sequences.
and what is happening on one of the environments. all other envs work as expected.
select * from ALL_sequences where sequence_owner='IMSDBA' and sequence_name='BLTR_BATCH_SQNCE';
select * from dba_sequences where sequence_owner='IMSDBA' and sequence_name='BLTR_BATCH_SQNCE';
Could someone tell me why?

You can post the results of

SELECT user
  FROM dual

and then the results of your query on ALL_SEQUENCES? A cut and paste from SQL * Plus would be ideal.

ALL_SEQUENCES (as object) shows you all of the sequences that you have obtained access to. not all the sequences in the database. One would expect that lots of objects appear in DBA_OBJECTS but not object because you do not have access to them. If you are really logged in as IMSDBA when you query object, however, you should be able to see all sequences because a user always has access to the objects it has the property of IMSDBA.

The fact that you cannot select the nextval in the sequence and the fact that it is not in ALL_SEQUENCES strongly implies you are not logged in as the owner of the object.

Justin

Tags: Database

Similar Questions

Maybe you are looking for