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

Cant execute this instruction in the database GRANT EXEC sp_configure to user

I have a database called sa-db, in this database I have a user called sa-clientap and I need to grant him permissions to execute the sp_configure, but when I try to do this, I get an error: Permissions on server scoped catalog views or stored…
Jp191290
  • 51
  • 8
2
votes
1 answer

SQL permissions based on record value (if column X = Y for user1 allow Inserts/Updates etc.)

I need to run queries as a "user" which is a record in a table, with permissions based on a record value of that user. I have a database with a tUsers Table, such as: ID Username Email Role 1 Pieman mail.com Admin 2…
Vereonix
  • 1,341
  • 5
  • 27
  • 54
2
votes
1 answer

MySQL Grant Problem

Why might the following grant statement fail to work? grant all on kylie.* to 'kylie'@'localhost' identified by 'foo'; Here's the complete output. $ mysql -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is…
Joel Dare
  • 165
  • 9
2
votes
0 answers

GRANT SELECT TO role (without specifying ON object)

What is the result of an instruction like the following on SQL Server 2008+? GRANT SELECT TO role (without specifying ON object!) The 'Command(s) completed successfully.' My tests have concluded that the role will have SELECT permission on ALL…
RafaelaKA
  • 21
  • 1
  • 4
2
votes
1 answer

How do I grant a site's applet an AllPermission privilege?

I'd like to specify certain applets to run with java.security.AllPermission on my computer (for debugging and security testing). However, I don't want to enable all applets that I run to have this permission. So, editing my user Java policy file…
nahsra
  • 349
  • 1
  • 3
  • 10
2
votes
1 answer

Create user through procedure on another database via database link

I have created user on another database using database link and stored procedure but facing problem while grant permission to the new created users. Check below code: CREATE OR replace PROCEDURE Hostname10 (user_name IN VARCHAR2, …
2
votes
1 answer

Granting roles to user ORACLE using JDBC in Java

I would like to know if it is possible to grant roles to specific users in Oracle using JDBC as connector in Java. I have the following sentence. I don't know which of the functions I have to use in JDBC. st = con.createStatement(); String priv =…
ditmark12
  • 111
  • 1
  • 11
2
votes
2 answers

Revoke ANY Privileges Oracle

Hi I have this question. Is posibble GRANT ANY privileges excluding some tables of the same schema. For Example: EXECUTE IMMEDIATE 'CREATE USER USREJECUTA_SUI_ABAS IDENTIFIED BY VALUES ''test'' DEFAULT TABLESPACE USERS …
OAlavez
  • 21
  • 1
  • 2
2
votes
3 answers

alter index across schemas

I am synchronizing tables using a stored PL/SQL procedure as part of a web application - when they hit a button it does the sync. The PL/SQL is executing as user A, but needs to disable indexes and sync a couple of tables in schema B. I can't get…
user32845
  • 21
  • 1
  • 2
2
votes
0 answers

oracle find out date/time of grant

I am using oracle 11g and need to find out date and time of a specific grant. Is there any way to find out WHEN (date & time) a privilege was granted? dba_tab_privs has no date column, nor has sys.objauth$... even if there is no way, please answer…
oFace
  • 216
  • 3
  • 5
2
votes
1 answer

mysql: Restore All privileges to admin user

I may be asking for the impossible here. I just tried to reset my password in phpMyAdmin. In order to do that it creates a new user with the new password and gives you the option to delete the old user. I selected to delete the old user and…
ajon
  • 7,868
  • 11
  • 48
  • 86
2
votes
3 answers

Stop mySQL GRANT ALL, not just erasing

Imagine that I run this command: GRANT ALL PRIVILEGES ON *.* TO 'user'@'host'; Now in every new DB, the user has full access. The question is, imagine that at some point I want that those . privileges don't apply to new databases. Is that…
dasHannon
  • 305
  • 1
  • 3
  • 12
2
votes
2 answers

Privilege for CREATE AGGREGATE FUNCTION

Why am I unable to create this aggregate function? As far as I can tell, I've granted the appropriate privileges (CREATE ROUTINE and ALTER ROUTINE) both on *.* and on my database (peacock): mysql> SELECT User, Host, Create_priv, Create_routine_priv,…
jmilloy
  • 7,875
  • 11
  • 53
  • 86
2
votes
1 answer

Limited Grant Permissions On Mysql

How does one create a privileged user in MySQL( not root ) for the sole purpose of creating other users? However, this user can only grant access to one database at a time. Is it possible to give limited GRANT permissions to a user?
Olaseni
  • 7,698
  • 16
  • 44
  • 68
2
votes
1 answer

New user has all privileges in MySQL 5.6

I have a problem when I create a new user in mySQL 5.6 What I want: When I create the new user, it doesn't have any privileges, and I just want to grant some select and update in a few specific columns. So he should be able to update just anything…
vaan38
  • 47
  • 5