SQL Server Stored Procedure Comparison & Verification Tool
VersionGuard is a Node.js-based utility that compares SQL Server stored procedures deployed in a database with SQL scripts available in the local project. It helps Development, QA, and Release teams identify mismatches before deployment, reducing production risks and improving release confidence.
The tool automates the verification process by comparing source-controlled SQL scripts with deployed database objects and generates a detailed comparison report for further analysis.
In enterprise applications, multiple developers often modify the same database objects. During deployments, stored procedures may become inconsistent because of version mismatches, missing deployments, or unintended changes.
Manual verification of every stored procedure is time-consuming and increases the possibility of deployment errors reaching production.
VersionGuard automates stored procedure verification by reading SQL scripts from the local project, retrieving corresponding stored procedures from SQL Server, normalizing SQL content, comparing both versions, and generating a comparison report.
The generated report helps Development, QA, and Release teams identify mismatches before deployment.
-
SQL Server Stored Procedure Comparison
-
SQL Normalization
-
Automated Comparison Engine
-
Comparison Report Generation
-
Modular Node.js Architecture
-
QA-Oriented Verification
-
Deployment Validation Support
-
Node.js
-
JavaScript
-
SQL Server
-
Git
-
GitHub
The application follows a modular architecture where each component is responsible for a single task.
Local SQL Folder
│
▼
Folder Reader
│
▼
SQL File Reader
│
▼
SQL Normalization Engine
│
▼
Comparison Engine
▲
│
SQL Server Stored Procedures
▲
│
Database Connection
│
▼
Comparison Report
VersionGuard/
│
├── src/
│ ├── database/
│ │ └── connection.js
│ │
│ ├── services/
│ │ ├── comparisonEngine.js
│ │ ├── fileReader.js
│ │ ├── folderReader.js
│ │ ├── procedureReader.js
│ │ ├── reportWriter.js
│ │ └── sqlNormalizer.js
│ │
│ └── index.js
│
├── sql/
├── reports/
├── package.json
├── package-lock.json
├── .gitignore
└── README.md
Clone the repository.
git clone https://github.com/sachinn0109/VersionGuard.gitMove to the project directory.
cd VersionGuardInstall dependencies.
npm installCreate a .env file in the project root.
Configure the following values:
DB_SERVER=YOUR_SERVER
DB_DATABASE=YOUR_DATABASE
DB_USER=YOUR_USERNAME
DB_PASSWORD=YOUR_PASSWORDNote: Never commit the
.envfile to GitHub because it contains sensitive credentials.
Run the application using:
node src/index.jsThe application performs the following operations:
-
Connects to SQL Server.
-
Reads local SQL files.
-
Retrieves stored procedures.
-
Normalizes SQL.
-
Compares both versions.
-
Generates a comparison report.
After successful execution, VersionGuard generates a comparison report similar to the following.
===================================================
VERSIONGUARD REPORT
===================================================
Procedure : USP_GetEmployee
Status : MATCHED
---------------------------------------------------
Procedure : USP_InsertEmployee
Status : MISMATCH FOUND
Reason :
Source SQL and Database Stored Procedure are different.
---------------------------------------------------
Procedure : USP_DeleteEmployee
Status : MATCHED
===================================================
Comparison Completed Successfully
===================================================
The following screenshots demonstrate the application workflow.
Project directory in Visual Studio Code.
(Screenshot will be added.)
Terminal output after running the application.
(Screenshot will be added.)
Sample report generated after comparison.
(Screenshot will be added.)
Public GitHub repository of VersionGuard.
(Screenshot will be added.)
VersionGuard provides practical benefits across Development, QA, and Release teams.
-
Reduces manual SQL verification effort.
-
Saves QA verification time.
-
Saves developer effort during deployments.
-
Detects deployment mismatches before production.
-
Improves release confidence.
-
Supports regression verification.
-
Generates documented reports for audit purposes.
-
Reduces operational costs by preventing deployment issues.
-
Improves collaboration between Development, QA, and Release teams.
The following enhancements are planned for future releases.
-
AI-assisted SQL validation.
-
HTML Dashboard.
-
PDF and Excel report generation.
-
Email notifications.
-
Azure DevOps integration.
-
Jenkins integration.
-
Multi-environment support.
-
Comparison history.
Sachin Kumar Jha
Quality Assurance Engineer
- Manual Testing
- SQL Server
- API Testing
- JavaScript
- Node.js
- Git & GitHub
- Playwright
GitHub
https://github.com/sachinn0109
https://www.linkedin.com/in/sachin-jha-a2950854
This project is licensed under the MIT License.
You are free to use, modify, and distribute this project with proper attribution.
See the LICENSE file for complete license information.