Questions tagged [database-permissions]
238 questions
6
votes
1 answer
How do I check which schemata have been granted EXECUTE permission on an Oracle object?
I need to find out which schemata have already been granted execute permission on a certain object in an Oracle 10g db (in this case, a package). What's the simplest way for me to do this? Is there a built-in function to provide this information?

MPritchard
- 7,031
- 7
- 28
- 40
6
votes
2 answers
Why does PHP PDO get "SQLSTATE[42000] [1044] Access denied for user" when mysql command line works?
My head is bloody from how hard I've been banging it against this wall for the past several hours. :(
As the title suggests, I've created a MySQL user that can access the database fine from the mysql command prompt on the database server. However,…

Rob Johansen
- 5,076
- 10
- 40
- 72
6
votes
3 answers
TF246017 Error when opening TFS Administration Console
When I log on to our TFS server using my own domain account and try to open TFS Administration Console, I get the following error:
TF246017: Team Foundation Server could not connect to the database.
Verify that the server that is hosting the…

Matt
- 23,363
- 39
- 111
- 152
5
votes
2 answers
Permissions required to run 'ALTER DATABASE SET SINGLE_USER' statement on SQL Server 2008
I've came across the case when the following statement throws an error saying it can't be executed because of the permission:
ALTER DATABASE [{0}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
Couldn't find anywhere on the web any information about the…

Oleg Sakharov
- 1,127
- 2
- 20
- 19
5
votes
3 answers
When would sys.database_permissions contain a row with state = 'R'?
The MSDN documentation for sys.database_permissions says that the state column can be either 'G', 'D', 'R', or 'W'. The 'R' value has a description of 'REVOKE', which makes it sound like a row with this value would correspond to a revoked…

Charlie
- 44,214
- 4
- 43
- 69
5
votes
2 answers
Immutability in Postgres
I want to create an immutable Postgres database, where the user can insert & select (write & read) data, but cannot update or delete the data.
I am aware of the FOR UPDATE lock, but I don't understand how to use it.
Let's say for example I have the…

Hasan A Yousef
- 22,789
- 24
- 132
- 203
5
votes
2 answers
Revoke particular columns in postgresql
I've tried using the documentation here but doesn't seem to help. If you can please give me an example.
revoke select (column1, column2) on table from specific_user
hasn't worked.
Access privileges
Schema | Name | Type | Access privileges …

tambakoo
- 343
- 3
- 15
5
votes
1 answer
Why does a PostgreSQL SELECT query return different results when a schema name is specified?
I have a PostgreSQL database table with 4 columns - labeled column_a, column_b, etc. I want to query this table with a simple select query:
select * from table_name;
I get a handful of results looking like:
column_a |…

Eric Jankowski
- 463
- 4
- 9
5
votes
3 answers
Permissions error running EXPLAIN on MySQL VIEW
I have a view defined in a MySQL 5.0 database as:
CREATE OR REPLACE ALGORITHM=MERGE
DEFINER=db1_user@'%' SQL SECURITY DEFINER
VIEW db2.data_view AS SELECT * FROM db1.data_table;
This is done to give users of db2 access to this single table in…

tcarobruce
- 3,773
- 21
- 33
4
votes
2 answers
CouchDB read/write restrictions on _users database
I would like to restrict the user permissions so that a normal user is only able to read/write its own user document.
I managed to set the write permissions such that a user can only edit their own document (via the validate_doc_update function in…

Alumni
- 85
- 3
- 7
4
votes
4 answers
Why can't a stored procedure read a table from another database (I must be using GRANT and DENY wrongly)
I have two Microsoft SQL Server 2000 databases, and a stored procedure on one tries to read data from the other. This used to work fine, but since I became security-conscious and changed the login (SQL user) from "db owner" to "denydatareader" the…

Magnus Smith
- 5,895
- 7
- 43
- 64
4
votes
1 answer
Execute dynamic DDL in PL/SQL procedure through definer role permissions
I want to perform some dynamic DDL in a procedure owned by an admin user. I'd like to execute this procedure with a technical operational user with definer rights (operational user doesn't have the create table role).
The problem is the 'create…

JochenDB
- 588
- 10
- 31
4
votes
0 answers
MySQL - How to grant privileges to user on specific tables defined with wildcard?
As discussed here, and here, we can use wildcard when granting privileges to user.
grant all on `someSchema\_%`.* to `someUser`@`%`;
Though wildcard CANNOT be applied to table name i.e.
grant all on `someSchema\_%`.`someTable%` to…

Nam G VU
- 33,193
- 69
- 233
- 372
4
votes
3 answers
TSQL - Executing CLR Permission
I got a sql procedure from a CLR (.net Assembly) that when executed returns an error
Msg 6522, Level 16, State 1, Procedure sp_HelloWorld, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'sp_HelloWorld':…

Juvil
- 490
- 12
- 26
4
votes
2 answers
Copying permissions from one mysql database to another
I would like to replicate the permissions from one database to another. Could that be done by simply copying the mysql table over?

meow
- 27,476
- 33
- 116
- 177