In this article, I am going to explain how to install the SQL Server Express edition. We will download the SQL Server 2017 Express edition and perform the custom installation. Before we dive-in into the installation and configuration process, let me introduce you to the SQL Server Express edition.
在本文中,我将解释如何安装SQL Server Express版本。 我们将下载SQL Server 2017 Express版本并执行自定义安装 。 在深入介绍安装和配置过程之前,让我向您介绍SQL Server Express版本。
SQL Server Express版本 (SQL Server Express edition)
SQL Server Express edition is the entry-level and the free-to-use edition of SQL Server. It can be used to deploy a small application or a website. You do not have to pay the license cost even though you’re using it in a production environment. It can be used to reduce the overall license cost as well; for example, you’re deploying a database mirroring. (Even though this feature is deprecated, a few organizations still using it). To configure High Safety with automatic failover, you must configure a witness server that keeps an eye on both servers. So, instead of paying for SQL Server standard edition just to monitor the mirror, we can use the Express edition of SQL Server. It will reduce the overall cost of database mirroring. You can review the limitations and list of supported features here.
SQL Server Express版是SQL Server的入门级和免费版本。 它可以用于部署小型应用程序或网站。 即使在生产环境中使用许可证,也不必支付许可证费用。 它也可以用来降低总体许可成本; 例如,您正在部署数据库镜像。 (即使不赞成使用此功能,仍有一些组织仍在使用它)。 要配置具有自动故障转移功能的高安全性 ,您必须配置一个见证服务器,该服务器要密切注意两个服务器。 因此,我们可以使用SQL Server的Express版本,而不是为监视镜像而支付SQL Server标准版的费用。 它将减少数据库镜像的总体成本。 您可以在此处查看限制和支持的功能列表。
安装SQL Server Express版本 (Installation of SQL Server Express edition)
The SQL Server 2017 Express edition comes in three variants:
SQL Server 2017 Express版提供三种变体:
- SQL Server 2017 Express edition. You can download it from here SQL Server 2017 Express版。 您可以从这里下载
- SQL Server 2017 Express edition with advanced series. You can download it from here 具有高级系列SQL Server 2017 Express版。 您可以从这里下载
- SQL Server 2017 Express edition with localDB. You can download it from here 具有localDBSQL Server 2017 Express版 您可以从这里下载
Once you download the installation file, run it by double-clicking on it. It starts another installer, which provides us three installation types to install the SQL Server.
下载安装文件后,请双击运行它。 它会启动另一个安装程序,该安装程序提供了三种安装类型来安装SQL Server。
- Basic Installation: It installs the SQL Server with pre-defined basic configuration 基本安装:它以预定义的基本配置安装SQL Server。
- Custom Installation: This option can be used when you want to customize the database configurations. This option is used when we want to install specific components only 自定义安装:当您要自定义数据库配置时,可以使用此选项。 仅当我们要安装特定组件时使用此选项
- Download media: This option will download the iso file of the SQL Server Express edition. We can install it later 下载媒体:此选项将下载SQL Server Express版本的iso文件。 我们可以稍后安装
We are going to perform a custom installation. To do that, click on the Custom type:
我们将执行自定义安装。 为此,请单击“ 自定义”类型:

In the next step, we must specify the location where we want to download the SQL Server Express edition media files. Click on Browse to navigate to the desired location. Specify the desired location in the MEDIA LOCATION text box and click on Install:
下一步,我们必须指定要下载SQL Server Express版媒体文件的位置。 单击浏览以导航到所需位置。 在“ 媒体位置”文本框中指定所需的位置,然后单击“ 安装” :

The installer will start the download process of the SQL Server install package:
安装程序将开始下载SQL Server安装包的过程:

Once the install package is downloaded, the installer will extract it and begin the installation process. The installation is performed by the SQL Server Installation Center. On the installation screen, you can choose any of the following options:
下载安装包后,安装程序将解压缩并开始安装过程。 安装由SQL Server安装中心执行。 在安装屏幕上,可以选择以下任一选项:
- SQL Server standalone or add the feature to an existing installation SQL Server独立版本或将功能添加到现有安装中
- Install SQL Server Reporting Services 安装SQL Server Reporting Services
- Install the SQL Server Management Studio 安装SQL Server Management Studio
- Upgrade from old version to new version of SQL Server 从旧版本升级到新版本SQL Server
We want to install SQL Server; hence, click on the New SQL Server stand-alone installation or add features to the existing installation option. See the following image:
我们要安装SQL Server; 因此,请单击“ 新建SQL Server独立安装”或向现有安装选项中添加功能 。 见下图:

In the Global Rules step, the installer will verify that all the global rules are passed successfully. If any of the rules fail, we must fix the error to continue the installation process. See the following image:
在“ 全局规则”步骤中,安装程序将验证是否成功通过了所有全局规则。 如果任何规则失败,我们必须修复错误以继续安装过程。 见下图:

In the Microsoft Update step, you can decide whether to enable automatic updates or not. It is always recommended to not enable this option because all the security updates and patches must be tested thoroughly in a non-production environment. We are performing this installation on my work station; hence I will enable automatic updates:
在Microsoft Update步骤中,您可以决定是否启用自动更新。 始终建议不要启用此选项,因为必须在非生产环境中对所有安全更新和补丁进行彻底测试。 我们正在我的工作站上执行此安装; 因此,我将启用自动更新:

Now, in the Install Rules step, the SQL Server installer verifies that all the install rules must be passed successfully. If any of the rules failed, we must fix the error to continue the installation. See the following image:
现在,在“ 安装规则”步骤中,SQL Server安装程序将验证是否必须成功通过所有安装规则。 如果任何规则失败,我们必须修复错误以继续安装。 见下图:

In the Installation Type step, you can perform any of the following operations:
在“ 安装类型”步骤中,您可以执行以下任何操作:
- Install a new instance of the SQL Server 2017 Express edition 安装SQL Server 2017 Express版的新实例
- Add new features to the existing installation 向现有安装添加新功能
We are performing a new installation; hence select the Perform a new installation of SQL Server 2017 option. See the following image:
我们正在执行新安装; 因此,请选择“ 执行SQL Server 2017的新安装”选项。 见下图:

On license terms screen, read the Microsoft software license terms for SQL Server Express edition and select the I accept the license terms checkbox:
在许可条款屏幕上,阅读SQL Server Express版本的Microsoft软件许可条款,然后选中我接受许可条款复选框:

In the Feature Selection step, choose the features you want to install and click on Next. See below:
在“ 功能选择”步骤中,选择要安装的功能,然后单击“ 下一步” 。 见下文:

In the Instance Configuration step, you can choose to create a default instance or named instance. I have already installed a default instance on my workstation; hence, I will choose the named instance. See the following screenshot:
在“ 实例配置”步骤中,您可以选择创建默认实例或命名实例。 我已经在工作站上安装了默认实例; 因此,我将选择命名实例。 请参见以下屏幕截图:

In the Server Configuration step, you can configure the SQL Server service accounts. It is recommended to use the domain account as a SQL Server service account. You can also enable instant file initialization. To do that, click on Grant perform volume maintenance task privileges to the SQL Server database engine service. I will not make any changes:
在“ 服务器配置”步骤中,可以配置SQL Server服务帐户。 建议将域帐户用作SQL Server服务帐户。 您还可以启用即时文件初始化。 为此,请单击“ 授予对SQL Server数据库引擎服务的执行卷维护任务特权” 。 我不会做任何更改:

In the Collation tab, you can choose the default collation of SQL Server. I won’t change the default collation:
在“ 排序规则”选项卡中,可以选择SQL Server的默认排序规则 。 我不会更改默认排序规则:

In the Database Engine Configuration step, you can perform the following tasks:
在“ 数据库引擎配置”步骤中,您可以执行以下任务:
配置身份验证模式并指定SQL Server管理员 (Configure the authentication mode and specify SQL Server administrators)
On this screen, you can choose Windows authentication or SQL Server authentication. Also, you must add the default administrator account. To do that, click on the Add Current User button. See the following image:
在此屏幕上,您可以选择Windows身份验证或SQL Server身份验证。 另外,您必须添加默认的管理员帐户。 为此,请单击“ 添加当前用户”按钮。 见下图:

配置数据库目录 (Configure database directories)
On this screen, you can provide the locations of the User database Data files, User database Log files, Backup files, and instance root directory. I am going to change the default locations of the user database data files and log files. See the following image:
在此屏幕上,您可以提供用户数据库数据文件,用户数据库日志文件,备份文件和实例根目录的位置。 我将更改用户数据库数据文件和日志文件的默认位置。 见下图:

配置tempDB (Configure tempDB)
On the TempDB screen, you can configure the following parameters of the data files of the TempDB:
在TempDB屏幕上,可以配置TempDB数据文件的以下参数:
- The number of TempDB files TempDB文件数
- The initial size and auto-growth of the TempDB data files TempDB数据文件的初始大小和自动增长
- Location of TempDB data files TempDB数据文件的位置
Also, you can configure the following parameters of the Logfile of the TempDB:
另外,您可以配置TempDB日志文件的以下参数:
- The initial size and the auto-growth of the TempDB log file TempDB日志文件的初始大小和自动增长
- The Location of the TempDB log file TempDB日志文件的位置
I will not make any changes to the configuration:
我不会对配置进行任何更改:

配置文件流 (Configure the FILESTREAM)
On the FILESTREAM screen, you can configure the FILESTREAM parameters. I am going to use the FILESTREAM feature hence:
在FILESTREAM屏幕上,可以配置FILESTREAM参数。 因此,我将使用FILESTREAM功能:
- I have enabled FILESTREAM for T-SQL Access 我已启用FILESTREAM进行T-SQL访问
- I have enabled FILESTREAM for the file I/O access 我已启用FILESTREAM进行文件I / O访问
- I have provided the windows share name 我提供了Windows共享名
- I have enabled remote access to the FILESTREAM data 我已启用对FILESTREAM数据的远程访问
See the following image:
见下图:

Once all the options are configured, click on Next to continue the setup process. In the Consent to Microsoft R Open step, click on the Accept button and click Next. See the following image:
配置完所有选项后,单击“ 下一步”继续设置过程。 在“ 同意Microsoft R打开”步骤中,单击“ 接受”按钮,然后单击“ 下一步” 。 见下图:

Similarly, in the Consent to install Python step, click on Accept. See below:
同样,在“ 同意安装Python”步骤中,单击“ 接受” 。 见下文:

Once all parameters are configured, the SQL Server installer checks all the feature configuration rules. If all the rules are passed successfully, it will start installing the SQL Server Express edition on the computer:
配置完所有参数后,SQL Server安装程序将检查所有功能配置规则。 如果成功通过所有规则,它将开始在计算机上安装SQL Server Express版本:

Once installation completes successfully, you can review the list of installed features and components. In case of any errors or warnings, you can review the installer logs as shown below:
安装成功完成后,您可以查看已安装功能部件和组件的列表。 如果有任何错误或警告,您可以查看安装程序日志,如下所示:

You can connect to the SQL Server Express edition using SQL Server Management Studio. To do that, open SSMS and on the Connect to Server dialog box, provide the server name, choose the authentication type, and click on the Connect button:
您可以使用SQL Server Management Studio连接到SQL Server Express版本。 为此,请打开SSMS并在“ 连接到服务器”对话框上,提供服务器名称,选择身份验证类型,然后单击“ 连接”按钮:

As I mentioned, I am installing a named instance; hence the server name is in <ServerName>\<InstanceName> format:
如前所述,我正在安装一个命名实例。 因此,服务器名称采用<ServerName> \ <InstanceName>格式:

The installation of the SQL Server Express edition is completed successfully.
SQL Server Express版本的安装成功完成。
摘要 (Summary)
In this article, I have explained the step by step installation process of the SQL Server Express edition using the custom installation option.
在本文中,我已经说明了使用自定义安装选项SQL Server Express版本的分步安装过程。
翻译自: https://www.sqlshack.com/how-to-install-sql-server-express-edition-2/