SQL 工具概述SQL tools overview

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 数据库Azure SQL DatabaseYesAzure SQL 数据库Azure SQL Database 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance 是Azure Synapse AnalyticsAzure Synapse AnalyticsyesAzure Synapse AnalyticsAzure Synapse Analytics 是并行数据仓库Parallel Data Warehouseyes并行数据仓库Parallel Data Warehouse适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 数据库Azure SQL DatabaseYesAzure SQL 数据库Azure SQL Database 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance 是Azure Synapse AnalyticsAzure Synapse AnalyticsyesAzure Synapse AnalyticsAzure Synapse Analytics 是并行数据仓库Parallel Data Warehouseyes并行数据仓库Parallel Data Warehouse

若要管理数据库,需要一个工具。To manage your database, you need a tool. 无论数据库是在云中、Windows 上、macOS 上还是 Linux 上运行,工具都不需要与数据库在相同的平台上运行。Whether your databases run in the cloud, on Windows, on macOS, or on Linux, your tool doesn't need to run on the same platform as the database.

可以在下表中查看指向不同 SQL 工具的链接。You can view the links to the different SQL tools in the following tables.

备注

若要下载 SQL Server,请参阅安装 SQL ServerTo download SQL Server, see Install SQL Server.

以下工具提供了图形用户界面 (GUI)。The following tools provide a graphical user interface (GUI).

工具Tool 说明Description 操作系统Operating system
ADS 映像
Azure Data Studio
ADS image
Azure Data Studio
可以运行按需 SQL 查询,查看结果并将其保存为文本、JSON 或 Excel 格式的轻型编辑器。A light-weight editor that can run on-demand SQL queries, view and save results as text, JSON, or Excel. 编辑数据,组织你最喜欢的数据库连接,并以熟悉的对象浏览体验浏览数据库对象。Edit data, organize your favorite database connections, and browse database objects in a familiar object browsing experience. Windows
macOS
Linux
Windows
macOS
Linux
SSMS 映像
SQL Server Management Studio (SSMS)
SSMS image
SQL Server Management Studio (SSMS)
管理具有完整 GUI 支持的 SQL Server 实例或数据库。Manage a SQL Server instance or database with full GUI support. 访问、配置、管理和开发 SQL Server、Azure SQL 数据库和 Azure Synapse Analytics 的所有组件。Access, configure, manage, administer, and develop all components of SQL Server, Azure SQL Database, and Azure Synapse Analytics. 在一个综合实用工具中汇集了大量图形工具和丰富的脚本编辑器,为各种技能水平的开发者和数据库管理员提供对 SQL 的访问权限。Provides a single comprehensive utility that combines a broad group of graphical tools with a number of rich script editors to provide access to SQL for developers and database administrators of all skill levels. WindowsWindows
SSDT 映像
SQL Server Data Tools (SSDT)
SSDT image
SQL Server Data Tools (SSDT)
一款新式开发工具,用于生成 SQL Server 关系数据库、Azure SQL 数据库、Analysis Services (AS) 数据模型、Integration Services (IS) 包和 Reporting Services (RS) 报表。A modern development tool for building SQL Server relational databases, Azure SQL databases, Analysis Services (AS) data models, Integration Services (IS) packages, and Reporting Services (RS) reports. 使用 SSDT,你可以设计和部署任何 SQL Server 内容类型,就像在 Visual Studio 中开发应用程序一样轻松。With SSDT, you can design and deploy any SQL Server content type with the same ease as you would develop an application in Visual Studio. WindowsWindows
VS Code 映像
Visual Studio Code
VS Code image
Visual Studio Code
Visual Studio Code 的 mssql 扩展 为官方 Visual Studio Code 扩展,它支持连接到 SQL Server,并在 Visual Studio Code 中为 T-SQL 提供丰富的编辑体验。The mssql extension for Visual Studio Code is the official SQL Server extension that supports connections to SQL Server and rich editing experience for T-SQL in Visual Studio Code. 在轻型编辑器中编写 T-SQL 脚本。Write T-SQL scripts in a light-weight editor. Windows
macOS
Linux
Windows
macOS
Linux

命令行工具Command-line tools

以下工具是主要的命令行工具。The tools below are the main command-line tools.

工具Tool 说明Description 操作系统Operating system
bcpbcp 大容量复制程序实用工具 (bcp) 可以在 MicrosoftMicrosoft SQL ServerSQL Server 实例和用户指定格式的数据文件间大容量复制数据 。The bulk copy program utility (bcp) bulk copies data between an instance of MicrosoftMicrosoft SQL ServerSQL Server and a data file in a user-specified format. Windows
macOS
Linux
Windows
macOS
Linux
mssql-cli(预览版) mssql-cli (preview) mssql-cli 是一项用于查询 SQL Server 的交互式命令行工具。mssql-cli is an interactive command-line tool for querying SQL Server. 此外,使用具有 IntelliSense、语法高亮等功能的命令行工具查询 SQL Server。Also, query SQL Server with a command-line tool that features IntelliSense, syntax high-lighting, and more. Windows
macOS
Linux
Windows
macOS
Linux
mssql-confmssql-conf mssql-conf 配置在 Linux 上运行的 SQL Server。mssql-conf configures SQL Server running on Linux. LinuxLinux
mssql-scripter(预览版) mssql-scripter (preview) mssql-scripter 是 SQL Server 数据库的多平台命令行体验。mssql-scripter is a multi-platform command-line experience for scripting SQL Server databases. Windows
macOS
Linux
Windows
macOS
Linux
sqlcmdsqlcmd 可以在命令提示符下,使用 sqlcmd 实用工具输入 Transact-SQL 语句、系统过程和脚本文件。sqlcmd utility lets you enter Transact-SQL statements, system procedures, and script files at the command prompt. Windows
macOS
Linux
Windows
macOS
Linux
sqlpackagesqlpackage sqlpackage 是一个命令行实用工具,可自动处理多个数据库开发任务。sqlpackage is a command-line utility that automates several database development tasks. Windows
macOS
Linux
Windows
macOS
Linux
SQL Server PowerShellSQL Server PowerShell SQL Server PowerShell 提供了用于处理 SQL 的 cmdlet。SQL Server PowerShell provides cmdlets for working with SQL. Windows
macOS
Linux
Windows
macOS
Linux

迁移和其他工具Migration and other tools

这些工具用于迁移、配置和提供 SQL 数据库的其他功能。These tools are used to migrate, configure, and provide other features for SQL databases.

工具Tool 说明Description
配置管理器Configuration Manager 使用 SQL Server 配置管理器可以配置 SQL Server 服务和网络连接。Use SQL Server Configuration Manager to configure SQL Server services and configure network connectivity. 配置管理器在 Windows 上运行Configuration Manager runs on Windows
数据库实验助手Database Experimentation Assistant 使用数据库实验助手对给定工作负载的 SQL 目标版本进行评估。Use Database Experimentation Assistant to evaluate a targeted version of SQL for a given workload.
数据迁移助手Data Migration Assistant 数据迁移助手工具可以检测可能会影响新版 SQL Server 或 Azure SQL 数据库中数据库功能的兼容性问题,有助于你升级到新式数据平台。The Data Migration Assistant tool helps you upgrade to a modern data platform by detecting compatibility issues that can impact database functionality in your new version of SQL Server or Azure SQL Database.
Distributed ReplayDistributed Replay Distributed Replay 功能可帮助你评估即将进行的 SQL Server 升级的影响。Use the Distributed Replay feature to help you assess the impact of future SQL Server upgrades. 还可以使用 Distributed Replay 来帮助评估硬件和操作系统升级以及 SQL Server 优化的影响。Also use Distributed Replay to help assess the impact of hardware and operating system upgrades, and SQL Server tuning.
ssbdiagnosessbdiagnose ssbdiagnose 实用工具可报告 Service Broker 会话或 Service Broker 服务配置中的问题。The ssbdiagnose utility reports issues in Service Broker conversations or the configuration of Service Broker services.
SQL Server 迁移助手SQL Server Migration Assistant 使用 SQL Server Migration Assistant 自动将数据库从 Microsoft Access、DB2、MySQL、Oracle 和 Sybase 迁移到 SQL Server。Use SQL Server Migration Assistant to automate database migration to SQL Server from Microsoft Access, DB2, MySQL, Oracle, and Sybase.

如果你正在寻找该页未提及的其他工具,请参阅 SQL 命令提示实用工具下载 SQL Server 扩展功能和工具If you're looking for additional tools that aren't mentioned on this page, see SQL Command Prompt Utilities and Download SQL Server extended features and tools