如何安装SQL Server 2012 Express Edition

  • Post author:
  • Post category:其他


In this article, I am going to explain how we can install SQL Server 2012 express edition using the SQL Server installation center. Additionally, I will also explain how we can use the SQL Server installation configuration file to perform an unattended (silent) installation. First, download the SQL Server express edition from

this

location. Once the installation file is downloaded, let us begin the installation process.

在本文中,我将解释如何使用SQL Server安装中心安装SQL Server 2012 Express Edition。 此外,我还将说明如何使用SQL Server安装配置文件执行无人值守(静默)安装。 首先,从



位置下载SQL Server Express Edition。 下载安装文件后,让我们开始安装过程。

使用SQL Server安装程序安装SQL Server

(

Install SQL Server using SQL Server installer

)

To start the installation, execute the setup file by double-clicking on it. The installation process will be started. On the first screen choose “

New SQL Server stand-alone installation or add features to the existing installation

” option. See the following image:

要开始安装,请双击安装文件。 安装过程将开始。 在第一个屏幕上,选择“

新建SQL Server独立安装或向现有安装添加功能

”选项。 见下图:

SQL Server 2012 express edition installation center

On the License terms screen, select “

I accept the license terms

” See the following image:

在许可条款屏幕上,选择“

我接受许可条款

”,请参见下图:

SQL Server 2012 express edition License terms

If you want to install the SQL Server product update, select “

Include SQL Server product updates

” on the “

Product Updates

” screen. It is always recommended to keep the SQL Server up to date, but before applying the update on the production server, you must test it on the test server. I am installing the SQL Server on my workstation; hence I will install the update. See the following image:

如果要安装SQL Server产品更新,请在“

产品更新

”屏幕上选择“

包括SQL Server产品更新

”。 始终建议保持SQL Server为最新,但是在生产服务器上应用更新之前,必须在测试服务器上对其进行测试。 我正在我的工作站上安装SQL Server。 因此,我将安装更新。 见下图:

Product update for SQL Server 2012 express

On the

Setup Support Rules

screen, the installer checks all the mandatory rules which are required to be passed. If you receive any error, then fix it and click on next.

在“

安装程序支持规则”

屏幕上,安装程序将检查所有需要通过的强制性规则。 如果收到任何错误,请修复它,然后单击下一步。

Setup rule check

On the feature selection screen, select the features that you want to install on the computer and click on Next.

在功能选择屏幕上,选择要在计算机上安装的功能,然后单击“下一步”。

SQL Server 2012 express Feature selection

On the Instance configuration screen, you can choose to install a default instance or named instance. You can also change the instance root directory. Select desired options and click on “

Next

.”

在“实例配置”屏幕上,可以选择安装默认实例或命名实例。 您还可以更改实例根目录。 选择所需的选项,然后单击“

下一步”

Instance configuration

On the

Disk space requirement

screen, the installer checks the available space on the instance root directory. If sufficient space is available, then it skips the screen.

在“

磁盘空间需求”

屏幕上,安装程序检查实例根目录上的可用空间。 如果有足够的可用空间,则跳过屏幕。

Disk space requirement

On the

server configuration

screen, you must specify the credentials of the SQL Server service account. You can also change the SQL Server service startup type.



服务器配置

屏幕上,您必须指定SQL Server服务帐户的凭据。 您还可以更改SQL Server服务的启动类型。

SQL Server 2012 express configuration

Under the collation tab, you can customize the database collation.

在排序规则选项卡下,您可以自定义数据库排序规则。

collation

On the

database engine configuration screen

, you can perform the following configurations



数据库引擎配置屏幕上

,可以执行以下配置

  1. You can configure the authentication mode and specify the default SQL Server administrator from the Server configuration tab. You can choose Windows Authentication or mixed authentication (Windows authentication + SQL Server authentication). If you enable the

    Mixed mode,

    then you must provide the password of the “sa” user. Also, you must specify at least one SQL Server administrator. If you want to add yourself as a SQL Admin, then click on “Add Current Users.” See the following image:

    您可以配置身份验证模式,并从“服务器配置”选项卡中指定默认SQL Server管理员。 您可以选择Windows身份验证或混合身份验证(Windows身份验证+ SQL Server身份验证)。 如果启用

    混合模式,

    则必须提供“ sa”用户的密码。 另外,您必须至少指定一名SQL Server管理员。 如果要将自己添加为SQL管理员,请单击“添加当前用户”。 见下图:

    Authentication configuration

  2. Change the default location of User database files and log files, tempdb data files, and log files and default backup directory. See the following image:

    更改用户数据库文件和日志文件,tempdb数据文件以及日志文件和默认备份目录的默认位置。 见下图:

    Set data directory location

  3. Enable User instance feature of SQL Server express edition. You can read more about it in

    this

    article. See the following image:

    启用S​​QL Server Express Edition的用户实例功能。 你可以阅读更多关于它的

    这个

    文章。 见下图:

    Enable SQL Server 2012 express edition user instance

  4. Enable FILESTREAM. See the following image:

    启用FILESTREAM。 见下图:

    Enable file stream

On the

Error reporting

screen, you can choose to send error reports to Microsoft to improve future releases.



错误报告

屏幕上,您可以选择将错误报告发送给Microsoft以改进将来的版本。

Error reporting

The installer will check the installation configuration rules. All rules must be passed without error.

安装程序将检查安装配置规则。 所有规则都必须正确通过。

Installation rule check

Once all the configuration rules passed successfully, the installation process will begin.

一旦所有配置规则成功通过,安装过程将开始。

Installation process

Once installation completes successfully, you should review the list of installed features and components. If you face any error during the installation process, you can review the installation logs. See the following image.

安装成功完成后,您应该查看已安装功能部件和组件的列表。 如果在安装过程中遇到任何错误,则可以查看安装日志。 参见下图。

SQL Server 2012 express installed successfully

静默安装SQL Server 2012 Express版

(

Silent installation of the SQL Server 2012 express edition

)

SQL Server Express edition does not create a configuration file automatically; hence we have to run the SQL Server installer by executing the following command in PowerShell or DOS.

SQL Server Express版不会自动创建配置文件;而是会自动创建配置文件。 因此,我们必须通过在PowerShell或DOS中执行以下命令来运行SQL Server安装程序。

C:\Softwares\SQLEXPR_x64_ENU.exe /ACTION=INSTALL /UIMODE=Normal

The above command runs the SQL server installer. On the “

Ready to install

” screen, you can see the path of the configuration file.

上面的命令运行SQL Server安装程序。 在“

准备安装

”屏幕上,您可以看到配置文件的路径。

Create configurationfile.ini

The file location:

文件位置:



Open the

configurationfile.ini

in notepad or other text editor file. The configuration file looks like the following:

在记事本或其他文本编辑器文件中打开

configurationfile.ini

。 配置文件如下所示:



You can configure the parameters according to the requirement. The following is a description of all parameters.

您可以根据需要配置参数。 以下是所有参数的说明。

Parameter Name

Description

Action

This option specifies the task that needs to be performed. It could be any of the following

  • Install
  • Un-install
  • Upgrade

ROLE

This option specifies whether to install using a setup role or feature selection page. Valid values are following

  • SQL Server feature installation
  • PowerPivot for SharePoint
  • All Features with default

UIMODE

This option controls the UI behavior. The valid options are following

  • Normal (FULL UI)
  • AutoAdvanced (Simplified UI)
  • EnableUIOnServerCore (Bypass the server core setup GUI block)

QUITE

The setup will not display any user interface.

QUITESIMPLE

Setup will display progress only without user interaction.

UpdateEnabled

This option specifies whether to install SQL Server product updates. Valid values are

  • True
  • False

FEATURES

It specifies the list of features that will be installed. The top-level features are following

  • SQL (SQL Server database engine)
  • RS (Reporting Services)
  • AS (Analysis services)
  • MDS (Master Data Services)
  • Tools ( SSMS, Books online, data tools and shared components)

UpdateSource

Specify the location where the SQL Server setup will obtain the product updates. Valid options are following

  • MU (Microsoft Update)
  • UNC Share or valid folder path

X86

This option specifies that the setup should be installed into

WOW64

.

INSTALLSHAREDDIR

Root installation directory of the shared components

INSTALLSHAREDWOWDIR

installation directory for the WOW64 components

INSTANCENAME

Specify the name of the instance.

INSTANCEID

Specify the instance ID

SQMREPORTING

Specifies that the feature usage data can be collected and sent to Microsoft.

ERRORREPORTING

This option specifies whether errors can be reported to Microsoft.Valid values are the following:

  • True
  • False

INSTANCEDIR

Specify installation directory

AGTSVCACCOUNT

Service account for SQL Agent

AGTSVCSTARTUPTYPE

The startup type of agent service after installation.

SQLSVCSTARTUPTYPE

The startup type of SQL Server service after installation.

FILESTREAMLEVEL

Enable filestream

ENABLERANU

Enable RANU (SQL Server user instance) for SQL Server express.

SQLCOLLATION

This option specifies the collation of SQL Server.

SQLSVCACCOUNT

Its an account used as a SQL Server service account.

SQLSYSADMINACCOUNTS

It’s an account provision as SQL Server administrator

ADDCURRENTUSERASSQLADMIN

Add current user as a SQL Server system admins (sysadmin) account.

TCPENABLED

Enable TCP IP protocol. Valid values are zero (disabled) or one (enabled).

NPENABLED

Enable Named Pipe protocol. Valid values are zero (disabled) or one (enabled).

BROWSERSVCSTARTUPTYPE

Startup type for SQL Server browser service. Valid values are the following:

  • Automatic
  • Manual

参数名称

描述

行动

此选项指定需要执行的任务。 可能是以下任何一种

  • 安装
  • 卸载
  • 升级

角色

此选项指定是使用安装角色还是功能选择页面进行安装。 有效值如下

  • SQL Server功能安装
  • PowerPivot for SharePoint
  • 所有功能均默认

UIMODE

此选项控制UI行为。 有效选项如下

  • 正常(完整用户界面)
  • AutoAdvanced(简化的UI)
  • EnableUIOnServerCore(绕过服务器核心设置GUI块)

相当

该设置将不显示任何用户界面。

非常简单

安装程序将仅在没有用户交互的情况下显示进度。

UpdateEnabled

此选项指定是否安装SQL Server产品更新。 有效值为

  • 真正

特征

它指定将要安装的功能列表。 顶级功能如下

  • SQL(SQL Server数据库引擎)
  • RS(报告服务)
  • AS(分析服务)
  • MDS(主数据服务)
  • 工具(SSMS,在线图书,数据工具和共享组件)

更新源

指定SQL Server安装程序将获取产品更新的位置。 有效选项如下

  • MU(Microsoft更新)
  • UNC共享或有效文件夹路径

X86

此选项指定应将安装程序安装到

WOW64中

安装共享目录

共享组件的根安装目录

安装共享的目录

WOW64组件的安装目录

INSTANCENAME

指定实例的名称。

实例

指定实例ID

SQM报告

指定可以收集功能使用情况数据并将其发送给Microsoft。

错误报告

此选项指定是否可以向Microsoft报告错误。有效值如下:

  • 真正

实例化

指定安装目录

AGTSVCACCOUNT

SQL代理的服务帐户

AGTSVCSTARTUPTYPE

安装后代理服务的启动类型。

SQLSVCSTARTUPTYPE

安装后SQL Server服务的启动类型。

FILESTREAMLEVEL

启用文件流

使能

为SQL Server Express启用RANU(SQL Server用户实例)。

SQL收集

此选项指定SQL Server的排序规则。

SQLSVCACCOUNT

它是用作SQL Server服务帐户的帐户。

SQLSYSADMINACCOUNTS

这是作为SQL Server管理员提供的帐户

ADDCURRENTUSERASSQLADMIN

将当前用户添加为SQL Server系统管理员(sysadmin)帐户。

启用TCP

启用TCP IP协议。 有效值为零(禁用)或一(启用)。

启用

启用命名管道协议。 有效值为零(禁用)或一(启用)。

浏览器VCSTARTUPTYPE

SQL Server浏览器服务的启动类型。 有效值如下:

  • 自动
  • 手册

To identify the instance correctly, I have changed the value of the

InstanceID

and

InstanceName

parameters.

为了正确识别实例,我更改了

InstanceID



InstanceName

参数的值。



Once the values of all the parameters are set, save the file and run the following command in DOS or PowerShell to install SQL Server.

设置所有参数的值后,保存文件并在DOS或PowerShell中运行以下命令以安装SQL Server。

C:\Softwares\SQLEXPR_x64_ENU.exe /ConfigurationFile="C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20200228_020033\ConfigurationFile.ini"

Once you run this command, the installation process starts. See the following screenshot.

运行此命令后,安装过程将开始。 请参见以下屏幕截图。



连接到SQL Server

(

Connect to SQL Server

)

Once the installation completes successfully, Open SQL Server management studio and on “C

onnect to Server”

dialog box, choose the appropriate Server name, Authentication method, and click on the Connect button. See the following image:

安装成功完成后,打开SQL Server Management Studio,并在“

连接到服务器”

对话框上,选择适当的服务器名称,身份验证方法,然后单击“连接”按钮。 见下图:

Connect to SQL Server

Connected to SQL Server 2012 express

As you can see that we are able to connect to the SQLExpress2012 instance which shows that the installation was successful.

如您所见,我们能够连接到SQLExpress2012实例,该实例表明安装成功。

摘要

(

Summary

)

In this article, I have explained the installation process of the SQL Server 2012 express edition using the SQL Server installer and command prompt (Unattended installation).

在本文中,我已使用SQL Server安装程序和命令提示符(无人参与安装)说明了SQL Server 2012 Express Edition的安装过程。

翻译自: