The MSSQL Extension for Visual Studio Code is designed to empower developers by providing a seamless and modern database development experience. Our goal is to make SQL development more productive and intuitive by integrating essential features such as schema management, query execution, and AI-powered assistance.
The MSSQL extension provides a rich set of capabilities for SQL development. Each capability links to its detailed documentation on Microsoft Learn.
| Capability | Description |
|---|---|
| Connection Dialog | Connect using parameters, connection strings, or Azure/Fabric browse. Organize connections with color-coded groups |
| Object Explorer | Browse and filter database objects with type-aware search |
| Database Object Search | Search for tables, views, stored procedures, and other objects across a database |
| Fabric integration | Browse Fabric workspaces and provision SQL databases |
| Query Results | View, sort, copy, and export query results |
| Query Plan Visualizer | Analyze execution plans with interactive node navigation |
| Query Profiler | Real-time database activity monitoring with Extended Events |
| Table Designer | Create and manage tables with a visual interface |
| Schema Designer | Visual schema modeling with drag-and-drop, auto-layout, and T-SQL script generation |
| GitHub Copilot in Schema Designer | Natural language schema design within the visual Schema Designer |
| Schema Compare | Compare and synchronize schemas between databases or DACPACs |
| GitHub Copilot integration | AI-assisted SQL development with natural language chat and agent mode |
| Local SQL Server containers | Create and manage SQL Server containers locally |
| View & Edit Data | Browse and modify table data inline without writing T-SQL |
| Database Operations | Rename, back up, restore, import data from flat files, and drop databases from Object Explorer |
| Data-tier Application (DACPAC and BACPAC) | Deploy, extract, import, and export DACPAC and BACPAC files |
| Fabric integration | Browse Fabric workspaces and provision SQL databases |
| SQL Database Projects | Build, publish with the visual Publish Dialog, and analyze SQL projects with Code Analysis |
| Query Profiler | Real-time database activity monitoring with Extended Events |
| Backup and Restore | Back up and restore SQL Server databases |
| Flat File Import | Import flat files (CSV, TXT) as new database tables using a guided wizard |
| Object Search | Search for database objects by name across a server or database |
| Database Management | Create, rename, and drop databases |
| SQL Notebooks | Jupyter-based SQL notebooks with rich results and multi-kernel support |
| Data API builder | Create REST, GraphQL, and MCP endpoints for SQL databases |
| GitHub Copilot in Data API builder | Generate Data API builder configs using natural language |
| Azure SQL database provisioning | Create and connect to free tier Azure SQL database |
| Shortcuts Configuration | Create and manage keyboard shortcuts for Quick Queries, Query Editor, and Results Grid |
| Capability | Description |
|---|---|
| New Query Results Grid | New results grid experience with more column customizations (freeze, show, hide) |
| New SQL Formatter | SQL formatter with more formatting options |
Follow these steps to get started with the MSSQL extension:
F1, then type Install Extensions)..sql file. To manually set language mode, press Ctrl+K M and select SQL.F1, type MS SQL: Manage Connection Profile, and follow the prompts to create a profile. See manage connection profiles for advanced options.F1 > MS SQL: Connect or the shortcut Ctrl+Shift+C.sql to explore available snippets.F1), or use the shortcut:Ctrl+Shift+ECmd+Shift+Esettings.json. See customize shortcuts for help.Press F1 and type MS SQL to see all available commands. Here are the most commonly used:
Connections
Queries
Local Development
Data
.dacpac and .bacpac filesCopilot
Configure the MSSQL extension in user preferences (Cmd+,) or workspace settings (.vscode/settings.json). For the complete reference with descriptions for all settings, see Customize Options on the wiki.
// General
{
"mssql.enableExperimentalFeatures": false, // Enable experimental features for early testing
"mssql.messagesDefaultOpen": true, // Show messages panel by default after query execution
"mssql.autoRevealResultsPanel": false, // Auto-reveal results panel when queries execute
"mssql.statusBar.connectionInfoMaxLength": -1, // Max characters to display in status bar (-1 = unlimited)
"mssql.statusBar.enableConnectionColor": true, // Color-code status bar by connection group
"mssql.schemaDesigner.enableExpandCollapseButtons": true, // Show expand/collapse buttons in Schema Designer UI for entity relationships
"mssql.showChangelogOnUpdate": true, // Show changelog when extension updates
}
// Connectivity
{
"mssql.maxRecentConnections": 5, // Number of recent connections to display (0-50)
"mssql.connectionManagement.rememberPasswordsUntilRestart": true, // Keep passwords in memory until VS Code restarts
"mssql.enableConnectionPooling": false, // Enable connection pooling for improved performance
"mssql.azureActiveDirectory": "AuthCodeGrant" // Azure AD auth method: "AuthCodeGrant" or "DeviceCode"
"mssql.preview.useVscodeAccountsForEntraMFA": true, // Whether to use accounts signed into VS Code for authenticating to databases with Microsoft Entra ID Universal with MFA
"mssql.newEditorConnectionBehavior": "transferACtive", // How to connect a newly-opened .SQL file or query editor: "none" | "transferActive" | "defaultConnection"
"mssql.defaultConnectionId": "", // Connection ID (GUID) of the connection to auto-connect new editors with. Only applicable when "mssql.newEditorConnectionBehavior" is set to "defaultConnection"
}
// Query Formatting
{
"mssql.format.enablePreviewFormatter": true, // (Preview) Use the new SQL formatter with additional formatting options
"mssql.format.alignColumnDefinitionsInColumns": false, // Align column definitions in CREATE TABLE statements
"mssql.format.datatypeCasing": "none", // Datatype casing: "none" | "uppercase" | "lowercase"
"mssql.format.keywordCasing": "none", // SQL keyword casing: "none" | "uppercase" | "lowercase"
"mssql.format.placeCommasBeforeNextStatement": false, // Place commas before next item (procedural style)
"mssql.format.placeSelectStatementReferencesOnNewLine": false // Put SELECT references on new lines
}
// IntelliSense
{
"mssql.intelliSense.enableIntelliSense": true, // Enable IntelliSense for T-SQL code completion
"mssql.intelliSense.enableErrorChecking": true, // Enable real-time syntax and semantic error checking
"mssql.intelliSense.enableSuggestions": true, // Enable code suggestions and autocompletion
"mssql.intelliSense.enableQuickInfo": true // Show quick info tooltips on hover
}
// Query Execution
{
"mssql.query.displayBitAsNumber": true, // Display bit values as 0/1 instead of false/true
"mssql.query.preventAutoExecuteScript": false, // Prevent auto-execution of scripts on file open
"mssql.query.maxCharsToStore": 65535, // Maximum characters to store per result cell
"mssql.query.maxXmlCharsToStore": 2097152, // Maximum characters for XML data in results
"mssql.query.rowCount": 0, // SET ROWCOUNT value (0 = unlimited rows returned)
"mssql.query.textSize": 2147483647, // SET TEXTSIZE for text/ntext columns (bytes)
"mssql.query.executionTimeout": 0, // Query timeout in seconds (0 = no timeout)
"mssql.query.noCount": false, // Execute SET NOCOUNT ON (suppresses row count message)
"mssql.query.noExec": false, // Parse only without executing (SET NOEXEC ON)
"mssql.query.showActiveConnectionAsCodeLensSuggestion": true // Show active connection as CodeLens suggestion
}
// Advanced Query Execution (T-SQL SET Options)
{
"mssql.query.parseOnly": false, // Parse queries without executing (SET PARSEONLY ON)
"mssql.query.arithAbort": true, // Terminate query on overflow/divide-by-zero (SET ARITHABORT ON)
"mssql.query.statisticsTime": false, // Display execution time statistics (SET STATISTICS TIME ON)
"mssql.query.statisticsIO": false, // Display I/O statistics (SET STATISTICS IO ON)
"mssql.query.xactAbortOn": false, // Rollback transaction on error (SET XACT_ABORT ON)
"mssql.query.transactionIsolationLevel": "READ COMMITTED", // Transaction isolation: "READ COMMITTED" | "READ UNCOMMITTED" | "REPEATABLE READ" | "SERIALIZABLE"
"mssql.query.deadlockPriority": "Normal", // Deadlock priority: "Normal" | "Low"
"mssql.query.lockTimeout": -1, // Lock timeout in milliseconds (-1 = wait indefinitely)
"mssql.query.queryGovernorCostLimit": -1, // Query governor cost limit (-1 = no limit)
"mssql.query.ansiDefaults": false, // Enable ANSI defaults (SET ANSI_DEFAULTS ON)
"mssql.query.quotedIdentifier": true, // Use quoted identifiers (SET QUOTED_IDENTIFIER ON)
"mssql.query.ansiNullDefaultOn": true, // New columns allow nulls by default (SET ANSI_NULL_DFLT_ON)
"mssql.query.implicitTransactions": false, // Enable implicit transactions (SET IMPLICIT_TRANSACTIONS ON)
"mssql.query.cursorCloseOnCommit": false, // Close cursors on commit (SET CURSOR_CLOSE_ON_COMMIT ON)
"mssql.query.ansiPadding": true, // ANSI padding for char/varchar (SET ANSI_PADDING ON)
"mssql.query.ansiWarnings": true, // ANSI warnings for aggregates/nulls (SET ANSI_WARNINGS ON)
"mssql.query.ansiNulls": true, // ANSI null comparison behavior (SET ANSI_NULLS ON)
"mssql.query.alwaysEncryptedParameterization": false // Enable Always Encrypted parameterization
}
// Query Results & Grid
{
"mssql.openQueryResultsInTabByDefault": false, // Open query results in a tab instead of side panel
"mssql.preview.betaResultsGrid": false, // (Preview) Enable the new query results grid with improved state management and column show/hide/freeze options
"mssql.preview.betaExecutionPlan": false, // (Preview) Enable the new execution plan viewer with improved performance
"mssql.resultsFontFamily": null, // Font family for results grid (null = VS Code default)
"mssql.resultsFontSize": null, // Font size for results grid in pixels (null = VS Code default)
"mssql.defaultQueryResultsViewMode": "Grid", // Default results view: "Grid" or "Text"
"mssql.showBatchTime": false, // Show batch execution time in results pane
"mssql.resultsGrid.autoSizeColumnsMode": "headersAndData", // Auto-size columns: "headersAndData" | "dataOnly" | "headerOnly" | "off"
"mssql.resultsGrid.inMemoryDataProcessingThreshold": 5000, // Rows threshold for in-memory processing
"mssql.splitPaneSelection": "next", // Focus after split pane: "next" | "current" | "end"
"mssql.persistQueryResultTabs": false, // Keep result tabs open after closing query file
"mssql.copyIncludeHeaders": false, // Include column headers when copying results
"mssql.copyRemoveNewLine": true, // Remove newline characters when copying
"mssql.messages.copyIncludeTimestamps": false, // Include message timestamps when using Copy All in the Messages pane
"mssql.saveAsCsv.includeHeaders": true, // Include column headers when saving as CSV
"mssql.saveAsCsv.delimiter": ",", // CSV delimiter: "," | "\\t" | ";" | "|"
"mssql.saveAsCsv.lineSeparator": null, // CSV line separator (null = OS default)
"mssql.saveAsCsv.textIdentifier": "\"", // CSV text identifier/quote character
"mssql.saveAsCsv.encoding": "utf-8", // CSV encoding: "utf-8" | "utf-16le" | "ascii" etc.
"mssql.enableQueryHistoryCapture": true, // Automatically capture all executed queries in history
"mssql.enableQueryHistoryFeature": true, // Enable the Query History feature and UI
"mssql.queryHistoryLimit": 20 // Maximum number of queries to retain in history
}
// Object Explorer
{
"mssql.objectExplorer.groupBySchema": false, // Group database objects by schema (tables, views, etc.)
"mssql.objectExplorer.collapseConnectionGroupsOnStartup": false, // Auto-collapse connection groups on extension startup
"mssql.objectExplorer.expandTimeout": 45 // Timeout in seconds for expanding object explorer node children
}
// Diagnostics & Logging
{
"mssql.tracingLevel": "Critical", // Logging level: "All" | "Off" | "Critical" | "Error" | "Warning" | "Information" | "Verbose"
"mssql.logDebugInfo": false, // Enable debug logging for troubleshooting
"mssql.logRetentionMinutes": 10080, // Log retention period in minutes (10080 = 7 days)
"mssql.logFilesRemovalLimit": 100 // Maximum number of log files to keep before cleanup
}
Customize keyboard shortcuts for query results, grid operations, and other actions. For the complete reference, see Customize Shortcuts on the wiki.
Coming from SSMS or Azure Data Studio? Install the Database Management Keymap companion extension to use familiar keyboard shortcuts like
F5(execute query) andCtrl+Shift+R(toggle query result panel) in VS Code.
For full details on all extension settings and keyboard shortcuts, see the wiki:
// Shortcuts
{
"mssql.shortcuts": {
"event.queryResults.switchToResultsTab": "ctrl+alt+R",
"event.queryResults.switchToMessagesTab": "ctrl+alt+Y",
"event.queryResults.switchToQueryPlanTab": "ctrl+alt+E",
"event.queryResults.prevGrid": "ctrlcmd+up",
"event.queryResults.nextGrid": "ctrlcmd+down",
"event.queryResults.switchToTextView": "",
"event.queryResults.maximizeGrid": "",
"event.queryResults.saveAsJSON": "",
"event.queryResults.saveAsCSV": "",
"event.queryResults.saveAsExcel": "",
"event.queryResults.saveAsInsert": "",
"event.resultGrid.copySelection": "ctrlcmd+c",
"event.resultGrid.copyWithHeaders": "",
"event.resultGrid.copyAllHeaders": "",
"event.resultGrid.selectAll": "ctrlcmd+a",
"event.resultGrid.copyAsCSV": "",
"event.resultGrid.copyAsJSON": "",
"event.resultGrid.copyAsInsert": "",
"event.resultGrid.copyAsInClause": "",
"event.resultGrid.changeColumnWidth": "alt+shift+s",
"event.resultGrid.expandSelectionLeft": "shift+left",
"event.resultGrid.expandSelectionRight": "shift+right",
"event.resultGrid.expandSelectionUp": "shift+up",
"event.resultGrid.expandSelectionDown": "shift+down",
"event.resultGrid.openColumnMenu": "f3",
"event.resultGrid.openFilterMenu": "",
"event.resultGrid.moveToRowStart": "ctrlcmd+left",
"event.resultGrid.moveToRowEnd": "ctrlcmd+right",
"event.resultGrid.selectColumn": "ctrl+space",
"event.resultGrid.selectRow": "shift+space",
"event.resultGrid.toggleSort": "alt+shift+o"
}
}
The extension will download and install a required SqlToolsService package during activation. For machines with no Internet access, you can still use the extension by choosing the Install from VSIX... option in the extension view and installing a bundled release from our Releases page.
Each operating system has a .vsix file with the required service included. Pick the file for your OS, download and install to get started. We recommend you choose a full release and ignore any alpha or beta releases as these are our daily builds used in testing.
View the change log in the extension via the MS SQL: Show Change Log command, or browse the full change log on GitHub. The change log is also shown automatically on first install and after updates.
Support for this extension is provided via GitHub issues. You can submit a bug report, a feature suggestion or participate in discussions.
See the development guide for setup, build, test, localization, and debugging workflows. See the contributing guide for the contribution process.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This extension collects telemetry data, which is used to help understand how to improve the product. For example, this usage data helps to debug issues, such as slow start-up times, and to prioritize new features. While we appreciate the insights this data provides, we also know that not everyone wants to send usage data and you can disable telemetry as described in the VS Code disable telemetry reporting documentation.
Administrators can set or disable feedback and telemetry collection across their entire organization/tenant with the same mechanism. Learn more about setting feedback and telemetry collection policy and centrally managing VS Code settings with policies.
The Microsoft Enterprise and Developer Privacy Statement describes the privacy statement of this software.
This extension is licensed under the MIT License. Please see the third-party notices file for additional copyright notices and license terms applicable to portions of the software.
(top 30 of 98)
TypeScript
96.5%
JavaScript
2.0%
The MSSQL Extension for Visual Studio Code is designed to empower developers by providing a seamless and modern database development experience. Our goal is to make SQL development more productive and intuitive by integrating essential features such as schema management, query execution, and AI-powered assistance.
The MSSQL extension provides a rich set of capabilities for SQL development. Each capability links to its detailed documentation on Microsoft Learn.
| Capability | Description |
|---|---|
| Connection Dialog | Connect using parameters, connection strings, or Azure/Fabric browse. Organize connections with color-coded groups |
| Object Explorer | Browse and filter database objects with type-aware search |
| Database Object Search | Search for tables, views, stored procedures, and other objects across a database |
| Fabric integration | Browse Fabric workspaces and provision SQL databases |
| Query Results | View, sort, copy, and export query results |
| Query Plan Visualizer | Analyze execution plans with interactive node navigation |
| Query Profiler | Real-time database activity monitoring with Extended Events |
| Table Designer | Create and manage tables with a visual interface |
| Schema Designer | Visual schema modeling with drag-and-drop, auto-layout, and T-SQL script generation |
| GitHub Copilot in Schema Designer | Natural language schema design within the visual Schema Designer |
| Schema Compare | Compare and synchronize schemas between databases or DACPACs |
| GitHub Copilot integration | AI-assisted SQL development with natural language chat and agent mode |
| Local SQL Server containers | Create and manage SQL Server containers locally |
| View & Edit Data | Browse and modify table data inline without writing T-SQL |
| Database Operations | Rename, back up, restore, import data from flat files, and drop databases from Object Explorer |
| Data-tier Application (DACPAC and BACPAC) | Deploy, extract, import, and export DACPAC and BACPAC files |
| Fabric integration | Browse Fabric workspaces and provision SQL databases |
| SQL Database Projects | Build, publish with the visual Publish Dialog, and analyze SQL projects with Code Analysis |
| Query Profiler | Real-time database activity monitoring with Extended Events |
| Backup and Restore | Back up and restore SQL Server databases |
| Flat File Import | Import flat files (CSV, TXT) as new database tables using a guided wizard |
| Object Search | Search for database objects by name across a server or database |
| Database Management | Create, rename, and drop databases |
| SQL Notebooks | Jupyter-based SQL notebooks with rich results and multi-kernel support |
| Data API builder | Create REST, GraphQL, and MCP endpoints for SQL databases |
| GitHub Copilot in Data API builder | Generate Data API builder configs using natural language |
| Azure SQL database provisioning | Create and connect to free tier Azure SQL database |
| Shortcuts Configuration | Create and manage keyboard shortcuts for Quick Queries, Query Editor, and Results Grid |
| Capability | Description |
|---|---|
| New Query Results Grid | New results grid experience with more column customizations (freeze, show, hide) |
| New SQL Formatter | SQL formatter with more formatting options |
Follow these steps to get started with the MSSQL extension:
F1, then type Install Extensions)..sql file. To manually set language mode, press Ctrl+K M and select SQL.F1, type MS SQL: Manage Connection Profile, and follow the prompts to create a profile. See manage connection profiles for advanced options.F1 > MS SQL: Connect or the shortcut Ctrl+Shift+C.sql to explore available snippets.F1), or use the shortcut:Ctrl+Shift+ECmd+Shift+Esettings.json. See customize shortcuts for help.Press F1 and type MS SQL to see all available commands. Here are the most commonly used:
Connections
Queries
Local Development
Data
.dacpac and .bacpac filesCopilot
Configure the MSSQL extension in user preferences (Cmd+,) or workspace settings (.vscode/settings.json). For the complete reference with descriptions for all settings, see Customize Options on the wiki.
// General
{
"mssql.enableExperimentalFeatures": false, // Enable experimental features for early testing
"mssql.messagesDefaultOpen": true, // Show messages panel by default after query execution
"mssql.autoRevealResultsPanel": false, // Auto-reveal results panel when queries execute
"mssql.statusBar.connectionInfoMaxLength": -1, // Max characters to display in status bar (-1 = unlimited)
"mssql.statusBar.enableConnectionColor": true, // Color-code status bar by connection group
"mssql.schemaDesigner.enableExpandCollapseButtons": true, // Show expand/collapse buttons in Schema Designer UI for entity relationships
"mssql.showChangelogOnUpdate": true, // Show changelog when extension updates
}
// Connectivity
{
"mssql.maxRecentConnections": 5, // Number of recent connections to display (0-50)
"mssql.connectionManagement.rememberPasswordsUntilRestart": true, // Keep passwords in memory until VS Code restarts
"mssql.enableConnectionPooling": false, // Enable connection pooling for improved performance
"mssql.azureActiveDirectory": "AuthCodeGrant" // Azure AD auth method: "AuthCodeGrant" or "DeviceCode"
"mssql.preview.useVscodeAccountsForEntraMFA": true, // Whether to use accounts signed into VS Code for authenticating to databases with Microsoft Entra ID Universal with MFA
"mssql.newEditorConnectionBehavior": "transferACtive", // How to connect a newly-opened .SQL file or query editor: "none" | "transferActive" | "defaultConnection"
"mssql.defaultConnectionId": "", // Connection ID (GUID) of the connection to auto-connect new editors with. Only applicable when "mssql.newEditorConnectionBehavior" is set to "defaultConnection"
}
// Query Formatting
{
"mssql.format.enablePreviewFormatter": true, // (Preview) Use the new SQL formatter with additional formatting options
"mssql.format.alignColumnDefinitionsInColumns": false, // Align column definitions in CREATE TABLE statements
"mssql.format.datatypeCasing": "none", // Datatype casing: "none" | "uppercase" | "lowercase"
"mssql.format.keywordCasing": "none", // SQL keyword casing: "none" | "uppercase" | "lowercase"
"mssql.format.placeCommasBeforeNextStatement": false, // Place commas before next item (procedural style)
"mssql.format.placeSelectStatementReferencesOnNewLine": false // Put SELECT references on new lines
}
// IntelliSense
{
"mssql.intelliSense.enableIntelliSense": true, // Enable IntelliSense for T-SQL code completion
"mssql.intelliSense.enableErrorChecking": true, // Enable real-time syntax and semantic error checking
"mssql.intelliSense.enableSuggestions": true, // Enable code suggestions and autocompletion
"mssql.intelliSense.enableQuickInfo": true // Show quick info tooltips on hover
}
// Query Execution
{
"mssql.query.displayBitAsNumber": true, // Display bit values as 0/1 instead of false/true
"mssql.query.preventAutoExecuteScript": false, // Prevent auto-execution of scripts on file open
"mssql.query.maxCharsToStore": 65535, // Maximum characters to store per result cell
"mssql.query.maxXmlCharsToStore": 2097152, // Maximum characters for XML data in results
"mssql.query.rowCount": 0, // SET ROWCOUNT value (0 = unlimited rows returned)
"mssql.query.textSize": 2147483647, // SET TEXTSIZE for text/ntext columns (bytes)
"mssql.query.executionTimeout": 0, // Query timeout in seconds (0 = no timeout)
"mssql.query.noCount": false, // Execute SET NOCOUNT ON (suppresses row count message)
"mssql.query.noExec": false, // Parse only without executing (SET NOEXEC ON)
"mssql.query.showActiveConnectionAsCodeLensSuggestion": true // Show active connection as CodeLens suggestion
}
// Advanced Query Execution (T-SQL SET Options)
{
"mssql.query.parseOnly": false, // Parse queries without executing (SET PARSEONLY ON)
"mssql.query.arithAbort": true, // Terminate query on overflow/divide-by-zero (SET ARITHABORT ON)
"mssql.query.statisticsTime": false, // Display execution time statistics (SET STATISTICS TIME ON)
"mssql.query.statisticsIO": false, // Display I/O statistics (SET STATISTICS IO ON)
"mssql.query.xactAbortOn": false, // Rollback transaction on error (SET XACT_ABORT ON)
"mssql.query.transactionIsolationLevel": "READ COMMITTED", // Transaction isolation: "READ COMMITTED" | "READ UNCOMMITTED" | "REPEATABLE READ" | "SERIALIZABLE"
"mssql.query.deadlockPriority": "Normal", // Deadlock priority: "Normal" | "Low"
"mssql.query.lockTimeout": -1, // Lock timeout in milliseconds (-1 = wait indefinitely)
"mssql.query.queryGovernorCostLimit": -1, // Query governor cost limit (-1 = no limit)
"mssql.query.ansiDefaults": false, // Enable ANSI defaults (SET ANSI_DEFAULTS ON)
"mssql.query.quotedIdentifier": true, // Use quoted identifiers (SET QUOTED_IDENTIFIER ON)
"mssql.query.ansiNullDefaultOn": true, // New columns allow nulls by default (SET ANSI_NULL_DFLT_ON)
"mssql.query.implicitTransactions": false, // Enable implicit transactions (SET IMPLICIT_TRANSACTIONS ON)
"mssql.query.cursorCloseOnCommit": false, // Close cursors on commit (SET CURSOR_CLOSE_ON_COMMIT ON)
"mssql.query.ansiPadding": true, // ANSI padding for char/varchar (SET ANSI_PADDING ON)
"mssql.query.ansiWarnings": true, // ANSI warnings for aggregates/nulls (SET ANSI_WARNINGS ON)
"mssql.query.ansiNulls": true, // ANSI null comparison behavior (SET ANSI_NULLS ON)
"mssql.query.alwaysEncryptedParameterization": false // Enable Always Encrypted parameterization
}
// Query Results & Grid
{
"mssql.openQueryResultsInTabByDefault": false, // Open query results in a tab instead of side panel
"mssql.preview.betaResultsGrid": false, // (Preview) Enable the new query results grid with improved state management and column show/hide/freeze options
"mssql.preview.betaExecutionPlan": false, // (Preview) Enable the new execution plan viewer with improved performance
"mssql.resultsFontFamily": null, // Font family for results grid (null = VS Code default)
"mssql.resultsFontSize": null, // Font size for results grid in pixels (null = VS Code default)
"mssql.defaultQueryResultsViewMode": "Grid", // Default results view: "Grid" or "Text"
"mssql.showBatchTime": false, // Show batch execution time in results pane
"mssql.resultsGrid.autoSizeColumnsMode": "headersAndData", // Auto-size columns: "headersAndData" | "dataOnly" | "headerOnly" | "off"
"mssql.resultsGrid.inMemoryDataProcessingThreshold": 5000, // Rows threshold for in-memory processing
"mssql.splitPaneSelection": "next", // Focus after split pane: "next" | "current" | "end"
"mssql.persistQueryResultTabs": false, // Keep result tabs open after closing query file
"mssql.copyIncludeHeaders": false, // Include column headers when copying results
"mssql.copyRemoveNewLine": true, // Remove newline characters when copying
"mssql.messages.copyIncludeTimestamps": false, // Include message timestamps when using Copy All in the Messages pane
"mssql.saveAsCsv.includeHeaders": true, // Include column headers when saving as CSV
"mssql.saveAsCsv.delimiter": ",", // CSV delimiter: "," | "\\t" | ";" | "|"
"mssql.saveAsCsv.lineSeparator": null, // CSV line separator (null = OS default)
"mssql.saveAsCsv.textIdentifier": "\"", // CSV text identifier/quote character
"mssql.saveAsCsv.encoding": "utf-8", // CSV encoding: "utf-8" | "utf-16le" | "ascii" etc.
"mssql.enableQueryHistoryCapture": true, // Automatically capture all executed queries in history
"mssql.enableQueryHistoryFeature": true, // Enable the Query History feature and UI
"mssql.queryHistoryLimit": 20 // Maximum number of queries to retain in history
}
// Object Explorer
{
"mssql.objectExplorer.groupBySchema": false, // Group database objects by schema (tables, views, etc.)
"mssql.objectExplorer.collapseConnectionGroupsOnStartup": false, // Auto-collapse connection groups on extension startup
"mssql.objectExplorer.expandTimeout": 45 // Timeout in seconds for expanding object explorer node children
}
// Diagnostics & Logging
{
"mssql.tracingLevel": "Critical", // Logging level: "All" | "Off" | "Critical" | "Error" | "Warning" | "Information" | "Verbose"
"mssql.logDebugInfo": false, // Enable debug logging for troubleshooting
"mssql.logRetentionMinutes": 10080, // Log retention period in minutes (10080 = 7 days)
"mssql.logFilesRemovalLimit": 100 // Maximum number of log files to keep before cleanup
}
Customize keyboard shortcuts for query results, grid operations, and other actions. For the complete reference, see Customize Shortcuts on the wiki.
Coming from SSMS or Azure Data Studio? Install the Database Management Keymap companion extension to use familiar keyboard shortcuts like
F5(execute query) andCtrl+Shift+R(toggle query result panel) in VS Code.
For full details on all extension settings and keyboard shortcuts, see the wiki:
// Shortcuts
{
"mssql.shortcuts": {
"event.queryResults.switchToResultsTab": "ctrl+alt+R",
"event.queryResults.switchToMessagesTab": "ctrl+alt+Y",
"event.queryResults.switchToQueryPlanTab": "ctrl+alt+E",
"event.queryResults.prevGrid": "ctrlcmd+up",
"event.queryResults.nextGrid": "ctrlcmd+down",
"event.queryResults.switchToTextView": "",
"event.queryResults.maximizeGrid": "",
"event.queryResults.saveAsJSON": "",
"event.queryResults.saveAsCSV": "",
"event.queryResults.saveAsExcel": "",
"event.queryResults.saveAsInsert": "",
"event.resultGrid.copySelection": "ctrlcmd+c",
"event.resultGrid.copyWithHeaders": "",
"event.resultGrid.copyAllHeaders": "",
"event.resultGrid.selectAll": "ctrlcmd+a",
"event.resultGrid.copyAsCSV": "",
"event.resultGrid.copyAsJSON": "",
"event.resultGrid.copyAsInsert": "",
"event.resultGrid.copyAsInClause": "",
"event.resultGrid.changeColumnWidth": "alt+shift+s",
"event.resultGrid.expandSelectionLeft": "shift+left",
"event.resultGrid.expandSelectionRight": "shift+right",
"event.resultGrid.expandSelectionUp": "shift+up",
"event.resultGrid.expandSelectionDown": "shift+down",
"event.resultGrid.openColumnMenu": "f3",
"event.resultGrid.openFilterMenu": "",
"event.resultGrid.moveToRowStart": "ctrlcmd+left",
"event.resultGrid.moveToRowEnd": "ctrlcmd+right",
"event.resultGrid.selectColumn": "ctrl+space",
"event.resultGrid.selectRow": "shift+space",
"event.resultGrid.toggleSort": "alt+shift+o"
}
}
The extension will download and install a required SqlToolsService package during activation. For machines with no Internet access, you can still use the extension by choosing the Install from VSIX... option in the extension view and installing a bundled release from our Releases page.
Each operating system has a .vsix file with the required service included. Pick the file for your OS, download and install to get started. We recommend you choose a full release and ignore any alpha or beta releases as these are our daily builds used in testing.
View the change log in the extension via the MS SQL: Show Change Log command, or browse the full change log on GitHub. The change log is also shown automatically on first install and after updates.
Support for this extension is provided via GitHub issues. You can submit a bug report, a feature suggestion or participate in discussions.
See the development guide for setup, build, test, localization, and debugging workflows. See the contributing guide for the contribution process.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This extension collects telemetry data, which is used to help understand how to improve the product. For example, this usage data helps to debug issues, such as slow start-up times, and to prioritize new features. While we appreciate the insights this data provides, we also know that not everyone wants to send usage data and you can disable telemetry as described in the VS Code disable telemetry reporting documentation.
Administrators can set or disable feedback and telemetry collection across their entire organization/tenant with the same mechanism. Learn more about setting feedback and telemetry collection policy and centrally managing VS Code settings with policies.
The Microsoft Enterprise and Developer Privacy Statement describes the privacy statement of this software.
This extension is licensed under the MIT License. Please see the third-party notices file for additional copyright notices and license terms applicable to portions of the software.
(top 30 of 98)
TypeScript
96.5%
JavaScript
2.0%