SQLVersionTools connects SQL Server instances with Git version control, enabling rollback capabilities, history viewing, and many other operations directly from SQL Server Management Studio.
SQLVersionTools is a comprehensive solution that integrates version control into your SQL Server database development workflow. It consists of two main components:
- SSMS Extension - A Visual Studio extension that integrates seamlessly into SQL Server Management Studio 21, providing context menus and dialogs for Git operations
- Background Service - A Windows service that handles background operations, synchronization, and scheduling
- Database-to-Git Linking - Connect any SQL Server database to a Git repository
- Automatic Object Tracking - Track changes to stored procedures, views, functions, and triggers
- Version History - View complete history of database object changes
- Rollback Support - Revert changes directly from SSMS
- Object Filtering - Use .gitignore patterns to exclude specific objects
- Schema Organization - Automatically organize database objects into structured folders
- Commit & Push - Commit and push changes to remote repositories
- Real-time Synchronization - Background service monitors and syncs changes
- Operating System: Windows 10/11 or Windows Server 2016+
- SQL Server: SQL Server 2016 or later (all editions)
- SSMS: SQL Server Management Studio 21
- .NET Runtime: .NET 8.0 Runtime
- Git: Git 2.0 or later installed on the system
- Permissions: Administrator rights for service installation
- Install the SSMS extension by extracting SQLVersionTools.zip to C:\Program Files\Microsoft SQL Server Management Studio 21\Release\Common7\IDE\Extensions
- Install and start the background service using the installation script
- In SSMS Object Explorer, right-click on a database
- Select SQLVersionTools > Link to Git
- Configure your Git repository settings
- Start tracking your database changes!
For detailed installation instructions, see INSTALLATION.md
┌─────────────────────────────────┐
│ SQL Server Management Studio │
│ ┌─────────────────────────┐ │
│ │ SQLVersionTools VSIX │ │
│ │ (User Interface) │ │
│ └───────────┬─────────────┘ │
└───────────────┼─────────────────┘
│
├─────────────────────────┐
│ │
┌───────▼────────┐ ┌────────▼─────────┐
│ SQL Server │ │ Git Repository │
│ Database │ │ │
└───────┬────────┘ └────────▲─────────┘
│ │
│ ┌─────────────────┘
│ │
┌───────▼───────▼──────┐
│ SQLVersionTools │
│ Background Service │
│ (Sync & Monitoring) │
└──────────────────────┘
When you link a database to Git, SQLVersionTools creates the following structure:
MyDatabaseRepo/
├── .git/
├── .gitignore
├── .sqlversiontools # Configuration file
├── StoredProcedures/
│ ├── dbo.uspGetUsers.sql
│ ├── dbo.uspCreateOrder.sql
│ └── ...
├── Views/
│ ├── dbo.vwActiveUsers.sql
│ └── ...
├── Functions/
│ ├── dbo.fnCalculateTotal.sql
│ └── ...
└── Triggers/
├── dbo.trgAuditLog.sql
└── ...
After linking a database, a .sqlversiontools configuration file is created in the repository root:
{
"version": "1.0",
"links": [
{
"serverName": "localhost\\SQLEXPRESS",
"databaseName": "MyDatabase",
"branch": "main",
"folderStructure": {
"storedProcedures": "StoredProcedures",
"views": "Views",
"functions": "Functions",
"triggers": "Triggers"
},
"filters": {
"excludeSystemObjects": true,
"excludeTempTables": true,
"customIgnorePatterns": ["*_backup", "temp_*"]
}
}
]
}For issues, questions, or feature requests, please use the GitHub issue tracker.
- ✅ Phase 1: Git Linking - Complete
- ✅ Phase 2: Commit & Sync - Complete
- ✅ Phase 3: SSMS Extension - Complete
- ✅ Phase 4: Background Service - Complete
- 🚧 Phase 5: Advanced Features - In Progress
- LibGit2Sharp - Git operations
- Microsoft.SqlServer.Management.Smo - SQL Server operations
- Newtonsoft.Json - Configuration serialization
- System.Data.SQLite - Local state management
See LICENSE.md for licensing information.

