Skip to content

Latest commit

 

History

History
312 lines (170 loc) · 28.8 KB

File metadata and controls

312 lines (170 loc) · 28.8 KB
title Install SQL Server Using SysPrep
description This article describes how to prepare and complete images by using SysPrep in SQL Server installation.
author rwestMSFT
ms.author randolphwest
ms.date 06/03/2025
ms.service sql
ms.subservice install
ms.topic install-set-up-deploy
monikerRange >=sql-server-2016
ms.custom
intro-installation
sfi-ropc-blocked

Install SQL Server with SysPrep

[!INCLUDE SQL Server -Windows Only]

[!INCLUDE ssNoVersion] SysPrep related setup actions can be accessed through the Installation Center. The Advanced Page of the Installation Center has two options - Image preparation of a stand-alone instance of [!INCLUDE ssNoVersion] and Image completion of a prepared stand-alone instance of [!INCLUDE ssNoVersion]. The Prepare and Complete sections describe the installation process in detail. For more information, see Considerations for installing SQL Server using SysPrep.

You can also prepare and complete an instance of [!INCLUDE ssNoVersion] using the command prompt or a configuration file. For more information, see:

Prerequisites

Before you install [!INCLUDE ssNoVersion], review the articles in Plan a SQL Server installation.

For more information about [!INCLUDE ssNoVersion] editions and the hardware and software requirements, see:

[!INCLUDE editions-supported-features-windows]

SQL Server SysPrep cluster support

Beginning in [!INCLUDE ssSQL14], SysPrep supports clustered [!INCLUDE ssNoVersion] instances in command line installations. For more information, see What is Sysprep?

Prepare a SQL Server failover cluster (unattended)

  1. Prepare the image (as discussed in Considerations for installing SQL Server using SysPrep) and capture the Windows image through SysPrep Generalization. The following sample prepares the image:

    Setup.exe /q /ACTION=PrepareImage l /FEATURES=SQLEngine /InstanceID =<MYINST> /IACCEPTSQLSERVERLICENSETERMS

    Then run Windows SysPrep Generalization.

  2. Deploy the image by running Windows SysPrep Specialize.

  3. Create the Windows Failover Cluster.

  4. Run setup.exe with /ACTION=PrepareFailoverCluster all nodes. For example:

    setup.exe /q /ACTION=PrepareFailoverCluster /InstanceName=<InstanceName> /Features=SQLEngine /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="xxxxxxxxxxx" /IACCEPTSQLSERVERLICENSETERMS

Complete a SQL Server failover cluster (Unattended)

Run setup.exe with /ACTION=CompleteFailoverCluster on the node that owns the available storage group:

setup.exe /q /ACTION=CompleteFailoverCluster /InstanceName=<InstanceName> /FAILOVERCLUSTERDISKS="<Cluster Disk Resource Name - for example, 'Disk S:'>:" /FAILOVERCLUSTERNETWORKNAME="<Insert FOI Network Name>" /FAILOVERCLUSTERIPADDRESSES="IPv4;xx.xxx.xx.xx;Cluster Network;xxx.xxx.xxx.x" /FAILOVERCLUSTERGROUP="MSSQLSERVER" /INSTALLSQLDATADIR="<Drive>:\<Path>\MSSQLSERVER" /SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS" /SQLSYSADMINACCOUNTS="<DomainName\UserName>"

Add a node to an existing SQL Server failover cluster (unattended)

  1. Deploy the image by running Windows SysPrep Specialize.

  2. Join the Windows Failover Cluster.

  3. Run setup.exe with /ACTION=AddNode on all nodes:

    setup.exe /q /ACTION=AddNode /InstanceName=<InstanceName> /Features=SQLEngine /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="xxxxxxxxxxx" /IACCEPTSQLSERVERLICENSETERMS

Prepare a stand-alone instance of SQL Server

  1. Insert the [!INCLUDE ssNoVersion] installation media. From the root folder, double-click Setup.exe. To install from a network share, locate the root folder on the share, and then double-click Setup.exe.

  2. The Installation Wizard runs the [!INCLUDE ssNoVersion] Installation Center. To prepare an instance of [!INCLUDE ssNoVersion], select Image preparation of a stand-alone instance of [!INCLUDE ssNoVersion] on the Advanced page.

  3. The System Configuration Checker runs a discovery operation on your computer. To continue, select OK. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  4. On the Product Updates page, the latest available [!INCLUDE ssNoVersion] product updates are displayed. If you don't want to include the updates, clear the Include [!INCLUDE ssNoVersion] product updates check box. If no product updates are discovered, [!INCLUDE ssNoVersion] Setup doesn't display this page and auto advances to the Install Setup Files page.

  5. On the Install Setup files page, Setup provides the progress of downloading, extracting, and installing the Setup files. If an update for [!INCLUDE ssNoVersion] Setup is found, and is specified to be included, that update is also installed.

  6. The System Configuration Checker verifies the system state of your computer before Setup continues. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  7. On the Prepare Image Type page, select Prepare a new instance of [!INCLUDE ssNoVersion].

    The Prepare Image Type page is displayed only when you have an existing unconfigured prepared instance of [!INCLUDE ssNoVersion] on the machine. You can choose to prepare a new instance of [!INCLUDE ssNoVersion] or add sys prep supported features to an existing prepared instance of [!INCLUDE ssNoVersion] on the machine. For more information on how to add features to a prepared instance of [!INCLUDE ssNoVersion], see Add Features to a prepared instance.

  8. On the License Terms page, read the license agreement, and then select the check box to accept the license terms and conditions. To help improve [!INCLUDE ssNoVersion], you can also enable the feature usage option and send reports to [!INCLUDE msCoName].

    [!INCLUDE sql-eula-link]

  9. On the Feature Selection page, select the components for your installation:

    Installation Components
    [!INCLUDE ssnoversion] SysPrep [!INCLUDE ssDE]
    [!INCLUDE ssNoVersion] Replication
    Full-Text Features
    Data Quality Services
    [!INCLUDE ssRSnoversion] in Native mode
    [!INCLUDE ssASnoversion]
    Redistributable Features
    Shared Features

    A description for each component group appears in the right pane when you highlight the feature name. You can select any combination of check boxes. For more information, see Editions and supported features of SQL Server 2022.

    The prerequisites for the selected features are displayed on the right-hand pane. [!INCLUDE ssNoVersion] Setup installs the prerequisites that aren't already installed during the installation step described later in this procedure.

  10. On the Prepare Image Rules page, the System Configuration Checker verifies the system state of your computer before Setup continues. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  11. On the Instance Configuration page, specify the Instance ID for the Instance. Select Next to continue.

    Instance ID - The Instance ID is used to identify installation directories and registry keys for your instance of [!INCLUDE ssNoVersion]. This is the case for default instances and named instances. If the prepared instance is completed as a default Instance during the Complete step, the instance name is overwritten as MSSQLSERVER. The Instance ID remains the same as specified.

    Instance root directory - By default, the instance root directory is [!INCLUDE ssInstallPath]. To specify a non-default root directory, use the field provided, or select Browse to locate an installation folder. The directory specified in the prepare step is used during configuration in the Complete step.

    All [!INCLUDE ssNoVersion] service packs and upgrades apply to every component of an instance of [!INCLUDE ssNoVersion].

    Installed Instances - The grid shows instances of [!INCLUDE ssNoVersion] that are on the computer where Setup is running.

  12. The Disk Space Requirements page calculates the required disk space for the features that you specify. Then it compares the required space to the available disk space.

  13. The System Configuration Checker runs prepare image rules to validate your computer configuration with the [!INCLUDE ssNoVersion] features that you have specified. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  14. The Ready to Prepare Image page shows a tree view of installation options that were specified during Setup. On this page, Setup indicates whether the Product Update feature is enabled or disabled and the final update version. To continue, select Prepare. [!INCLUDE ssNoVersion] Setup first installs the required prerequisites for the selected features followed by the feature installation.

  15. During installation, the Prepare Image Progress page provides status so that you can monitor installation progress as Setup continues.

  16. After installation, the Complete page provides a link to the summary log file for the installation and other important notes. To complete the [!INCLUDE ssNoVersion] installation process, select Close.

  17. If you're instructed to restart the computer, do so now. It's important to read the message from the Installation Wizard when you finish with Setup. For more information, see View and read SQL Server Setup log files.

  18. This completes the prepare step. You might complete the image or deploy the prepared image as described in Considerations for installing SQL Server using SysPrep.

Complete a prepared instance of SQL Server

  1. If you have a prepared instance of [!INCLUDE ssNoVersion] included in the image of your machine, you see a shortcut in the Start Menu. You can also launch the Installation Center and select Image completion of a prepared stand-alone instance on the Advanced page.

  2. The System Configuration Checker runs a discovery operation on your computer. To continue, select OK. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  3. On the Setup Support Files page, select Install to install the Setup support files.

  4. The System Configuration Checker verifies the system state of your computer before Setup continues. After the check is complete, select Next to continue. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  5. On the Product Key page, select an option button to indicate whether you're installing a free edition of [!INCLUDE ssNoVersion], or a production version of the product that has a PID key. For more information, see Editions and supported features of SQL Server 2022. If you're installing Evaluation edition the 180-day trial period starts when you complete this step.

  6. On the License Terms page, read the license agreement, and then select the check box to accept the license terms and conditions. To help improve [!INCLUDE ssNoVersion], you can also enable the feature usage option and send reports to [!INCLUDE msCoName].

  7. On the Select a Prepared Instance page select the prepared instance you want to complete from the dropdown list box. Select the Unconfigured instance from the Instance ID list.

    Installed instances: This grid displays all the instances including any prepared instance on this machine.

  8. On the Feature Review page, you see the selected features and components included in the install during the prepare step. If you wish to add more features to your [!INCLUDE ssNoVersion] Instance not included in the prepared instance, you must first complete this step to complete the [!INCLUDE ssNoVersion] Instance, then add the features from the Add Features on the Installation Center.

    You can add features that are available for the product version that you're installing. For more information, see Editions and supported features of SQL Server 2022.

  9. On the Instance Configuration page, specify the Instance name for the prepared Instance. This is the name of the instance once you have completed the configuration of [!INCLUDE ssNoVersion]. Select Next to continue.

    Instance ID - The Instance ID is used to identify installation directories and registry keys for your instance of [!INCLUDE ssNoVersion]. This is the case for default instances and named instances. If the prepared instance is completed as a default Instance during the Complete step, the instance name is overwritten as MSSQLSERVER. The Instance ID remains the same as specified during the Prepare step.

    Instance root directory - The directory specified in the prepare step is used, and can't be modified in this step.

    All [!INCLUDE ssNoVersion] service packs and upgrades apply to every component of an instance of [!INCLUDE ssNoVersion].

    Installed instances - The grid shows instances of [!INCLUDE ssNoVersion] that are on the computer where Setup is running.

  10. Work flow for the rest of this article depends on the features that were selected during the prepare step. You might not see all the pages, depending on the selections.

  11. On the Server Configuration - Service Accounts page, specify login accounts for [!INCLUDE ssNoVersion] services. The actual services that are configured on this page depend on the features that you selected to install.

    You can assign the same login account to all [!INCLUDE ssNoVersion] services, or you can configure each service account individually. You can also specify whether services start automatically, are started manually, or are disabled. [!INCLUDE msCoName] recommends that you configure service accounts individually to provide least privileges for each service, where [!INCLUDE ssNoVersion] services are granted the minimum permissions they need to complete their tasks. For more information, see SQL Server installation guide and Configure Windows service accounts and permissions.

    To specify the same account for all service accounts in this instance of [!INCLUDE ssNoVersion], provide credentials in the fields at the bottom of the page.

    Security Note [!INCLUDE ssNoteStrongPass]

    When you're finished specifying login information for [!INCLUDE ssNoVersion] services, select Next.

  12. Use the Server Configuration - Collation tab to specify non-default collations for the [!INCLUDE ssDE] and [!INCLUDE ssASnoversion]. For more information, see SQL Server installation guide.

  13. Use the [!INCLUDE ssDE] Configuration - Account Provisioning page to specify:

    • Security Mode - Select Windows Authentication or Mixed Mode Authentication for your instance of [!INCLUDE ssNoVersion]. If you select Mixed Mode Authentication, you must provide a strong password for the built-in [!INCLUDE ssNoVersion] system administrator account.

      After a device establishes a successful connection to [!INCLUDE ssNoVersion], the security mechanism is the same for both Windows Authentication and Mixed Mode. For more information, see SQL Server installation guide.

    • [!INCLUDE ssNoVersion] Administrators - You must specify at least one system administrator for the instance of [!INCLUDE ssNoVersion]. To add the account under which [!INCLUDE ssNoVersion] Setup is running, select Add Current User. To add or remove accounts from the list of system administrators, select Add or Remove, and then edit the list of users, groups, or computers that have administrator privileges for the instance of [!INCLUDE ssNoVersion]. For more information, see SQL Server installation guide.

    When you're finished editing the list, select OK. Verify the list of administrators in the configuration dialog box. When the list is complete, select Next.

  14. Use the [!INCLUDE ssDE] Configuration - Data Directories page to specify nondefault installation directories. To install to default directories, select Next.

    If you specify non-default installation directories, ensure that the installation folders are unique to this instance of [!INCLUDE ssNoVersion]. None of the directories in this dialog box should be shared with directories from other instances of [!INCLUDE ssNoVersion].

    For more information, see SQL Server installation guide.

  15. Use the [!INCLUDE ssDE] Configuration - FILESTREAM page to enable FILESTREAM for your instance of [!INCLUDE ssNoVersion]. For more information, see SQL Server installation guide.

  16. Use the [!INCLUDE ssRSnoversion] Configuration page to specify the kind of [!INCLUDE ssRSnoversion] installation to create. For more information about [!INCLUDE ssRSnoversion] configuration modes, see SQL Server installation guide.

  17. On the Error Reporting page, specify the information that you want to send to [!INCLUDE msCoName] that will help improve [!INCLUDE ssNoVersion]. By default, the option for error reporting is enabled.

  18. On the Complete Image Rules page, the System Configuration Checker runs the complete image rules to validate your computer configuration with the [!INCLUDE ssNoVersion] configurations that you have specified. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  19. The Ready to Complete Image page shows a tree view of installation options that were specified during Setup. To continue, select Install.

  20. During installation, the Complete Image Progress page provides status so that you can monitor installation progress as Setup continues.

  21. After installation, the Complete page provides a link to the summary log file for the installation and other important notes. To complete the [!INCLUDE ssNoVersion] installation process, select Close.

  22. If you're instructed to restart the computer, do so now. It's important to read the message from the Installation Wizard when you finish with Setup. For more information, see View and read SQL Server Setup log files.

  23. This step completes the configuration of the prepared instance of [!INCLUDE ssNoVersion] and you have completed the installation of [!INCLUDE ssNoVersion].

Add features to a prepared instance of SQL Server

  1. Insert the [!INCLUDE ssNoVersion] installation media. From the root folder, double-click Setup.exe. To install from a network share, locate the root folder on the share, and then double-click Setup.exe.

  2. The Installation Wizard runs the [!INCLUDE ssNoVersion] Installation Center. To add features to a prepared instance of [!INCLUDE ssNoVersion], select Image preparation of a stand-alone instance of [!INCLUDE ssNoVersion] on the Advanced page.

  3. The System Configuration Checker runs a discovery operation on your computer. To continue, select OK. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  4. On the Setup Support Files page, select Install to install the Setup support files.

  5. On the Prepare Image Type page, select Add features to an existing prepared instance of [!INCLUDE ssNoVersion] option. Select the specific prepared instance you want to add features to from the dropdown list of available prepared instances.

  6. On the Feature Selection page, specify the features you want to add to the specified prepared instance.

    The prerequisites for the selected features are displayed on the right-hand pane. [!INCLUDE ssNoVersion] Setup installs the prerequisites that aren't already installed during the installation step described later in this procedure.

  7. On the Prepare Image Rules page, the System Configuration Checker verifies the system state of your computer before Setup continues. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  8. The Disk Space Requirements page calculates the required disk space for the features that you specify. Then it compares the required space to the available disk space.

  9. On the Prepare Image Rules page, the System Configuration Checker runs prepare image rules to validate your computer configuration with the [!INCLUDE ssNoVersion] features that you have specified. You can view the details on the screen by selecting Show Details, or as an HTML report by selecting View detailed report.

  10. The Ready to Prepare Image page shows a tree view of installation options that were specified during Setup. To continue, select Install. [!INCLUDE ssNoVersion] Setup first installs the required prerequisites for the selected features followed by the feature installation.

  11. During installation, the Prepare Image Progress page provides status so that you can monitor installation progress as Setup continues.

  12. After installation, the Complete page provides a link to the summary log file for the installation and other important notes. To complete the [!INCLUDE ssNoVersion] installation process, select Close.

  13. If you're instructed to restart the computer, do so now. It's important to read the message from the Installation Wizard when you finish with Setup. For more information, see View and read SQL Server Setup log files.

Remove features from a prepared instance of SQL Server

  1. To begin the uninstall process, from the Start menu select Control Panel and double-click Program and Features.

  2. Double-click the [!INCLUDE ssNoVersion] component to uninstall and select Remove.

  3. Setup support rules run to verify your computer configuration. Select OK to continue.

  4. On the Select Instance page, select the prepared instance you want to modify. The name of the prepared instance is displayed as "Unconfigured PreparedInstanceID" where PreparedInstanceID is the instance you select.

  5. On the Select Features page, specify the features to remove from the [!INCLUDE ssNoVersion] instance you specified. Select Next to continue.

  6. Removal rules run to verify that the operation can complete successfully.

  7. On the Ready to Remove page, review the list of components and features that will be uninstalled.

  8. The Remove Progress page displays the status of the operation.

  9. On the Complete page, you can review the completion status of the operation. Select Close to exit the installation wizard.

Uninstall a prepared instance of SQL Server

  1. To begin the uninstall process, from the Start menu select Control Panel and double-click Program and Features.

  2. Double-click the [!INCLUDE ssNoVersion] component to uninstall and select Remove.

  3. Setup support rules run to verify your computer configuration. Select OK to continue.

  4. On the Select Instance page, select the prepared instance you want to modify. The name of the prepared instance is displayed as "Unconfigured PreparedInstanceID" where PreparedInstanceID is the instance you select.

  5. On the Select Features page, specify the features to remove from the [!INCLUDE ssNoVersion] instance you specified. Select Next to continue.

  6. On the Removal Rules page, Setup runs rules to verify that the operation can complete successfully.

  7. On the Ready to Remove page, review the list of components and features that will be uninstalled.

  8. The Remove Progress page displays the status of the operation.

  9. On the Complete page, you can review the completion status of the operation. Select Close to exit the installation wizard.

  10. Repeat steps 1 to 9 until all components of [!INCLUDE ssnoversion] have been removed.

Modify or uninstall a completed instance of SQL Server

The process to add or remove features or to uninstall a completed instance of [!INCLUDE ssNoVersion] is similar to the process to an installed instance of [!INCLUDE ssNoVersion]. For more information, see the following articles:

Related content