1

I'm getting "ORA-00990: missing or invalid privilege" on this kind of statement:

GRANT USAGE ON SEQUENCE SOME_SEQUENCE TO SOME_USER;

I've researched this all over the Internet and AFAICT, this syntax is absolutely correct, the name of the sequence is correct, the user is correct, and similar grants for table access work just fine, but I just can't grant access to the sequence. And if SOME_USER does try to call the sequence, I get the dreaded "ORA-00942: table or view does not exist".

Adding insult to injury is that this used to work, but the IT people recreated the database (no, I don't know what exactly they did, and they probably don't either) and now this is happening.

Anyone have any idea what I'm doing wrong?

Answer: @Gary pointed me in the right direction; the actual syntax is:

 GRANT SELECT ON SOME_SEQUENCE TO SOME_USER;

Curiously, I had already tried:

 GRANT SELECT ON SEQUENCE SOME_SEQUENCE TO SOME_USER;

and got the error "ORA-00905: missing keyword", which is a curious message when the problem is an extra keyword.

1 Answer 1

2

The Oracle documentation doesn't show the existence of a 'USAGE' privilege. I've never used anything other than a SELECT privilege on a sequence.

That syntax does show up for Postgres/DB2

1
  • Thanks! I also updated my question with the correct syntax in full. Jan 4, 2012 at 13:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .