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.ThanksChander |
|
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 KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
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. |
 |
|
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. |
 |
|
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 ownthankschander |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-12-20 : 17:08:02
|
Check out sysusers.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
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 |
 |
|
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 KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
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. |
 |
|
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 |
 |
|
|