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
16
votes
1 answer

Query GRANTS granted to a sequence in postgres

To query GRANTS granted to a table I can use a query like: SELECT grantee, privilege_type FROM information_schema.role_table_grants WHERE table_name='mytable' (see my old question here: Query grants for a table in postgres) But how I query the…
markus
  • 6,258
  • 13
  • 41
  • 68
16
votes
3 answers

Content provider grant uri permission

I searched and read android developer files but I did not find any satisfactory answer for content provider grant uri permission. Can anybody explain more detailed and more simple. My questions are: What grant uri is using for? What is the…
Android
  • 161
  • 1
  • 1
  • 3
15
votes
1 answer

How to assign table ownership to multiple users or group in Redshift

I was wondering if there is a way how to assign table owner to a group or to multiple users in Redshift? If not, is there any workaround you use to solve this need? Thanks for any tips.
Jakub Dvorak
  • 163
  • 1
  • 1
  • 5
15
votes
2 answers

How to check if permission is granted by user at runtime on Android?

I have created a simple android activity that acts as a dial. It has an edit text for the phone number and a call button Here is the code : (android 6.0 marshmallow) public class Main2Activity extends AppCompatActivity { EditText num; Button…
Amine Messaoudi
  • 2,141
  • 2
  • 20
  • 37
14
votes
3 answers

Correct way to give users access to additional schemas in Oracle

I have two users Bob and Alice in Oracle, both created by running the following commands as sysdba from sqlplus: create user $blah identified by $password; grant resource, connect, create view to $blah; I want Bob to have complete access to…
Jacob
  • 1,671
  • 4
  • 23
  • 26
12
votes
4 answers

Granted all privileges on my PostGres table, but still am getting a "Permission denied" error when attempting to insert/select

I'm using PostGres 9.5. I'm having trouble inserting data into a table I just created. I'm getting "permission denied" errors despite granting all privileges to the database user. See below ... localhost:myapp davea$ psql -Upostgres Password for…
Dave
  • 15,639
  • 133
  • 442
  • 830
12
votes
5 answers

Granting Rights on Stored Procedure to another user of Oracle

I am a student of Undergraduate studies , and I am facing little problem in granting rights of ownership to a user A to a stored procedure being owned by user B in database Oracle 10g mode =xe. Please help me in writing sql commands for granting…
Basmah
  • 829
  • 3
  • 13
  • 25
11
votes
1 answer

Combining row level security with column grants

Let's say I have a users table with three columns, public_data, private_data, and system_data, and I have three roles named postgres, authenticated_user, and visitor. postgres is superuser and can access all data (including system_data of…
11
votes
1 answer

SQL Grant on - for multiple users

i was curious if there was a way to grant multiple users simultaneously rights Example: I want to give certain rights to multiple people that start with the letter AAR. Usual grant on : GRANT SELECT ON Abteilung TO Herr_Mueller How it goes for…
Roman
  • 113
  • 1
  • 1
  • 6
11
votes
2 answers

Grant on multiple databases. MySQL

How to grant on multiple databases? MySQL. Something like GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON 'databasesprefix%'.* TO testuser@localhost IDENTIFIED BY 'testpasswd';
shurik2533
  • 1,770
  • 4
  • 22
  • 41
11
votes
2 answers

How do I correctly set ownership and privileges in MariaDB (MySQL)?

I'm trying to setup a database schema on MariaDB which originally comes from PostgreSQL. What is the correct syntax in MariaDB for: ALTER DATABASE mydbname OWNER TO someuser and similar for granting privileges: GRANT ALL PRIVILEGES ON DATABASE…
Jemolah
  • 1,962
  • 3
  • 24
  • 41
11
votes
5 answers

PostgreSQL 8.4 grant DML privileges on all tables to a role

How do I go about granting DML (SELECT,INSERT,UPDATE,DELETE) on all tables in a schema in PostgreSQL 8.4? I'd also like this grant to persist for new table creation in the future as well. I've seen solutions for 9.0 but I'm stuck with 8.4 as it…
pointyhat
  • 167
  • 1
  • 1
  • 10
10
votes
2 answers

Postgres: Permission denied for schema even though grants were given

I am running Postgres 10.4 and am currently baffled since I can't seem to grant access to a schema to another role. What I want to do: I have one role with one schema and want to access the schema and its tables from another role. So I did the usual…
kidman01
  • 835
  • 5
  • 17
  • 32
9
votes
1 answer

create synonym ora-01031 insufficient privileges

I need help understanding what grants/privileges a user needs to CREATE a SYNONYM when it points to another (different) schema object. When I try the below, I get ora-01031 insufficient privileges, so obviously I am missing and failing to apply…
BBALEY
  • 183
  • 2
  • 2
  • 7
9
votes
2 answers

How to grant execute on specific stored procedure to user

I have created some stored procedure on a specific schema. In this stored procedure, I want to grant execute privilege. So I wrote that : GRANT EXECUTE ON PROCEDURE schema_name.proc_name TO 'user_name'; GRANT SELECT ON mysql.proc to…
TriGerZ
  • 91
  • 1
  • 1
  • 2
1 2
3
47 48