Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 291
chris Avatar asked May 02 '11 18:05

chris


People also ask

Which privileges can be granted on a sequence?

The following privileges are valid for sequences: SELECT: Execute functions CURRVAL and NEXTVAL on the specified sequences. ALTER: Modify a sequence's DDL with ALTER SEQUENCE. DROP: Drop this sequence with DROP SEQUENCE .

How do you give a sequence Grant?

GRANT CREATE ANY SEQUENCE, ALTER ANY SEQUENCE, DROP ANY SEQUENCE, SELECT ANY SEQUENCE TO my_user; The owner of a sequence has full privileges on the sequence. Another user can be given access to the sequence by granting the SELECT object privilege.

What privilege is required to run a procedure in Oracle?

You need the CREATE PROCEDURE privilege to create a procedure, function, package definition, or package body if it is being created in your own schema, or CREATE ANY PROCEDURE if it is being created in any schema other than your own.


1 Answers

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

select someschema.somesequence.nextval from dual;
like image 185
Chris Farmer Avatar answered Sep 28 '22 18:09

Chris Farmer