How we can check the database permission for any user?

 Posted by Lakhangarg on 2/26/2010 | Category: Sql Server Interview questions | Views: 3716

SELECT * FROM fn_my_permissions (null, 'DATABASE');

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Puneet20884 on: 2/26/2010
Not returning any record, what will be the possible cause and can you please justify the significance of various arguments that this function is taking ??
Posted by: Lakhangarg on: 2/26/2010
This will return the result for the login user.

Posted by: Raja on: 2/26/2010
It's really not returning anything. Lakhan, can you please elaborate it in detail. I am logged into SQL Server Management Studio and executed the code and it returns nothing to me.
Posted by: Lakhangarg on: 2/26/2010
Steps to check-
(1) Login to Databse server.
(2) Open the query window
(3) Select the Database
(4) Execute the above query

Please check the detail from here...

Login to post response