Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SQL Script ToolkitNew to Visual Studio Code? Get it now.
SQL Script Toolkit

SQL Script Toolkit

Johansel Santos

|
1 install
| (0) | Free
Generate and compare SQL Server object scripts (procedures, functions, views, triggers) straight from VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SQL Script Toolkit

Generate and compare SQL Server object scripts without leaving VS Code.

Pick a connection, pick a database, pick an object: get its CREATE/ALTER script in a new editor tab, or compare the same object between two databases side by side.

Features

  • Get Objects – Browse the stored procedures, functions, views and triggers of a database and open the script of any of them in a new SQL tab.
  • Compare Objects – Compare the script of an object between two databases (same server or a different one) in VS Code's diff editor.
  • One connection for everything – Connect once; both features reuse the same connection until you refresh it.
  • SQL Server Authentication and Windows Authentication – Windows Authentication works without typing a user or password.
  • Reuses your existing profiles – Connection profiles are read from the mssql.connections setting (the ones you already created with the SQL Server (mssql) extension), listed alphabetically.
  • Passwords stay secure – For SQL Server Authentication, the password is asked once and stored encrypted in VS Code's secret storage.

Requirements

  • VS Code 1.107.0 or later, or another editor based on a compatible version (for example Antigravity IDE).
  • At least one connection profile in the mssql.connections setting (created with the SQL Server (mssql) extension, or added manually to your settings.json).
  • Windows Authentication only: the sqlcmd command-line tool must be installed and reachable from your PATH.
    • It is included with the SQL Server command-line utilities, or you can install it with winget install sqlcmd.
    • If it is installed somewhere else, set sqlScriptToolkit.sqlcmdPath.

Getting started

  1. Open the Command Palette (F1 or Ctrl+Shift+P).
  2. Run SQL Script Toolkit - Get Objects (or Compare Objects).
  3. Choose a connection profile and then a database.
    • SQL Server Authentication profiles ask for the password the first time.
    • Windows Authentication profiles connect directly.
  4. Choose an object. The script opens in a new tab (Get Objects), or the diff opens after you choose the second database (Compare Objects).

Commands

Command What it does
SQL Script Toolkit - Get Objects Lists the objects of the selected database and opens the script of the one you choose.
SQL Script Toolkit - Compare Objects Compares an object between two databases in the diff editor.
SQL Script Toolkit - Refresh Connection Forgets the current connection, asks for a new profile and database, and then asks whether you want to get an object script or compare objects.

Keyboard shortcuts

Command Default shortcut Previous shortcut*
Get Objects Ctrl+Alt+G Ctrl+T
Compare Objects Ctrl+Alt+C Ctrl+K
Refresh Connection Ctrl+Alt+R –

*On first run the extension asks which set you prefer. You can switch at any time with the sqlScriptToolkit.useLegacyShortcuts setting, and you can remap any shortcut in Keyboard Shortcuts.

Extension settings

Setting Default Description
sqlScriptToolkit.defaultPort 1433 Port used when the profile does not specify one (applies to both features).
sqlScriptToolkit.includeDatabase true Add USE [database] and GO at the top of generated and compared scripts.
sqlScriptToolkit.useAlter false Convert CREATE into ALTER in generated scripts.
sqlScriptToolkit.clearConnectionAfterGenerateScript false Forget the connection after generating a script or running a comparison.
sqlScriptToolkit.sqlcmdPath sqlcmd Path to sqlcmd (Windows Authentication only).
sqlScriptToolkit.sqlcmdTrustServerCertificate true Pass -C to sqlcmd to trust the server certificate (Windows Authentication only).
sqlScriptToolkit.useLegacyShortcuts false Use the previous shortcuts (Ctrl+T / Ctrl+K) instead of the new ones.

Security and privacy

  • No telemetry. The extension only talks to the SQL Server you choose.
  • Passwords are stored in VS Code's encrypted secret storage, never in settings files. If a login fails, the saved password is discarded and you are asked again.
  • Connections are encrypted, but the server certificate is not validated (trustServerCertificate), which is common for internal servers with self-signed certificates.
  • The extension only reads object definitions (SELECT queries); it never modifies your databases.
  • Because it reads connection profiles from settings and can use your Windows credentials, it is disabled in untrusted workspaces.

Troubleshooting

Message What to do
No connection profiles found in mssql.connections Create a profile with the SQL Server (mssql) extension or add one to your settings.json.
Authentication type "..." is not supported Only SQL Login and Windows (Integrated) profiles are supported. Azure/Entra ID (MFA) is not.
sqlcmd not found Install sqlcmd or set sqlScriptToolkit.sqlcmdPath (Windows Authentication only).
Login fails after a password change Run Refresh Connection; you will be asked for the new password.
Object "..." does not exist in the second database The object was not found by name in the other database.

Known limitations

  • Objects are looked up by name only. If the same name exists in more than one schema, the first match is returned.
  • Tables are not listed; only procedures, functions, views and triggers.
  • Azure Active Directory / Entra ID (MFA) authentication is not supported.

Migrating from SQL Script Generator / SQL Script Compare

This extension replaces both. Uninstall the old ones to avoid duplicate commands and settings, and use:

  • SQL Script Generator → SQL Script Toolkit - Get Objects
  • SQL Script Compare → SQL Script Toolkit - Compare Objects
  • Both Refresh Connection commands → SQL Script Toolkit - Refresh Connection (old keyboard shortcuts pointing to the previous refresh commands keep working).

Settings now live under a single sqlScriptToolkit.* prefix. The old sqlScriptGenerator.* and sqlScriptCompare.* settings are not read anymore, so re-apply any custom values with the new names (includeUseDatabase in both old extensions is now sqlScriptToolkit.includeDatabase, and both "clear connection" options are now sqlScriptToolkit.clearConnectionAfterGenerateScript).

Release notes

See CHANGELOG.md.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft