SQL Server 2008r2 Automated Batch script installation

Source: Internet
Author: User
Tags microsoft sql server sql 2008 mssqlserver sql server express

▲ Copyright notice: This article for Bo Master original article, without Bo Master permission not reproduced.

Microsoft SQL Server R2 is a software that provides complete enterprise-level technology and tools to help you get the most valuable information at the lowest total cost of ownership. You can take full advantage of high performance, high availability, high security, and more efficient management and development tools to leverage self-service business intelligence for broader, deeper business insights.

1. Required Tools

Requires 7Z decompression tool, SQLSERVER2008R2 disc image file, SQL 2008 key, SxS (. net3.5 related packages)

2. Preparatory work

A copy of the installation profile needs to be exported via SQL Server Configurationfile.ini

Here, write the relevant parameter configuration for the SQL2008R2 to be installed.

;SQLSERVER2008 Configuration File[SQLSERVER2008];Specifies the instance ID for the SQL Server feature that you have specified. The SQL Server directory structure, registry structure, and service name will reflect the instance ID of the SQL Server instance. INSTANCEID= "MSSQLSERVER";Specifies the workflow for the installer, such as install, UNINSTALL, or UPGRADE. This is a required parameter. ACTION= "Install";Specifies the features to install, uninstall, or upgrade. The top-level feature list includes SQL, as, RS, is, and tools. The SQL feature installs the database engine, replication, and full-text. The Tools feature installs Administrative tools, Books Online, businessintelligence development Studio, and other shared components. Features=sql,as,rs,is,toolsFEATURES=sql,Tools;Show Command line parameter usage Help= "False";Specifies that detailed setup logs should be delivered to the console. indicateprogress= "False";the installer will not display any user interface. QUIET= "False";the installer will only show progress and no user interaction is required. Quietsimple= "True";Specifies that the installer should be installed in WOW64. This command-line parameter is not supported on IA64 or 32-bit systems. X86= "False";Specifies whether errors can be reported to Microsoft in order to improve future versions of SQL Server. Specifying 1 or True will enable this feature, and specifying 0 or False will disable this feature. errorreporting= "False";Specifies the installation root directory for the native shared component. Installshareddir= "D:\Program Files\Microsoft SQL Server";Specifies the installation root directory for the WOW64 shared component. Installsharedwowdir= "D:\Program Files (x86) \microsoft SQL Server";Specifies the installation directory. Instancedir= "D:\Program Files\Microsoft SQL Server";Specifies that you can collect SQL Server feature usage data and send data to Microsoft. Specifying 1 or True will enable this feature, and specifying 0 or False will disable this feature. sqmreporting= "False";Specifies the default instance or named instance. MSSQLSERVER is the default instance of the non-Express version, and SQLExpress is the default instance of the Express version. This parameter is required when installing SQL Server Database Engine (SQL), AnalysisServices (AS), or ReportingServices (RS). InstanceName= "MSSQLSERVER";Proxy account nameAgtsvcaccount= "NT Authority\System";automatically start the service after installation. Agtsvcstartuptype= "Automatic";the startup type of integration Services. Issvcstartuptype= "Automatic";account for integration Services: domain \ User or SYSTEM account. ;issvcaccount= "Ntauthority\system";The name of the account that is used to run the Analysis Services service. ;assvcaccount= "Ntauthority\system";controls the service startup type setting after the service is created. ;assysadminaccounts= "Win-77v7g8tebrt\administrator";assvcstartuptype= "Automatic";the collation to be used by analysis Services. ;ascollation= "Chinese_prc_ci_as";the location of the analysis Services data file. ;asdatadir= "D:\Program files\microsoftsql server\msas10_50.mssqlserver\olap\data";the location of the analysis Services log file. ;aslogdir= "D:\Program files\microsoftsql server\msas10_50.mssqlserver\olap\log";location of the analysis Services backup file. ;asbackupdir= "D:\Program Files\Microsoft SQL Server\msas10_50.mssqlserver\olap\backup";location of the analysis Services temp file. ;astempdir= "D:\Program files\microsoftsql server\msas10_50.mssqlserver\olap\temp";the location of the analysis Services configuration file. ;asconfigdir= "D:\Program Files\Microsoft SQL Server\msas10_50.mssqlserver\olap\config";Specifies whether the MSOLAP provider is allowed to run in the process. ;asprovidermsolap= "1";the startup type of the SQL Server service. Sqlsvcstartuptype= "Automatic";enables the level of the FILESTREAM feature (0, 1, 2, or 3). Filestreamlevel= "0";set to "1" to enable RANU for SQL Server Express. Enableranu= "False";Specifies the Windows collation or SQL collation to use for the database engine. sqlcollation= "Chinese_prc_ci_as";account for the SQL Server service: domain \ User or SYSTEM account. Sqlsvcaccount= "NT Authority\System";the Windows account to be set as the SQL Server system administrator. ;sqlsysadminaccounts= "Zyl-pc\zyl";The default value is Windows authentication. Using "SQL" means mixed-mode authentication. SecurityMode= "SQL";sa passwordsapwd=3ua5amle7cryd;set the current user as the database engine system administrator for SQL Server R2 Express. Addcurrentuserassqladmin= "False";Specify 0 To disable the TCP/IP protocol, and specify 1 to enable the protocol. tcpenabled= "1";Specify 0 To disable the Named pipes protocol, and specify 1 to enable the protocol. npenabled= "0";the startup type of the Browser service. ;browsersvcstartuptype= "Disabled";Specifies the account that the report Server NT service should use when it executes. If this value is omitted or the value is an empty string, the default built-in account for the current operating system will be used. ;the user name portion of the Rssvcaccount has a maximum length of 20 characters,;the maximum length of the domain portion of the rssvcaccount is 254 characters. ;rssvcaccount= "Ntauthority\system";Specifies the startup mode of the report Server NT service. ;Manual-Starts the service under manual mode (default). ;Automatic-Starts the service in automatic mode. ;Disabled-The service is in a disabled state;rssvcstartuptype= "Automatic";Specifies the installation mode for the report server. ;default value: "Filesonly";rsinstallmode= "Defaultnativemode";Add a description of the input parameter Ftsvcaccount;ftsvcaccount= "NT authority\localservice"

Write the automatic installation (SQL version). bat

Specific content is as follows

Batch processing instructions:

#Win server R2 Install SQL Server x64 One-click Script @Sungeek #

#自动安装 (SQL Version). bat or Auto-install (Component Library Edition). Bat Right-click the text to open, change the following variable parameter, as you need to modify. #
①set predir=c:\sql_server2008r2_ Automatic Installation \sql_server_2008r2
The predir= database installation package directory needs to be changed according to your actual directory.

②set Localusr=administrator
localusr= change to your computer system administrator name.

③set sapwd=aw810618
Sapwd=sa password, must be English plus digital, pure digital password not.

Description
1. Automatic installation (SQL version). bat; is the automatic installation of SQL Server 2008R2 does not install the. NET component library;
2. Automatic installation (component library version). bat; is automatically installed. NET 3.5 + SQL SERVER X64
3. After installation, the window is automatically closed to generate the Sqlinfo file.
4. Successful installation, Sqlinfo file contents:
Microsoft (R) SQL Server 2014 12.00.2000.08 Copyright (C) Microsoft Corporation. All rights reserved.

④ has been installed. NET Library, double-click Automatic Installation (SQL Edition). BAT to complete the installation.
If not. Net3.5 component library Double-click Automatic installation (Component Library Edition). BAT can be installed automatically.

@echo offtitle Install SQL Server 2008R2 [email protected]color 0Aset predir=e:\f disk backup \sql Automatic installation script \SQL_SERVER_2008R2 automatic installation \ SQL_SERVER_2008R2 Automatic installation \sql_server_2008r2set localusr=administratorset sapwd=aw810618echo "Extract sqlserver2008 Zip ... "echo" is extracting SQL Server2008 compressed package "7z.exe x%predir%\sqlserver2008r2.iso-aos-o%predir%\sqlserver2008r2echo" Installing SQL Server 2008R2 [email protected] "echo" will automatically close the window to generate Sqlinfo files after installation, please wait patiently! "%predir%\sqlserver2008r2\setup.exe/q/action=install/configurationfile=.\configurationfile.ini/ Iacceptsqlserverlicenseterms  /sapwd=.\%sapwd%/sqlsysadminaccounts=.\%localusr% >. \sqlinfo.txtping-n 10 127.0.0.1 > Null

SQL Server 2008r2 Automated Batch script installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.