Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Get database name for particular username,password

Author  Topic 

baburk
Posting Yak Master

108 Posts

Posted - 2010-06-14 : 07:12:50
Hi,

I need a query to get all the database name for an UserName and Password.

Thanks,
Babu Kumarasamy.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-06-14 : 07:25:43
[code]
SELECT u.name,
l.dbname
FROM sys.sysusers AS u
INNER JOIN sys.syslogins AS l ON l.sid = u.sid[/code]


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -