Nisarg Upadhyay
Connect to SQL Server

How to install SQL Server 2012 express edition

March 9, 2020 by

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.

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 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:

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 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:

    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:

    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:

    Enable SQL Server 2012 express edition user instance

  4. Enable FILESTREAM. See the following image:

    Enable file stream

On the Error reporting screen, you can choose to send error reports to Microsoft to improve future releases.

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

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.

The above command runs the SQL server installer. On the “Ready to install” screen, you can see the path of the configuration file.

Create configurationfile.ini

The file location:

location of configurationfile.ini

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

content of 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

To identify the instance correctly, I have changed the value of the InstanceID and InstanceName parameters.

Change options of configurationfile.ini

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.

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

Installing SQL Server 2012 express using configurationfile.ini

Connect to SQL Server

Once the installation completes successfully, Open SQL Server management studio and on “Connect to Server” dialog box, choose the appropriate Server name, Authentication method, and click on the Connect button. See the following image:

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.

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).

Nisarg Upadhyay
714 Views