question

naga avatar image
naga asked

@@version against all SQL servers in my environment.

Is it possible to find the SQL version of all SQL servers in my environment?

sqldbacentral-management-server
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Tim avatar image
Tim answered

Sure, you can setup Central Management Server (CMS) and then run select @@version from the group of servers. If you have a list of servers, you could also use PowerShell to query each server. You have several options, just do a little digging on Google and you'll be able to knock this out. CMS is an easy route to go.

3 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Tim, Thanks for your response. What I am trying to do is create a process that would run @@versions against all the server in the CMS and dump the results into a table. I don't wish to manually right click on CMS and execute the query.

0 Likes 0 ·

Take a look at dbatools. There are several scripts related to RegServer that may give you the option to query using PowerShell to reference a CMS group. You can then pipe the results out to a file or SQL Server table and automate the script to run as often as you would like.

0 Likes 0 ·

Thank you very much!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.