Automated installation of unattended batch scripts for SQL Server 2014 Enterprise Edition

_Copyright Statement: This is an original article created by a blogger and may not be reproduced without the permission of the blogger.

SQL Server series software is a relational database management system introduced by Microsoft.At a conference in San Francisco on April 16, 2014, Microsoft CEO Satia Nadela officially launched "SQL Server 2014".
The 2014 version of SQL Server provides in-memory enhancement, the key technology for enterprise to control massive data. The built-in in in-memory technology integrates all kinds of data structures in the cloud. Its fast operation efficiency and high data compression technology help customers accelerate their business and switch to a new application environment.
It also provides analysis tools linked to Microsoft Office, and through integration with Excel and PowerBI for Office 365, SQL ServeIn 2014, Business Intelligence (BI) functions are provided to enable business personnel to conduct real-time decision analysis on their own data. It is easy to help business employees use familiar tools to convert surrounding information into environmental wisdom, bring resources to greater operational value, and thereby increase business capacity and flexibility.
In addition, SQL Server 2014 has enabled a new hybrid cloud solution that can fully benefit from cloud computing, such as cloud backup and disaster recovery

1. Tools needed

Requires 7Z decompression tool, SQLserver 2014 disc image file, sxs(.net3.5 related component package)

2. Preparations

An installation profile ConfigurationFile.ini needs to be exported via sqlserver

Here's how to configure the parameters of sql2014 you need to install

;SQL Server 2014 Configuration File

; Specify the workflow for the installer, such as INSTALL,UNINSTALL or UPGRADE. This is a required parameter. 


; Use /ENU Parameters can be localized Windows English version installed on operating system SQL Server.  


; Setup will not display any user interface. 


; Setup will only show progress without any user interaction. 


; Appoint SQL Server Whether the installer should discover and include product updates.Valid values are True and False Or 1 and 0.By default, SQL Server Setup will include the updates found. 


; Specify whether errors can be reported to Microsoft In order to improve the future SQL Server Edition.Specify 1 or True This feature will be enabled, specifying 0 or False This feature will be disabled. 


; If this parameter is provided, the computer will use Microsoft Update Check for updates. 


; Specify features to install, uninstall, or upgrade.Top-level feature list includes SQL,AS,RS,IS,MDS And tools. SQL Features will install the database engine, replication, full-text, and Data Quality Services (DQS)The server.Tools feature will install management tools, online book components, SQL Server Data Tools And other shared components. 


; Appoint SQL Server Setup will get the location of product updates.Valid values are "MU" (To search for product updates),Valid folder path and .\MyUpdates or UNC Relative paths such as shared directories.By default, SQL Server The setup program will pass through the Window Server Update Services search Microsoft Update or Windows Update Service. 


; Show command line parameter usage 


; Specifies that the detailed setup log should be sent to the console. 


; Specifies that the installer should be installed to WOW64 Medium. IA64 This command line parameter is not supported on 32-bit systems. 


; Specify the installation root directory for shared components.This directory remains unchanged after shared components have been installed. 

INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"

; Appoint WOW64 Installation root directory for shared components.Installed WOW64 This directory remains unchanged after sharing components. 

INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"

; Specify a default or named instance. MSSQLSERVER Yes and No Express Default instance of version, SQLExpress then is Express Default instance of version.Installing SQL Server database engine(SQL),Analysis Services (AS)or Reporting Services (RS)This parameter is required. 


; Specify that you can collect SQL Server Function usage data and send data to Microsoft. Specify 1 or True This feature will be enabled, specifying 0 or False This feature will be disabled. 


; For what you have specified SQL Server Function Specified Instances ID. SQL Server The directory structure, registry structure, and service name will include SQL Server Instances of instances ID.  


; Specify the installation directory. 

INSTANCEDIR="C:\Program Files\Microsoft SQL Server"

; Proxy account name 


; Start the service automatically after installation.  


; CM Block TCP Communication Port 


; How matrix uses private networks 


; How to protect communication between program blocks 


; CM Block Usage TCP port 


; SQL Server Start type of service. 


; Enable FILESTREAM Level of functionality(0,1,2 Or 3).  


; Set to "1" Can be SQL Server Express Enable RANU.  


; Specifies the Windows Collation or SQL Collation. 


; SQL Server Accounts for Services: field\User or system account. 


; To set to SQL Server Administrator's Windows Account. 


; Default value is Windows Authentication.Use "SQL" Indicates mixed mode authentication. 


;sa Password


; Set the current user to %SQL_PRODUCT_SHORT_NAME% Express Database Engine System Administrator. 


; Specify 0 to disable TCP/IP Protocol, specify 1 to enable the protocol. 


; Specify 0 to disable Named Pipes Protocol, specify 1 to enable the protocol. 


; Browser Start type of service. 


; Add Input Parameters FTSVCACCOUNT Description 


Write automatic installation (SQL version).bat

The details are as follows

Batch instructions:

#Win server 2012 install sqlserver 2014 x64 one-click script @Sungeek#

#Auto Install (SQL Version). bat or Auto Install (Component Library Version). Ba Right-click text open, change the following variable parameters, and make the changes you need. #
set Predir=C:\Sql_Server2014_Auto Installsql_server_2014 x64
Predir=The database installation package directory needs to be changed according to your actual directory.

②set Localusr=Administrator
Localusr=Change to the name of your computer system administrator.

③set Sapwd=Sg1838370
Sapwd=sa password, you must add a number in English, not a pure digital password.

1. Auto-install (SQL version). bat; Auto-install SQL server 2014 does not install.NET component library;
2. Auto Install (Component Library Edition). bat; is Auto Install.NET 3.5 + SQL SERVER 2014 X64
3. After installation, the window will be automatically closed to generate sqlinfo files.
4. Successfully installed sqlinfo file contents:
Microsoft (R) SQL Server 2014 12.00.2000.08 Copyright (C) Microsoft Corporation.All rights reserved.

(4) The installation can be completed by double-clicking the automatic installation (SQL version) of.Net library.
Double-click Automatic Installation (Component Library Edition). bat to install automatically if there is no.Net3.5 Component Library.

@echo off
title Install sqlserver 2014 x64@Sungeek

set Predir=E:\Sql_Server2014_Auto Installsql_server_2014 x64
set Localusr=Administrator
set Sapwd=Sg1838370

echo "Extract sqlserver2014 iso..."
echo "Unzipping the SQL server 2014 mirror"
7z.exe x %Predir%\sqlserver2014.iso -aos -o%Predir%\sqlserver2014

echo "installing SqlServer 2014 x64@Sungeek..."
echo "After installation, the window will automatically close to generate sqlinfo file. Please be patient!"
%Predir%\sqlserver2014\setup.exe /Q /ACTION=Install /ConfigurationFile=.\MyConfigurationFile.ini /IACCEPTSQLSERVERLICENSETERMS  /SAPWD=.\%Sapwd% /SQLSYSADMINACCOUNTS=.\%Localusr% > .\sqlinfo.txt

ping -n 10 > null


Keywords: SQL Database Windows Excel

Added by blade_922 on Sun, 05 Apr 2020 08:45:43 +0300