Reputation: 3041
I have a requirement where in, I have to check whether the user has write access to a particular sql server or not.
I have done this with using Dir function for access db and other files
But SQL server, do I have to try and write a value to a table to see whether it allows me or not ?
Upvotes: 1
Views: 4594
Reputation: 76
You could try: fn_my_permissions. The following is based on an example from the web page.
SELECT * FROM fn_my_permissions('dbo.MyTable', 'OBJECT')
ORDER BY subentity_name, permission_name ;
This will return three columns:
Upvotes: 2