Connection management for SQL Server databases