Questions tagged [sql-revoke]

REVOKE is a standard SQL command to revoke privileges from a user or role in a database system.

The basic structure of the REVOKE statement is:

REVOKE <permission> ON <object> FROM <user-or-role>;

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

28 questions
36
votes
4 answers

revoke vs deny : what is the difference

What is the difference between the DENY and REVOKE commands in SQL Server?
ceth
  • 44,198
  • 62
  • 180
  • 289
6
votes
1 answer

Why role cannot be dropped because some objects depend on it

Database "mydb" is owned by role "mydb_owner". User "currentuser" tries to delete role "roletodelete" from this database using revoke all on all tables in schema public,firma1 from "roletodelete" cascade; revoke all on all sequences in schema…
Andrus
  • 26,339
  • 60
  • 204
  • 378
6
votes
2 answers

How to revoke all privileges for a user in sqlplus?

How do I revoke all privileges for a user in SQLPlus? I'm logged in as sysdba and I would like to revoke all privileges for a regular user. I googled this query REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ... but I don't understand what…
R_sol
  • 67
  • 1
  • 1
  • 7
5
votes
1 answer

Cannot drop a role that is granted to connect database

I am using PostgreSQL 10.4 and I found a strange behavior. If we create an role and grant it to CONNECT the database: CREATE ROLE dummy; GRANT CONNECT ON DATABASE test TO dummy; Then we cannot drop this role, even if it owns no object at all, this…
jlandercy
  • 7,183
  • 1
  • 39
  • 57
2
votes
2 answers

PostgreSQL Revoke All Permissions from All Users and Roles

I have several tables in Postgres 9.2.23 that I need to update privileges on regularly (daily or multiple times per day). I have a master list maintained elsewhere of who can select that I use to grant privileges. However, I want to make sure that…
user7969724
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
1 answer

Mysql revoking permisions

I was making a SQL file on MySQL as part of a school asignement and I think I got everyting right but a part where it specifies my to create an user an then revoke all permission from him All sources I have found use something like CREATE USER IF…
1
vote
1 answer

Revoke Delete privilege (There is no such grant defined for user)

I am trying to revoke the Delete on mysql user I used this code REVOKE DELETE ON *.* FROM 'sample_user'@'%'; But this returns me something like this Error Code: 1141. There is no such grant defined for user Is it possible to revoke it?…
Pablo
  • 1,357
  • 1
  • 11
  • 40
1
vote
0 answers

How to revoke column privileges

I want to revoke all column privileges. SELECT * FROM information_schema.column_privileges where grantee='PUBLIC' and privilege_type='UPDATE'; I want to return empty of above sql. I tried to revoke all table and database from postgres and public…
drojokef
  • 425
  • 1
  • 5
  • 15
1
vote
0 answers

Remove the specific user group to execute all stored procedures on the specific database

I would like to have one script to remove the specific user group to execute all stored procedures on the specific database in SQL Server 2014. I searched the web and found the example at Grant Revoke Permissions On Stored Procedures in SQL Server.…
user819774
  • 1,456
  • 1
  • 19
  • 48
0
votes
1 answer

Revoke in Redshift not removing access to schema

I am trying to remove a user's permissions to multiple schemas to which they had previously been granted access via security groups. However, using the revoke command is not working to do that. User, KYKE, had been granted access to a number of…
LKW
  • 1
0
votes
0 answers

Can I revoke specific privilege from user that take it by grant role?

DBA can create roles with list of privileges then grant it to specific user. My question is Can I grant a role to user then revoke only specific privilege from user? As example: Here created role: CREATE role MANAGER; COMMIT; GRANT select, insert,…
0
votes
1 answer

How to revoke administrator functions for specific user while create postgres user

I want to revoke the administrator or executive functions to a specific user in Postgres in user creation in java. for example, let's have a user with read-only privileges "readonlyuser" and I don't want him to execute these functions. So I tried…
Sakthis
  • 5
  • 3
0
votes
3 answers

Creating an append-only table in Postgres using revoke on all roles and granting insert to all roles

I would like to create an enforced append only table in my postgres db. After a bit of research, I realized that a solution that will answer my requirements will be to revoke ALL operations on that table from ALL roles and then run an insert…
NotSoShabby
  • 3,316
  • 9
  • 32
  • 56
0
votes
1 answer

Revoke grant with dblink in Postgres

I start to use dblink on my postgreSQL 11 db and I have a problem with grant. I can create server and user mapping as superuser , but also I can delete this user mapping and server as usual user. I try to revoke grant from usual user by revoke grant…
yuoggy
  • 97
  • 1
  • 10
1
2