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

How to grant specific privileges to user in MySQL?

I'd like to allow user to SELECT from specific tables and views, and EXECUTE specific procedures. I've written such a script: CREATE USER 'user'@'%' IDENTIFIED BY 'user'; GRANT SELECT ON database.table1, database.view1, database.view2 'user'@'%'…
sunpietro
  • 2,059
  • 4
  • 24
  • 42
-1
votes
1 answer

Oracle: Grants for select from SYS.DBMS_LOCK_ALLOCATED

I'm wondering do I need just SELECT FROM grant to select from SYS.DBMS_LOCK_ALLOCATED or there is some special role for it? I'm unable to grant SELECT FROM SYS.DBMS_LOCK_ALLOCATED to my test user, so I've tried to grant SELECT FROM ANY TABLE. But it…
Alexander
  • 1
  • 1
-1
votes
1 answer

How to find missing grant on all tables for one role

i have some problem on my student Database schema. I want to find with query which Tables don't have: for example 'SELECT' grant to role XXX. Second example is that in Tables i have like Grants for delete,alter but now i want to check all Tables…
-1
votes
1 answer

How do i add ALTER SESSION privileges to a user in Oracle SQL

I created a user in SQL using, CREATE USER opt IDENTIFIED BY pass; User got created. Then I try to grant certain privileges to the user, SQL> grant unlimited tablespace ,create session to opt; Grant succeeded. SQL> grant alter session…
fthomas
  • 7
  • 1
  • 4
-1
votes
1 answer

grant Truncate priviledge on another User in Oracle

I have created below Oracle Procedure where i am granting DML priviledges on all tables to TST user. Now i also want to grant Truncate priviledge to TST user in the same Procedure but dont know how to do it. CREATE OR REPLACE PROCEDURE…
Andrew
  • 3,632
  • 24
  • 64
  • 113
-1
votes
1 answer

Postgres - restore/maintain privileges after schema drop

Long story short, a schema schema1 in a postgres 12 db was dropped and a user user1 uses the tables and user1 is not the owner of the schema. Is there a way to maintain automatically the privileges that user1 lost? this in order to avoid the manual…
Naty Bizz
  • 2,262
  • 6
  • 33
  • 52
-1
votes
2 answers

Is there a way to prevent flood insert from user in PosgreSQL? Is there some kind rate limit?

As a part of SQL injection prevention, I have revoked rights on DELETE and UPDATE for the user using the connection. In that way, an attacker cannot harm the integrity of the data even if the bad code allows SQL injection. Now only left is INSERT.…
IngoP
  • 465
  • 5
  • 11
-1
votes
1 answer

How can I allow someone to run my Oracle functions/procedures but not able to view its source codes

i have an oracle database schema with functions, stored procedures and packages. i want to allow some developers to access my tables read only so i create a user with READ ONLY access to my tables. i want to grant them EXECUTE on my stored…
angkong
  • 1
  • 1
-1
votes
1 answer

mysql grant permissions on all but system tables

I am trying to grant a set of permissions to " all databases all tables" . excepted mysql system databases (mysql,information_schema,performance_schema, and sys (I believed I named them all?)). I am not sure how to do that. I need for instance a…
Bluz
  • 5,980
  • 11
  • 32
  • 40
-1
votes
1 answer

Transfer rights from user to another user

I have 3 tasks: Create a database owner with 'sa' rights. Create three database users. Transfer the rights from the user from task 1 to one of the users from task 2. I know how to solve first and second tasks: CREATE USER admin WITH LOGIN PASSWORD…
TupleCats
  • 351
  • 3
  • 15
-1
votes
1 answer

mysql , make new user only can read current table ,and can insert & update to new table

There are five table in my database, now I create user1 , but I want this come true: user1 only can read current five table. user1 can create table, and insert & update to new table. How can I accomplish this?
-1
votes
2 answers

How do I grant permisions to user(s)

Using the query, not the GUI. I created a user for AdventureWork2014 with the default_schema person. How do I give him permissions to use the "sale" schema as well?
Adin Sijamija
  • 695
  • 2
  • 7
  • 19
-1
votes
1 answer

Schema level SELECT privilege on all new tables in Vertica

I am trying to work on a scenario , where one user creates tables in a 'schema', and all such tables should be visible to a specific user/role, even if the tables are created in future (after grant SELECT command). My current flow is as: USERS:…
Vikas Raturi
  • 916
  • 2
  • 13
  • 23
-1
votes
1 answer

How to maintain access restrictions in PostgreSQL?

I need to achieve the below goal in postgresql. There is a database "textdb" with 4 schema's that are public, ds, fin, viz. We need to create a script that can be used to provide access to the role. So, I need to create 3 roles, one for analyst,…
user3222101
  • 1,270
  • 2
  • 24
  • 43
-1
votes
1 answer

Allow a role to create objects in tablespaces

I am trying to assign to the role "computer" the permission to create objects in any less tablespace in the SYSTEM tablespace. Thank you very much and I hope I have explained correctly. I have tried the following query: GRANT CREATE ON ANY…