Home > INDEXES > Find out permissions of currently logged in USER or your permissions

Find out permissions of currently logged in USER or your permissions

Find out permissions of currently logged in USER or your permissions

USE function fn_my_permissions in SQL Server 2005 or above .

Use AdventureWorks
Go
—————Return Callers permission on the current server
SELECT * FROM fn_my_permissions(NULL, ‘SERVER’);
Go

—————Return Callers permission on the current database
SELECT * FROM fn_my_permissions(NULL, ‘DATABASE’);
Go

————–Return Callers permission on the given object
SELECT * FROM fn_my_permissions(‘Sales.vIndividualCustomer’, ‘OBJECT’);
Go

 

for more info refer

http://msdn.microsoft.com/en-us/library/ms176097.aspx

 

Advertisements
Categories: INDEXES
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: