Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Find all SQL Servers in network/domain

Posted on 2013-05-29
4
Medium Priority
?
2,078 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

721 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