Solved

Find all SQL Servers in network/domain

Posted on 2013-05-29
4
1,935 Views
Last Modified: 2013-05-30
Is there a way I can find out the names of the servers that  are running any version of MS SQL server? I'd like to run a command which scans the domain for SQL servers, either using powershelll, VBS, AD support tools, whatever.

All servers are 2005 to 2008 R2. Forest functional level 2008 R2.

I have basic powershell experience and very limited VBS knowledge.
0
Comment
Question by:David
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 30

Expert Comment

by:Rich Weissler
ID: 39206395
Pinal Dave's script will find SQL Servers that are broadcasting/advertising their existence.

You can also query the directory for SQL instances which have been registered in AD with the SETSPN command.  
"SETSPN -Q MSSQLSvc/*" checks the local domain.  "SETSPN -F -Q MSSQLSvc/*" checks the whole forest.
Unfortunately you can't always count on all instances of SQL being registered.  (Kerberos won't work without it, but plenty of folks don't worry about that.)

A third option would be to use Powershell:
1. Enumerate the computers you are concerned with, I assume Get-ADComputer will work for this purpose for you.
2. Use Get-Service to enumerate the services, and pull out entries for SQL.
0
 
LVL 5

Accepted Solution

by:
tastas earned 500 total points
ID: 39206416
Download Angry IP Scanner and scan your entire network for port 1433.  Microsoft SQL Servers uses port 1433.
0
 
LVL 1

Author Closing Comment

by:David
ID: 39208507
Wow that was great!!! Thanks!! Super easy!!
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question