December 16, 2008 at 7:20 pm
hi,
I have a code like this
declare @server
decare @counterid
set @server =...
select Max(mem) ,avg(Mem) from counter where server = @server and counter =@counterid
I have to check some counter inforamtion for 10 servers ..,
So what im doing is for every server Im declaring a variable and setting the server name to that variable..
Im repeating the above process 10 times because we have 10 servers and executing 10 times.But i want to execute 1 time and have to get results for 10 servers
Can anyone suggest me the easy way to do this
December 16, 2008 at 8:18 pm
Do you have "linked servers" setup on one server to access all the other servers? If not, and I have to ask, do you have the login information for all 10 servers so you can make a remote query to each?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 16, 2008 at 8:30 pm
We have all the inforamtion about the servers in reporting server.
I have to write queries on reporting servers and I have full access to reporting server.
December 17, 2008 at 8:11 am
Forgive my ignorance... does that mean that the reporting server has "linked servers" to all the other servers or does that mean all the data from the other servers is in separate databases on the reporting server? It will make a bit of a difference in how we attack this problem.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 17, 2008 at 8:47 am
Or is the data in one table in a database on the reporting server?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply