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
3
votes
6 answers

Oracle database role - select from table across schemas without schema identifier

Which Oracle database role will allow a user to select from a table in another schema without specifying the schema identifier? i.e., as user A- Grant select on A.table to user B; B can then- "Select * from table" without specifying the 'A'. One…
emo
3
votes
1 answer

Grant Privileges to an user (remotely root logged) in MySQL

I have this: mysql> SELECT CURRENT_USER(); +----------------+ | CURRENT_USER() | +----------------+ | root@% | +----------------+ 1 row in set (0.00 sec) mysql> SELECT USER(); +------------------+ | USER() | +------------------+ |…
user2730587
3
votes
3 answers

ERROR 1045 (28000): Access denied for user 'username'@'%' (using password: YES)

I Installed MySQL on my CentOS 6.4 server. I logged into my root and changed its password. Later I thought that I should make a new user and use that user as my default user, So I created a new user name golden using the following command: CREATE…
Django Anonymous
  • 2,987
  • 16
  • 58
  • 106
3
votes
3 answers

how to grant update or select on some specified row in postgresql table?

I want to create some roles in my Postgresql DB and grant some access. I have student role and i want to grant this user type : can edit only record a bout him/her in student table and can not edit other rows how can i do it? thanks
happy Sun
  • 579
  • 8
  • 15
3
votes
1 answer

GRANT permissions to wildcard database but specific table(s)

So, I know I can wildcard a database for all tables. For instance if I wanted to grant select to a user for all tables in matching databases, I could: GRANT SELECT ON 'databasesprefix%'.* TO testuser@localhost IDENTIFIED BY 'testpasswd'; However…
FunkyShu
  • 138
  • 5
3
votes
3 answers

Can't access to some database being root, after just creating that database

as root@localhost mysql> CREATE USER 'aaa'@'%'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT USAGE ON * . * TO 'aaa'@'%' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; Query OK, 0 rows…
apelliciari
  • 8,241
  • 9
  • 57
  • 92
2
votes
1 answer

How to grant select on information_schema.views in Postgresql?

Is there any way to grant read-access on the information_schema-objects, in this case the views-table? I want to run my web application with a very restricted user, but at some places he needs to query information_schema.views for debugging…
Stefan
  • 317
  • 1
  • 3
  • 11
2
votes
2 answers

Oracle table referencing a table from another schema

I'm having some trouble understanding what's possible and what's not possible in Oracle when it comes to multi-schema setups. Let's say I have two schemata A and B: -- with user SYS connect as SYSDBA -- note: ALL PRIVILEGES are granted for…
Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509
2
votes
1 answer

how to grant role acces to specific schema

I am new to Oracle and i am struggling with the permissions. I created some tables with user called ADMIN on a specific tablespace. The tables are in the schema ADMIN now. I want access this tables from another user called TESTUSER which is in a…
Bins Ich
  • 1,822
  • 6
  • 33
  • 47
2
votes
0 answers

Grant execute privilege on specific database

I tried granting the execute privilege for a specific user on a specific database using the following: GRANT EXECUTE ON `databasename`.* TO 'user'@'12.345.67.89'; It appears to complete successfully but doesn't add the permission. However if the…
xylar
  • 7,433
  • 17
  • 55
  • 100
2
votes
1 answer

grant role to schema

GRANT ROLE_BLAH_GENERAL TO BLAH_USER I encountered this error ORA-01932: ADMIN option not granted for role 'ROLE_BLAH_GENERAL' Then I reformed the query to GRANT ROLE_BLAH_GENERAL TO BLAH_USER WITH ADMIN OPTION; I then encountered ORA-01932:…
Imran
  • 167
  • 1
  • 1
  • 11
2
votes
1 answer

SnowFlake: Access rights in SQL vs. procedures

I have the following initial situation in SnowFlake: I want to retrieve the NextVal of a sequence in a procedure and get the following error message when calling the procedure: Uncaught exception of type 'STATEMENT_ERROR' on line 3 at position 29 :…
2
votes
1 answer

Oracle view and grant question

How can I use grant and creation of a view to allow a user to have read only access to certain columns in a table but also be allowed to update only one of the columns? Can you specify a specific column only for update on a grant?
Christopher
  • 671
  • 3
  • 10
  • 18
2
votes
2 answers

Redshift: Truncating Table Created by another user

I'm trying to truncate a table in redshift but it's throwing the following error - SQL Error [500310] [42501]: Amazon Invalid operation: must be owner of relation table; I have already granted all the privileges on the table to the user. As…
2
votes
0 answers

Postgres User can't connect to new database and I have granted full permission using PGADMIN

I have created a new database and I have some existing users who I want to grant full permission to access the database. So to keep it simple I simply want to be able to connect to the database using a user name so I run the following: GRANT CONNECT…
C-Sharpie
  • 195
  • 10