Questions tagged [sql-grant]

GRANT is a standard SQL command that authorizes a set of users to perform a set of operations on an object.

The basic structure of the REVOKE statement is:

GRANT <permissions-list> ON <object> TO <user-or-role-list>
    [WITH GRANT OPTION];

There are various options in standard SQL and most SQL DBMS provide their own extensions to what is specified by the standard.

711 questions
1
vote
7 answers

How to grant permissions to developers to grant permissions to users?

Is there a way I can give developers permission to grant a user permissions over objects without giving them the option to create users or functions? I'm trying to limit developers permissions, I recently found out that developers had db_owner…
Alan Featherston
  • 1,086
  • 3
  • 14
  • 27
1
vote
1 answer

Oracle grant execute to package doesn't work

I created package in schema CUST_DEV. In proc from my package I use proc from other package CUST_DS.CUST_CTL.proc(). When i recompile my package i received error: PLS-00201: CUST_DS.CUST_CTL.proc must be declared. I have given privileges grant…
1
vote
1 answer

DB owner can not grant select

I want to have an owner of a database that can create roles and do all administrative tasks for that db. All roles created by the db owner must have select on all tables in the public schema as well as having their own schemas in which they have all…
Clodoaldo Neto
  • 118,695
  • 26
  • 233
  • 260
1
vote
1 answer

DB2: GRANT statement & access rights

What rights should I give to DB user to execute REFRESH TABLE SOME_MQT; statement? Is it enough GRANT ALL ON SOME_MQT TO USER %USER_NAME ? DB2 version: 9.5.3
adrift
  • 637
  • 2
  • 10
  • 34
1
vote
1 answer

How to know if oracle GRANT command actually changed anything

Having run a grant command in an Oracle SQL script, is there any way to tell if it actually changed anything. Like an equivalent of SQL%ROWCOUNT or similar? I am writing an ansible module which will manage grants (using SQLPlus internally to run…
Adam
  • 6,539
  • 3
  • 39
  • 65
1
vote
1 answer

Postgres: How Can a Role Both Have INSERT Permissions and Not?

I have a table called resources and a user/role called public_anonymous ... and as far as I can tell, the user doesn't have INSERT permissions on that table. Here's DBeaver showing as much: And here's the output of \z resources (at the psql…
machineghost
  • 33,529
  • 30
  • 159
  • 234
1
vote
0 answers

Why creating a role in Oracle SQL with SELECT privileges doesn't work anymore?

I created a role and it worked. Then I dropped it, and when I try to recreate it it doesn't work anymore. I have to create a role, grant select to that role and grant that role to a user named user2, to check whether it is able to see the tables…
1
vote
0 answers

How to access granted media_projection thought root?

how can I use the root command to grant permission to "media projection" or to another: "screen capture/screenshot"? maybe it's some kind of "activity" you need to run? I tried to grant permissions, the root commands didn't help. Maybe I just…
007wan
  • 11
  • 2
1
vote
3 answers

MySQL grant ineffective?

Okay, I'm perplexed. I'm getting an "Access denied" error trying to do an update. There's a grant to allow that user to perform an update on that table, but it's being denied anyway. Yes, I've tried "flush properties". $ mysql -h DBHOST -u DBUSER…
Alan Krueger
  • 4,701
  • 4
  • 35
  • 48
1
vote
1 answer

How to prevent user from drop column in mysql 8

I have an existing user with all privileges on a specific database. The user was created like this: GRANT ALL PRIVILEGES ON test_db.* TO 'tester1'@'%%' However, I want to restrict this user from dropping any table and any column of the database. I…
lnthai2002
  • 154
  • 11
1
vote
1 answer

GRANTs in generated CREATE statement from pgAdmin

If I create the following sequence in Postgres: CREATE SEQUENCE test INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; GRANT ALL ON SEQUENCE test TO testuser; GRANT SELECT ON SEQUENCE test TO testuser2; And then select…
markus
  • 6,258
  • 13
  • 41
  • 68
1
vote
1 answer

how do I grant a new user the privilege to create a new database in MySQL

how do I grant a new user the privilege to create a new database in MySQL Specifically: the database does not exist yet I have successfuly created a new DB user account (that is not admin) I want that non-admin user to create a new database I do…
user10664542
  • 1,106
  • 1
  • 23
  • 43
1
vote
2 answers

Grant Create Sequence in PostgreSQL

Is it possible to grant a user/role only the permission to create/alter sequences in a PostgreSQL database/schema not allowing the user to create tables at the same time? I currently use GRANT CREATE ON SCHEMA myschema TO "MyRole"; which gives the…
1
vote
1 answer

PostgreSQL: How to GRANT permission to GRANT permission in specific SCHEMA

I have a sample database containing two schemas and I have two roles in the database. I need to grant rights in a way that role can grant all permission within schema #1 (nowhere else) role can grant all permission within schema #2 (nowhere…
1
vote
1 answer

How can i grant execute on a prepared statment to an user?

I have to execute a prepared statment in workbench, logining as an user who doesn't have privileges: EXECUTE PreparedStatmentName USING @a, @b; I have tried: GRANT EXECUTE ON PreparedStatmentName TO 'User'; But it is an "Illegal GRANT/REVOKE…
Achille
  • 25
  • 6