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 2000 Forums
 SQL Server Administration (2000)
 To find out window users

Author  Topic 

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2007-12-20 : 13:26:48
We have been monitoring around 300 sql server by registring all of them on a single server. The task in hand is to find out Windows users for each database for every server. Please suggest me some query by which I can find out the above mentioned results.or guied me to find out the same by any other way.

Thanks
Chander

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-20 : 13:41:11
Registering them on a single server doesn't help you with the scripts. It's not like you get access to all of the other servers when you starting querying them.

So to do what you want, you could setup 300 linked servers in one particular admin server. Or you could just write sqlcmd script. But you've got a bit of work to get this all setup.

So what query would you run to get this information on one particular server?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2007-12-20 : 15:16:44
We have already set up the linked servers, so please provide me the scripts for getting the Windows user in each database of each server.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-12-20 : 16:01:27
You need query master..sysprocesses via every linked server created.
Go to Top of Page

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2007-12-20 : 16:53:08
i need information about every NT user that a specific database own

thanks
chander
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-20 : 17:08:02
Check out sysusers.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2007-12-20 : 18:18:59

but sysusers does not give any infor about the default database...
need to check window nt users for each database on the server.

thanks
chander
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-20 : 18:22:55
Sysusers is what you want. I don't have a clue what you mean in the first sentence of your last post.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-12-20 : 19:56:39
Query syslogins, it'll tell you default db of every sql login.
Go to Top of Page

donpolix
Yak Posting Veteran

97 Posts

Posted - 2007-12-28 : 14:43:29
Go thru each db, query sysusers table where isntuser=1.

Donn Policarpio
Go to Top of Page
   

- Advertisement -