Search code examples
sqlsql-serverdatabase-administration

Automation of SQL instance discovery notification


I wanted to know if there is a way to get automated notification via mail when a new SQL instance is discovered in the network?


Solution

  • There is no out-of-the-box solution for this one, but you can implement a windows service that keeps looking for instances endlessly, warning any interested party when a new one is found...
    If you know how to program, it should not take you more than 10 min to do so...

    Edit1
    Turn up VS and create a new project. Select as a template "Windows Service".
    Add the reference to the SMOs
    Use GetDataSources() to find instances and store them on a list or whatever
    Upon loop, check for new instances. new instance found? SendMail!