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
0 answers

How to create a daemon app running with Oauth 2.0 Password grant?

I'm fairly new to working with Oauth 2.0, and the place I'm interning asked me to create an app that is runnable from the console and uses the OAuth 2.0 Password grant. I'm really stumped as to where to start in general. I'd like to write it in…
FrkKryds
  • 38
  • 6
1
vote
1 answer

Is there a way to give a user access to different columns on different rows of a table in PostgreSQL?

Is there a way to give a PostgreSQL user access to a different columns on different rows of a table? For example in the following table, is there some combination of GRANT or POLICY or ??? that would only allow the user to view the "allowed"…
Roy Paterson
  • 863
  • 9
  • 17
1
vote
0 answers

How to grant authority of insert with default values in Postgres?

Postgres can insert with default values: INSERT INTO users DEFAULT VALUES; But can't grant authority. ☓ GRANT INSERT () ON users TO authenticated_user; ☓ GRANT INSERT DEFAULT VALUES ON users TO authenticated_user;
iwatachan
  • 159
  • 2
  • 8
1
vote
1 answer

SQL Server revoking select

Let's suppose a user, "Bob", gets SELECT privilege from John and Bob also gets SELECT privilege from another user Joe but this time with GRANT option. What happens if someone revokes the select privilege with cascade? Will the select privilege be…
pi012
  • 13
  • 2
1
vote
0 answers

Unable to GRANT SELECT on user in MySQL

I initially posted a question regarding why I was given a syntax error message here. I then created the user usermail with (I admit I misused IDENTIFIED BY but I don't think it matters in this case: mysql> CREATE USER 'usermail'@'127.0.0.1'…
sangstar
  • 81
  • 1
  • 3
1
vote
1 answer

what privilege is needed for a user to create table in another schema

I have a user rafal and I want to create a table in another schema. I do it like this: grant usage on schema tony to rafal, but when I try to create a table, I still get errors: create table tony.t1(a int); ERROR: permission denied for schema…
tonyibm
  • 581
  • 2
  • 8
  • 24
1
vote
0 answers

table granted to role holding another role but table does not found when selecting

I have a problem with the following situation in Oracle DBMS. I have a students table STUDENT in MAIN schema, 1 user USER_ADMIN and 2 roles ROLE_RW and ROLE_RW_ANY. GRANT SELECT, INSERT, UPDATE, DELETE ON MAIN.STUDENT TO ROLE_RW; GRANT ROLE_RW TO…
Mino
  • 21
  • 2
1
vote
1 answer

Grant create any table to xxx in oracle

I am triyng to run this script on schema 1: GRANT CREATE ANY TABLE TO schema2; GRANT INSERT ANY TABLE TO schema2; but I get this error : GRANT CREATE ANY TABLE TO schema2 Error at line 1 ORA-01031: Nicht ausreichende Berechtigungen what should I…
mona shiri
  • 57
  • 8
1
vote
2 answers

How to grant a user SELECT on a restricting view in Firebird

I need to restrict SELECT access to a table in Firebird 3.0, so that not all columns can be read by the user. This FAQ entry suggests to create a view with the restricted columns and then grant SELECT only on this view. However if I do that and…
dsungaro
  • 148
  • 1
  • 11
1
vote
2 answers

Mysql / Mariadb user grant to multiple database

Would like to grant permission to a user on multiple databases in single command. I am getting syntax error when I try grant all on abc.*, xyz.* TO 'user'@'10.10.0.10'; Please guide. Thanks.
Joel Divekar
  • 187
  • 1
  • 4
  • 19
1
vote
1 answer

Postgresql CREATE GRANT - Limit Access to other Databases on Server?

I have 2 Postgresql databases, called abc and xyz. I want to create a user for each to be used in a website, so I've created a user with a command like: CREATE ROLE abc LOGIN PASSWORD 'abc'; I then did this to give them permission to the…
Andrew T
  • 367
  • 2
  • 14
1
vote
2 answers

Snowflake Data Sharing - Grant partially executed | Grant not executed

Aim: Grant more privileges to the Data Share Description: Please note that I'm using a 30 days trial version of Snowflake. I've tried creating the Data Share via UI, but despite being able to Add a Consumer under the Full Account section, the user…
1
vote
1 answer

MYSQL v8 Privileges

MySQL v8 command line and with phpmyadmin I am logged into mysql as root (FULL Privileges) and I am trying to assign ALL privileges on a specific database to a user. It gives them all privileges but DOES NOT allow Administration GRANT on the…
Patdundee
  • 161
  • 2
  • 10
1
vote
1 answer

Permission uncertainty in Greenplum

I am using Greenplum 6.8(Postgres 9.4) open source, I created role that have all permission on a schema, after assigning that role to user I added a new table in schema but user is not able to access that table. I have to refresh my role definition…
1
vote
1 answer

What kind of operations makes oracle to lose a grant?

I know that drop an object can cause to destroy a grant. But what else can cause to lose a grant over an object? Am asking that since I have to write some guidelines for the revs DB at work, I'd like to creae a list of operation where is necessary…
Dockinoke
  • 11
  • 1
  • 3