SQL Server Unattended Install Script

Here is a SQL Server Unattended Install Script I wrote last week... was nice to get it working finally!!!

 

;the PIDKEY will show up in greyed out text boxes during a MANUAL Install... use this for the PIDKEY Parameter IF NECESSARY (probably not necessary) https://msdn2.microsoft.com/en-us/library/ms144259.aspx#pidkey
;create a directory c:\binaries
;create a directory c:\data
;run the silent install from your install directory (here the V drive): 
;V:\>Setup.exe /settings C:/setup.ini /qb 
; /qn is quiet mode, no GUI is displayed.
; /qb is quiet mode, basic GUI information is displayed, no user interaction is required. Use /qb
;check for install errors: C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG

;OR... you can run the install without a .ini file!:
;V:\>setup.exe /qb INSTANCENAME=FOO9 ADDLOCAL=SQL_Engine,Client_Components,Connectivity,SQL_Tools90,SQLXML,SQL_Documentation,SQL_BooksOnline,SQL_DatabaseSamples,SQL_AdventureWorksSamples,SQL_AdventureWorksDWSamples,SQL_AdventureWorksASSamples,SQL_Samples SAPWD=password SQLACCOUNT=ComputerName\administrator SQLPASSWORD=password  AGTACCOUNT=ComputerName\Administrator AGTPASSWORD=password  SQLBROWSERACCOUNT=ComputerName\administrator  SQLBROWSERPASSWORD=password

[Options]
USERNAME="Foo User"
COMPANYNAME="Foo Company"

;While specifying the SQLACCOUNT, AGTACCOUNT and SQLBROWSERACCOUNT, refer to these guidelines:
;Domain User account    :<domain\user>
;Local System Account   :"NT AUTHORITY\SYSTEM"
;Network Service Account:"NT AUTHORITY\NETWORK SERVICE"
;Local Service Account :"NT AUTHORITY\LOCAL SERVICE"

SQLACCOUNT="ComputerName\Administrator"
SQLPASSWORD="password"

AGTACCOUNT="ComputerName\Administrator"
AGTPASSWORD="password"

SQLBROWSERACCOUNT= "ComputerName\Administrator"
SQLBROWSERPASSWORD="password"

ASACCOUNT=ComputerName\Administrator"
ASPASSWORD="password"

RSACCOUNT=ComputerName\Administrator"
RSPASSWORD= "password"

ADDLOCAL=SQL_Engine,SQL_Tools90

;features to add:

ADDLOCAL=SQL_Engine,Client_Components,Connectivity,SQL_Tools90,SQLXML,SQL_Documentation,SQL_BooksOnline,SQL_DatabaseSamples,SQL_AdventureWorksSamples,SQL_AdventureWorksDWSamples,SQL_AdventureWorksASSamples,SQL_Samples 

;features you can install:
; SQL Server Database Services  SQL_Engine
; Data Files    SQL_Data_Files
; Replication                         SQL_Replication
; Full-Text Search Engine             SQL_FullText
; Analysis Server                       Analysis_Server
; Data Files                          AnalysisDataFiles
; Reporting Services                    RS_Server
; Report Manager                      RS_Web_Interface
; Notification Services   Notification_Services
; Engine Components       RS_Engine
; Client Components   NS_Client
; Integration Services           SQL_DTS
; Client Components*                    Client_Components
; Connectivity Components            Connectivity
; Management Tools                   SQL_Tools90
; Business Intelligence Development Studio SQL_WarehouseDevWorkbench
; Software Development Kit           SDK
; SQLXML Client Features             SQLXML
; Legacy Components                  Tools_Legacy
; Documentation and Samples*            SQL_Documentation
; SQL Server Books Online               SQL_BooksOnline
; Sample Databases                      SQL_DatabaseSamples
; AdventureWorks Sample OLTP            SQL_AdventureWorksSamples
; AdventureWorksDW Sample Data Warehouse SQL_AdventureWorksDWSamples
; AdventureWorks Sample OLAP            SQL_AdventureWorksASSamples
; Sample Code and Applications          SQL_Samples 

 

;PIDKEY= AAAAAAAAAAAAAAAAAAAAAAAAA

INSTALLSQLDIR="c:\binaries"

INSTALLSQLSHAREDDIR="c:\binaries"

INSTALLSQLDATADIR="c:\data"

;NAMED INSTANCE
INSTANCENAME=FOO

;DEFAULT INSTANCE
;INSTANCENAME=MSSQLSERVER

SQLAUTOSTART=1
AGTAUTOSTART=1

SECURITYMODE=SQL

SAPWD=adminSQL!

[SQLCOLLATION]
SQLCOLLATION=Latin1_General

ERRORREPORTING=0

DISABLENETWORKPROTOCOLS=1