1. Microsoft Sql Server
  2. Sql Server 2016 Sp2 Download
-->

It's built using Cocoa, so it looks a lot better and feels more like an Mac OS X application than all the Java-based application mentioned here. It uses JDBC drivers to connect to Microsoft SQL Server 2005, FrontBase, MySQL, OpenBase, Oracle, PostgreSQL, and Sybase. Free trial or $59. Aug 28, 2014 Microsoft does not make a native Mac port of SQL Server Express. You would have to install SQL Server on Windows. Windows can run on a Mac as a virtual machine using VMWare Fusion or Parallels. Then you can install SQL Server on the Windows VM.

APPLIES TO: SQL Server (Linux only) Azure SQL Database Azure Synapse Analytics (SQL DW) Parallel Data Warehouse

In this quickstart, you use Docker to pull and run the SQL Server 2017 container image, mssql-server-linux. Then connect with sqlcmd to create your first database and run queries.

Tip

If you want to run SQL Server 2019 containers, see the SQL Server 2019 version of this article.

Note

Starting with SQL Server 2019 CU3, Ubuntu 18.04 is supported.

In this quickstart, you use Docker to pull and run the SQL Server 2019 container image, mssql-server. Then connect with sqlcmd to create your first database and run queries.

Tip

This quickstart creates SQL Server 2019 containers. If you prefer to create SQL Server 2017 containers, see the SQL Server 2017 version of this article.

This image consists of SQL Server running on Linux based on Ubuntu 18.04. It can be used with the Docker Engine 1.8+ on Linux or on Docker for Mac/Windows. This quickstart specifically focuses on using the SQL Server on linux image. The Windows image is not covered, but you can learn more about it on the mssql-server-windows-developer Docker Hub page.

Prerequisites

  • Docker Engine 1.8+ on any supported Linux distribution or Docker for Mac/Windows. For more information, see Install Docker.
  • Docker overlay2 storage driver. This is the default for most users. If you find that you are not using this storage provider and need to change, please see the instructions and warnings in the docker documentation for configuring overlay2.
  • Minimum of 2 GB of disk space.
  • Minimum of 2 GB of RAM.
  • System requirements for SQL Server on Linux.

Pull and run the container image

Before starting the following steps, make sure that you have selected your preferred shell (bash, PowerShell, or cmd) at the top of this article.

  1. Pull the SQL Server 2017 Linux container image from Microsoft Container Registry.

    Tip

    If you want to run SQL Server 2019 containers, see the SQL Server 2019 version of this article.

    The previous command pulls the latest SQL Server 2017 container image. If you want to pull a specific image, you add a colon and the tag name (for example, mcr.microsoft.com/mssql/server:2017-GA-ubuntu). To see all available images, see the mssql-server Docker hub page.

    For the bash commands in this article, sudo is used. On macOS, sudo might not be required. On Linux, if you do not want to use sudo to run Docker, you can configure a docker group and add users to that group. For more information, see Post-installation steps for Linux.

  2. To run the container image with Docker, you can use the following command from a bash shell (Linux/macOS) or elevated PowerShell command prompt.

    Note

    The password should follow the SQL Server default password policy, otherwise the container can not setup SQL server and will stop working. By default, the password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols. You can examine the error log by executing the docker logs command.

    Note

    By default, this creates a container with the Developer edition of SQL Server 2017. The process for running production editions in containers is slightly different. For more information, see Run production container images.

    The following table provides a description of the parameters in the previous docker run example:

    ParameterDescription
    -e 'ACCEPT_EULA=Y'Set the ACCEPT_EULA variable to any value to confirm your acceptance of the End-User Licensing Agreement. Required setting for the SQL Server image.
    -e 'SA_PASSWORD=<YourStrong@Passw0rd>'Specify your own strong password that is at least 8 characters and meets the SQL Server password requirements. Required setting for the SQL Server image.
    -p 1433:1433Map a TCP port on the host environment (first value) with a TCP port in the container (second value). In this example, SQL Server is listening on TCP 1433 in the container and this is exposed to the port, 1433, on the host.
    --name sql1Specify a custom name for the container rather than a randomly generated one. If you run more than one container, you cannot reuse this same name.
    -d mcr.microsoft.com/mssql/server:2017-latestThe SQL Server 2017 Linux container image.
  3. To view your Docker containers, use the docker ps command.

    You should see output similar to the following screenshot:

  4. If the STATUS column shows a status of Up, then SQL Server is running in the container and listening on the port specified in the PORTS column. If the STATUS column for your SQL Server container shows Exited, see the Troubleshooting section of the configuration guide.

The -h (host name) parameter is also useful, but it is not used in this tutorial for simplicity. This changes the internal name of the container to a custom value. This is the name you'll see returned in the following Transact-SQL query:

Setting -h and --name to the same value is a good way to easily identify the target container.

Pull and run the container image

Before starting the following steps, make sure that you have selected your preferred shell (bash, PowerShell, or cmd) at the top of this article.

  1. Pull the SQL Server 2019 Linux container image from Docker Hub.

    Tip

    This quickstart uses the SQL Server 2019 Docker image. If you want to run the SQL Server 2017 image, see the SQL Server 2017 version of this article.

    The previous command pulls the SQL Server 2019 container image based on Ubuntu. To instead use container images based on RedHat, see Run RHEL-based container images. To see all available images, see the mssql-server-linux Docker hub page.

    For the bash commands in this article, sudo is used. On macOS, sudo might not be required. On Linux, if you do not want to use sudo to run Docker, you can configure a docker group and add users to that group. For more information, see Post-installation steps for Linux.

  2. To run the container image with Docker, you can use the following command from a bash shell (Linux/macOS) or elevated PowerShell command prompt.

    Note

    The password should follow the SQL Server default password policy, otherwise the container can not setup SQL server and will stop working. By default, the password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols. You can examine the error log by executing the docker logs command.

    Note

    By default, this creates a container with the Developer edition of SQL Server 2019.

    The following table provides a description of the parameters in the previous docker run example:

    ParameterDescription
    -e 'ACCEPT_EULA=Y'Set the ACCEPT_EULA variable to any value to confirm your acceptance of the End-User Licensing Agreement. Required setting for the SQL Server image.
    -e 'SA_PASSWORD=<YourStrong@Passw0rd>'Specify your own strong password that is at least 8 characters and meets the SQL Server password requirements. Required setting for the SQL Server image.
    -p 1433:1433Map a TCP port on the host environment (first value) with a TCP port in the container (second value). In this example, SQL Server is listening on TCP 1433 in the container and this is exposed to the port, 1433, on the host.
    --name sql1Specify a custom name for the container rather than a randomly generated one. If you run more than one container, you cannot reuse this same name.
    mcr.microsoft.com/mssql/server:2019-CU3-ubuntu-18.04The SQL Server 2019 Ubuntu Linux container image.
  3. To view your Docker containers, use the docker ps command.

    You should see output similar to the following screenshot:

  4. If the STATUS column shows a status of Up, then SQL Server is running in the container and listening on the port specified in the PORTS column. If the STATUS column for your SQL Server container shows Exited, see the Troubleshooting section of the configuration guide.

The -h (host name) parameter is also useful, but it is not used in this tutorial for simplicity. This changes the internal name of the container to a custom value. This is the name you'll see returned in the following Transact-SQL query:

Setting -h and --name to the same value is a good way to easily identify the target container.

Change the SA password

The SA account is a system administrator on the SQL Server instance that gets created during setup. After creating your SQL Server container, the SA_PASSWORD environment variable you specified is discoverable by running echo $SA_PASSWORD in the container. For security purposes, change your SA password.

  1. Choose a strong password to use for the SA user.

  2. Use docker exec to run sqlcmd to change the password using Transact-SQL. In the following example, replace the old password, <YourStrong!Passw0rd>, and the new password, <YourNewStrong!Passw0rd>, with your own password values.

Connect to SQL Server

The following steps use the SQL Server command-line tool, sqlcmd, inside the container to connect to SQL Server.

  1. Use the docker exec -it command to start an interactive bash shell inside your running container. In the following example sql1 is name specified by the --name parameter when you created the container.

  2. Once inside the container, connect locally with sqlcmd. Sqlcmd is not in the path by default, so you have to specify the full path.

    Tip

    You can omit the password on the command-line to be prompted to enter it.

  3. If successful, you should get to a sqlcmd command prompt: 1>.

Create and query data

The following sections walk you through using sqlcmd and Transact-SQL to create a new database, add data, and run a simple query.

Create a new database

The following steps create a new database named TestDB.

  1. From the sqlcmd command prompt, paste the following Transact-SQL command to create a test database:

  2. On the next line, write a query to return the name of all of the databases on your server:

  3. The previous two commands were not executed immediately. You must type GO on a new line to execute the previous commands:

Insert data

Next create a new table, Inventory, and insert two new rows.

  1. From the sqlcmd command prompt, switch context to the new TestDB database:

  2. Create new table named Inventory:

  3. Insert data into the new table:

  4. Type GO to execute the previous commands:

Select data

Now, run a query to return data from the Inventory table.

  1. From the sqlcmd command prompt, enter a query that returns rows from the Inventory table where the quantity is greater than 152:

  2. Execute the command:

Exit the sqlcmd command prompt

  1. To end your sqlcmd session, type QUIT:

  2. To exit the interactive command-prompt in your container, type exit. Your container continues to run after you exit the interactive bash shell.

Connect from outside the container

You can also connect to the SQL Server instance on your Docker machine from any external Linux, Windows, or macOS tool that supports SQL connections.

The following steps use sqlcmd outside of your container to connect to SQL Server running in the container. These steps assume that you already have the SQL Server command-line tools installed outside of your container. The same principles apply when using other tools, but the process of connecting is unique to each tool.

  1. Find the IP address for the machine that hosts your container. On Linux, use ifconfig or ip addr. On Windows, use ipconfig.

  2. For this example, install the sqlcmd tool on your client machine. For more information, see Install sqlcmd on Windows or Install sqlcmd on Linux.

  3. Run sqlcmd specifying the IP address and the port mapped to port 1433 in your container. In this example, that is the same port, 1433, on the host machine. If you specified a different mapped port on the host machine, you would use it here.

  4. Run Transact-SQL commands. When finished, type QUIT.

Other common tools to connect to SQL Server include:

Microsoft Sql Server

Remove your container

If you want to remove the SQL Server container used in this tutorial, run the following commands:

Warning

Stopping and removing a container permanently deletes any SQL Server data in the container. If you need to preserve your data, create and copy a backup file out of the container or use a container data persistence technique.

Docker demo

After you have tried using the SQL Server container image for Docker, you might want to know how Docker is used to improve development and testing. The following video shows how Docker can be used in a continuous integration and deployment scenario.

Next steps

For a tutorial on how to restore database backup files into a container, see Restore a SQL Server database in a Linux Docker container. To explore other scenarios, such as running multiple containers, data persistence, and troubleshooting, see Configure SQL Server container images on Docker.

Also, check out the mssql-docker GitHub repository for resources, feedback, and known issues.

-->

适用于: SQL Server Azure SQL 数据库 Azure Synapse Analytics (SQL DW) 并行数据仓库 APPLIES TO: SQL Server Azure SQL Database Azure Synapse Analytics (SQL DW) Parallel Data Warehouse

SQL Server Management Studio (SSMS) 是一种集成环境,用于管理从 SQL Server 到 Azure SQL 数据库的任何 SQL 基础结构。SQL Server Management Studio (SSMS) is an integrated environment for managing any SQL infrastructure, from SQL Server to Azure SQL Database.SSMS 提供用于配置、监视和管理 SQL Server 和数据库实例的工具。SSMS provides tools to configure, monitor, and administer instances of SQL Server and databases.使用 SSMS 部署、监视和升级应用程序使用的数据层组件,以及生成查询和脚本。Use SSMS to deploy, monitor, and upgrade the>使用 SSMS 在本地计算机或云端查询、设计和管理数据库及数据仓库,无论它们位于何处。Use SSMS to query, design, and manage your databases and data warehouses, wherever they are - on your local computer, or in the cloud.

SSMS 是免费的!SSMS is free!

下载 SSMSDownload SSMS

下载 SQL Server Management Studio (SSMS) Download SQL Server Management Studio (SSMS)

SSMS 18.4 是 SSMS 的最新正式发布 (GA) 版。SSMS 18.4 is the latest general availability (GA) version of SSMS.如果安装了之前的 SSMS 18 GA 版本,请安装 SSMS 18.4 将它升级到 18.4。If you have a previous GA version of SSMS 18 installed, installing SSMS 18.4 upgrades it to 18.4.

版本信息Version information

  • 版本号:18.4Release number: 18.4
  • 生成号:15.0.18206.0Build number: 15.0.18206.0
  • 发行日期:2019 年 11 月 4 日Release date: November 04, 2019

如果你有任何意见或建议,或想报告问题,最好是通过 UserVoice 与 SSMS 团队联系。If you have comments or suggestions, or you want to report issues, the best way to contact the SSMS team is at UserVoice.

SSMS 18.x 安装不会升级或替换 SSMS 17.x 或更早版本。The SSMS 18.x installation doesn't upgrade or replace SSMS versions 17.x or earlier.SSMS 18.x 与以前的版本并行安装,因此,这两个版本均可供使用。SSMS 18.x installs side by side with previous versions, so both versions are available for use.但是,如果安装了 SSMS 18.x 预览版,必须在安装 SSMS 18.4 前卸载 预览版。However, if you have a preview version of SSMS 18.x installed, you must uninstall it before installing SSMS 18.4.转到“帮助”>“相关窗口”,找到“预览版”,即可查看 。You can see if you have the Preview version by going to the Help > About window.

如果计算机包含 SSMS 的并行安装,请验证你是否针对特定需求启动相应的版本。If a computer contains side-by-side installations of SSMS, verify you start the correct version for your specific needs.最新版本标记为 Microsoft SQL Server Management Studio 18 The latest version is labeled Microsoft SQL Server Management Studio 18

备注

如果你正从一个非英语的语言版本访问此页面并想要查看最新内容,请访问此网站的英语(美国)版本。If you are accessing this page from a non-English language version, and want to see the most up-to-date content, please visit the US-English version of the site.可以通过选择可用语言从英语(美国)版本站点下载不同的语言。You can download different languages from the US-English version site by selecting available languages.

可用语言Available languages

Sql Server 2016 Sp2 Download

此版本的 SSMS 可以安装在以下语言中:This release of SSMS can be installed in the following languages:

SQL Server Management Studio 18.4:SQL Server Management Studio 18.4:
中文(简体) 中文(繁体) 英语(美国) 法语 德语 意大利语 日语 朝鲜语 葡萄牙语(巴西) 俄语 西班牙语Chinese (Simplified) Chinese (Traditional) English (United States) French German Italian Japanese Korean Portuguese (Brazil) Russian Spanish

备注

SQL Server PowerShell 模块可通过 PowerShell 库单独安装。The SQL Server PowerShell module is a separate install through the PowerShell Gallery.有关详细信息,请参阅下载 SQL Server PowerShell 模块。For more information, see Download SQL Server PowerShell Module.

40 yesterday.In other OneNote news, that claimed the top spot in that market after its free Web-based RSS service, announced Tuesday that it had created a 'Save to OneNote' button that lets users click once to save an article to Microsoft's note-taking and -recording program. From now until April 17, Microsoft has graciously agreed to sponsor the feature on Feedly - which means it will be free for everyone for the next month,' wrote Feedly's Josh Catone on Monday in a post.Cyril Moutran, Feedly co-founder and head of product and strategy, declined to go into details of the company's partnership with Microsoft, but confirmed that the deal was part of a broader program Feedly has 'in which companies can sponsor features on our platform for added exposure.' 71 on Monday and then No. Microsoft onenote mac app store Overall category, OneNote for iOS came out of nowhere - in other words, not on the list - to reach No. Although the feature will eventually be available only to customers who pay for Feedly Pro - $5 per month or $45 annually - all Feedly users, including those on the free plan, can access Save to OneNote until April 17.'

新增功能What's new

有关此版本中新增功能的详细信息,请参阅 SSMS 发行说明。For details and more information about what's new in this release, see SSMS release notes.

此版本存在一些已知问题。There are a few known issues with this release.

以前的版本Previous versions

本文仅适用于最新版本的 SSMS。This article is for the latest version of SSMS only.若要下载 SSMS 的早期版本,请访问 SSMS 的早期版本。To download previous versions of SSMS, visit Previous SSMS releases.

无人参与安装Unattended install

还可以使用命令提示符脚本安装 SSMS。You can also install SSMS using a command prompt script.

如果要在没有 GUI 提示的情况下在后台安装 SSMS,请执行以下步骤。If you want to install SSMS in the background with no GUI prompts, then follow the steps below.

  1. 使用提升的权限启动命令提示符。Launch the command prompt with elevated permissions.

  2. 在命令提示符下键入以下命令。Type the command below in the command prompt.

    示例:Example:

    你也可以传递 /Passive 而不是 /Quiet 来查看设置 UI 。You can also pass /Passive instead of /Quiet to see the setup UI.

  3. 如果运行正常,根据示例,你可以在 %systemdrive%SSMStoCommon7IDESsms.exe 中看到安装了 SSMS。If all goes well, you can see SSMS installed at %systemdrive%SSMStoCommon7IDESsms.exe” based on the example.如果出现故障,可以检查返回的错误代码,并在 %TEMP%SSMSSetup 处查看日志文件。If something went wrong, you could inspect the error code returned and take a peek at the %TEMP%SSMSSetup for the log file.

受支持的 SQL 产品/服务 (SSMS 18.4)Supported SQL offerings (SSMS 18.4)

  • 此版本的 SSMS 适用于所有受支持 SQL Server 2008 - SQL Server 2019 (15.x)SQL Server 2019 (15.x),并且在最大程度上支持与 Azure SQL 数据库和 Azure SQL 数据仓库中的最新云功能配合使用。This version of SSMS works with all supported versions of SQL Server 2008 - SQL Server 2019 (15.x)SQL Server 2019 (15.x) and provides the greatest level of support for working with the latest cloud features in Azure SQL Database and Azure SQL Data Warehouse.
  • 此外,SSMS 18.x 可与 SSMS 17.x、SSMS 16.x 或 SQL Server 2014 SSMS 及早期版本并行安装。Additionally, SSMS 18.x can be installed side by side with SSMS 17.x, SSMS 16.x, or SQL Server 2014 SSMS and earlier.
  • SQL Server Integration Services (SSIS) - SSMS 版本 17.x 或更高版本不支持连接到旧版 SQL Server Integration Services 服务。SQL Server Integration Services (SSIS) - SSMS version 17.x or later doesn't support connecting to the legacy SQL Server Integration Services service.要连接到早期版本的 Integration Services,请使用与 SQL Server 版本一致的 SSMS 版本。To connect to an earlier version of the legacy Integration Services, use the version of SSMS aligned with the version of SQL Server.例如,使用 SSMS 16.x 连接到旧版 SQL Server 2016 Integration Services 服务。For example, use SSMS 16.x to connect to the legacy SQL Server 2016 Integration Services service.可以在同一台计算机上并行安装 SSMS 17.x 和 SSMS 16.x。SSMS 17.x and SSMS 16.x can be installed side by side on the same computer.由于 SQL Server 2012 的发布,建议使用 SSIS 目录数据库 (SSISDB) 来存储、管理、运行和监视 Integration Services 包。Since the release of SQL Server 2012, the SSIS Catalog database, SSISDB, is the recommended way to store, manage, run, and monitor Integration Services packages.有关详细信息,请参阅 SSIS 目录。For details, see SSIS Catalog.

受支持的操作系统 (SSMS 18.4)Supported operating systems (SSMS 18.4)

与最新可用的服务包一起使用时,此版本的 SSMS 支持以下 64 位平台:This release of SSMS supports the following 64-bit platforms when used with the latest available service pack:

  • Windows 10(64 位)*Windows 10 (64-bit) *
  • Windows 8.1(64 位)Windows 8.1 (64-bit)
  • Windows Server 2019(64 位)Windows Server 2019 (64-bit)
  • Windows Server 2016(64 位)*Windows Server 2016 (64-bit) *
  • Windows Server 2012 R2(64 位)Windows Server 2012 R2 (64-bit)
  • Windows Server 2012(64 位)Windows Server 2012 (64-bit)
  • Windows Server 2008 R2(64 位)Windows Server 2008 R2 (64-bit)

* 需要 1607 (10.0.14393) 或更高版本* Requires version 1607 (10.0.14393) or later

备注

SSMS 仅在 Windows(AMD 或 Intel)上运行。SSMS runs on Windows (AMD or Intel) only.如果需要在 Windows 以外的平台上运行的工具,请查看 Azure Data Studio。If you need a tool that runs on platforms other than Windows, take a look at Azure Data Studio.Azure Data Studio 是一个全新的跨平台工具,可在 macOS、Linux 以及 Windows 上运行。Azure Data Studio is a new cross-platform tool that runs on macOS, Linux, as well as Windows.有关详细信息,请参阅 Azure Data Studio。For details, see Azure Data Studio.

获取 SQL 工具的帮助Get help for SQL tools

另请参阅See also

参与编辑 SQL 文档Contribute to SQL documentation

你是否知道你可以自己编辑内容?Did you know that you could edit the content yourself?这样做不仅可以改进我们的文档,还可以获得页面贡献者的殊荣。If you do so, not only will our documentation improve, but you'll also be credited as a contributor to the page.