Refactored SQL Server instance discovery and insertion process