Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

How To Get Login Existence in mutiple databases Expand / Collapse
Posted Sunday, April 27, 2014 11:00 PM


Group: General Forum Members
Last Login: Friday, August 29, 2014 8:22 PM
Points: 24, Visits: 25
I have three databases in sql 2008 such as
db1, db2, db3 and a login user "gaurav"
this login have access only db1 and db2. not db3.

so question is : can we get a list which show me login user "gaurav" exists in db1 and db2 only by a single query command
or I have to select each db like
Use db1
select * from sys.logings

Post #1565455
Posted Sunday, April 27, 2014 11:37 PM


Group: General Forum Members
Last Login: Monday, July 21, 2014 2:56 AM
Points: 2,603, Visits: 2,061
try this...

sp_helplogins gaurav

"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Post #1565460
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse