Oracle: What permissions do I need to grant on a sequence?
Asked Answered
H

2

11

I have a new sequence in my database.

What permissions do I need to grant to my web user in order for the sequence to be used? I tried granting select on the sequence, but the web user still can't seem to see it.

Herndon answered 2/5, 2011 at 18:0 Comment(0)
F
15

I think "select" should be sufficient. Is your query correctly qualifying the schema that the sequence exists in?

select someschema.somesequence.nextval from dual;
File answered 2/5, 2011 at 18:5 Comment(4)
d'oh! Missing the someschema. Thanks.Herndon
Please consider using synonyms in the web user schema (create synonym somesequence for someschema.somesequence). It provides some decoupling from the sequence owner's schema name.Illustrious
You can only do a grant on a sequence with select or alter.Agenesis
What will be the grant query?Estuarine
A
-2
GRANT SELECT, ALTER ON SOMESCHEMA.SQ_SOMESEQUENCE TO OTHERSCHEMA WITH GRANT OPTION;
Asch answered 23/8, 2016 at 12:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.