A pure Go driver for Microsoft SQL Server, implementing Go's database/sql interface.
go-mssqldb is a database driver written in Go that provides connectivity to Microsoft SQL Server and Azure SQL Database. It implements Go's standard database/sql interface, allowing developers to interact with MSSQL databases using familiar Go database patterns. The driver handles connection management, query execution, and data type conversions between Go and SQL Server.
Go developers building applications that need to connect to Microsoft SQL Server or Azure SQL Database, particularly those who prefer pure Go solutions without C dependencies.
As a pure Go implementation, it offers excellent cross-platform compatibility and easy deployment. It provides full support for SQL Server features while maintaining compliance with Go's database/sql standards, making it a reliable and performant choice for MSSQL connectivity in Go applications.
Microsoft SQL server driver written in go language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
No C dependencies make it cross-platform and easy to deploy, as emphasized in the README's philosophy and pure Go implementation.
Supports SQL Server, Windows, and multiple Azure AD authentication types, including interactive and managed identity, detailed in the Azure AD section.
Full compatibility with stored procedures, output parameters, AlwaysOn listeners, and modern date/time types, as listed in the Key Features.
Provides SSL/TLS encryption with configurable trust settings, ensuring secure connections, as explained in the connection parameters.
Local temporary tables drop immediately if created with parameters, requiring explicit workarounds and session management, as documented in the Caveat section.
Azure AD authentication requires importing a separate package and managing various credential types, adding steps compared to standard auth, per the Azure AD instructions.
Has known issues with older SQL Server versions requiring patches, and deprecated query parsing for the 'mssql' driver name that can confuse users.