Questions tagged [database-permissions]
238 questions
10
votes
4 answers
How to give access to SQL Server database mail procedures for a Login in a different database?
I'd like to know how to set up permissions within SQL Server to allow my application Login/Role to be able to send email using msdb.dbo.sp_send_dbmail.
I have a database MyDb, a user MyUser who is a member of role AppRole. I have a stored procedure…

Rory
- 40,559
- 52
- 175
- 261
10
votes
3 answers
List of tables that a user has SELECT privilege for in MySQL
Short version: How can I write an SQL procedure to list which of several tables in a MySQL database a particular user has access to?
Longer version:
I'm writing a multi-user app that accesses a database with data for several branches of a company.…

Scott Deerwester
- 3,503
- 4
- 33
- 56
9
votes
7 answers
ASP.Net Membership.DeleteUser
In testing, the user on a db i've used was a big jefe. In production, he only has Execute.
When I called,
Membership.DeleteUser(user)
In testing, it worked.
I try the same in production, and I get this:
The DELETE statement conflicted with the…

Irwin
- 12,551
- 11
- 67
- 97
9
votes
2 answers
How to Grant Permission to IMPERSONATE any other user?
In order to log the usage of an application I am developing I need every user using my application to execute queries against my SQL Server Database under their own credentials.
In order to not be storing their passwords in a retrievable fashion, I…

Chris Pfohl
- 18,220
- 9
- 68
- 111
8
votes
1 answer
Ms Access: Record(s) cannot be read; no read permission on [table]
i wrote script for downloading mdb files and reading them due OLEDB provider. All works fine, but if i try to read from table, it throws an exception:
Ms Access: Record(s) cannot be read; no read permission on tblMytable
var cmd = new…

Jan Remunda
- 7,840
- 8
- 51
- 60
8
votes
5 answers
PHP Access Control System
I am part of a team creating a web application using PHP and MySQL. The application will have multiple users with different roles. The application will also be used in a geographically distributed manner. Accordingly we need to create an access…

Vinayak
- 756
- 3
- 7
- 23
8
votes
1 answer
Permission to drop views but not drop tables
I want to create a user with permission to create and drop views but not drop tables or databases. This is so I can play around when testing my views without the risk of accidentally deleting a table.
There is a GRANT CREATE VIEW privilege but there…

Flash
- 15,945
- 13
- 70
- 98
8
votes
1 answer
How to understand Principals in SQL Server?
This sounds stupid but I find it really confusing: in MSDN the definition is the entity that can request SQL Server resources. And basically there are three types of principals: Windows-level principals, SQL Server-level principals and…

tete
- 4,859
- 11
- 50
- 81
7
votes
5 answers
Sql server execute permission; failure to apply permissions
I've just migrated from SQL2000 to SQL2008 and I have started getting an execute permission issue on a stored proc which uses sp_OACreate.
The rest of the system works fine with the db login which has been setup and added to the database.
I've…

WestDiscGolf
- 4,098
- 2
- 32
- 47
7
votes
1 answer
Permission denied on schema in PostgreSQL
I can't find why I am getting an permission denied error in my database.
The role owns the schema and has access to the table, but still the log says:
ERROR: permission denied for schema myschema at character 20
QUERY: SELECT 1 FROM ONLY…

jnas
- 826
- 10
- 14
6
votes
2 answers
Getting 'permission denied for table foo' error even though permissions have been granted
I have logged into my database as the database owner (a superuser as well) and have created a role_write role with nologin and noinherit flags.
I've revoked the default create permissions from the public schema with:
REVOKE CREATE ON SCHEMA public…

Jake
- 3,865
- 5
- 25
- 58
6
votes
1 answer
PostgreSQL drop role with default privileges
I am attempting to drop a role and have severed all ties to it that I can locate, but there is one lingering issue I cannot resolve. When I run this:
drop role hank
It tells me:
ERROR: role "hank" cannot be dropped because some objects depend on…

Hambone
- 15,600
- 8
- 46
- 69
6
votes
3 answers
SQL Server: permissions to read database diagrams
Could you please advise, what are permissions required to give user access to read Database diagrams in SQL Server 2005?
Thanks a lot!

Budda
- 18,015
- 33
- 124
- 206
6
votes
1 answer
Can't connect to mysql because there are no users
I mistakenly removed all users for mysql ... So I can't connect to mysql.
Does anyone has an idea ?
I tried reinstalling it but it didn't work ...
PS : I am on Archlinux.
Thanks in advance !

Vinzgore
- 97
- 3
- 6
6
votes
3 answers
Creating a SQL Server user with permission to read one view and nothing else - but he can see system views and procedures?
My company hired a contractor to do a small project for us, for which he needs to select data from one single view in our main database (SQL Server 2005).
I wanted to create a locked-down SQL Server login for him, with permissions just to SELECT…

Christian Specht
- 35,843
- 15
- 128
- 182