For a long time I have been using different scripts for SQL Server install based on the various user requirements, with my latest client requirement I decided to create a master script for unattended install either in Clustered environment or as Standalone install. The script carters installation of all SQL related services (DB Engine, SSIS, SSAS or SSRS) and Client components including (MDS and DQC) based on user request. Basic idea was to create a SQL environment on a click of a button by any IT Personnel.
The script creates a SQL configuration file image for install so we can easily reuse it in case of DR. The script also monitors install the script monitors the Install Log in the \Setup Bootstrap\Log folder and will return the status with relevant errors.
The script creates a SQL configuration file image for install so we can easily reuse it in case of DR. The script also monitors install the script monitors the Install Log in the \Setup Bootstrap\Log folder and will return the status with relevant errors.
Using this SQL Server Install Script we perform the following tasks,
- Pre-Install Task – Create SQL Server related directories as mentioned in assumption(See Install Assumptions section).
- SQL Server Services(DB/AS/RS/IS) Stand Alone - Install
- SQL Server Stand Alone –SQL Client Install
- SQL Server Services/SQL Client Stand Alone – Uninstall
- SQL Server Services(DB/AS/RS/IS/Client) Stand Alone Re-Install with an existing SQL Server install Configuration File (DR Recovery)
- SQL Server Services(DB/AS/RS/IS) Failover Cluster – InstallFailoverCluster
- SQL Server Services(DB/AS/RS/IS) Failover Cluster – AddNode
- SQL Server Services(DB/AS/RS/IS) Failover Cluster – RemoveNode
- SQL Server Services Failover Cluster – SQL Client Install
- SQL Server Services Failover Cluster – SQL Client Uninstall
- SQL Server Services(DB/AS/RS/IS/Client) Failover Cluster Re-Install with an existing SQL Server install Configuration File (Disaster Recovery)
Install Script:-
Download the SQL Server Installation Power Shell Script from- SQLInstall_2014_16.ps1
Note:- The Script has been designed for SQL Server 2016/SQL 2014/SQL 2012/2008R2 and 2008.
Install Help:-
Install Assumptions:-
Based on the best practices followed in the industry I have detailed directory structure the install script will create and will be used by SQL Server. The drives in which the directories will be created is based on the configuration file for SQL Install.
Usage
|
Default Instance
|
Named Instance
|
SQL Binary
|
SQL Install Default (C:\Program Files\Microsoft SQL Server)
|
SQL install Default (C:\Program Files\Microsoft SQL Server)
|
User and System database data Files
|
< SQLUSERDBDRIVE> \<Servername>\Data
|
< SQLUSERDBDRIVE>\<Servername_InstanceName>\Data
|
OLAP Data File
|
< ASDATADRIVE>\<Servername>\OLAPData
|
< ASDATADRIVE>\<Servername_InstanceName>\OLAPData
|
Backup and DBA Maintenance related files
|
<SQLBACKUPDRIVE>\<Servername>\Backup
<SQLBACKUPDRIVE>\<Servername>\SQLAdmin
|
<SQLBACKUPDRIVE>\<Servername_InstanceName>\Backup
<SQLBACKUPDRIVE>\< Servername_InstanceName >\SQLAdmin
|
OLAP Backup
|
<ASBACKUPDRIVE>\<Servername>\OLAPBackup
|
<ASBACKUPDRIVE>\<Servername_InstanceName>\OLAPBackup
|
User and System database Log Files
|
<SQLUSERLOGDRIVE >\<Servername>\TLog
|
<SQLUSERLOGDRIVE>\<Servername_InstanceName>\TLog
|
OLAP Log File
|
<ASLOGDRIVE>\<Servername>\OLAPLog
|
<ASLOGDRIVE>\<Servername_InstanceName>\OLAPLog
|
Paging File Drive
|
System Default
|
System Default
|
TempDB data file
|
<SQLTEMPDBDATADRIVE>\<Servername>\Data
|
<SQLTEMPDBDATADRIVE >\<Servername_InstanceName>\Data
|
OLAP Temp
|
< ASTEMPDRIVE >\<Servername>\OLAPTemp
|
< ASTEMPDRIVE >\<Servername_InstanceName>\ OLAPTemp
|
I came up with an Idea of using 2 parameters; a user configuration file for user input and an Action Parameter to carter all requirements,
Script Help:-
SQLInstall.ps1 -c <User Input File Full UNC Path> -a <Action>
Parameter 1:- -c to User Input File for the Install
Parameter 2:- -a to Specify the Action of Install; The Value of -a can be
Only Install, InstallFailoverCluster, AddNode, RemoveNode,
Uninstall, PreInstall, PostInstall or Reinstall
Example 1:- .\SQLInstall.ps1 -c c:\SQLAutoInstall.ini -a Install
Example 2:- .\SQLInstall.ps1 -c c:\Install.ini –a InstallFailoverCluster
Example 3:- .\SQLInstall.ps1 -c c:\SQLAutoInstall.ini -a AddNode
Example 4:- .\SQLInstall.ps1 -c c:\SQLAutoInstall.ini -a RemoveNode
Example 5:- .\SQLInstall.ps1 -c c:\SQLAutoInstallConfig.ini -a UnInstall
Example 6:- .\SQLInstall.ps1 -c U:\Admin\Install.ini –a ReInstall
Example 7:- .\SQLInstall.ps1 -c U:\Admin\Install.ini –a PreInstall
|
Parameter “-a” Help: Action:-
Action specifies in which mode you want the script to run, Various Actions are Explained Below
Action specifies in which mode you want the script to run, Various Actions are Explained Below
ACTION
|
DESCRIPTION
|
-a PreInstall
|
Create SQL Server related as mention in Install assumption section on the drives specified in the user input file.
|
-a Install
|
PreInstall Action + Install SQL Server Services(DB/AS/RS/IS) and SQL Server Client on a Stand Alone server depending on User input file Configuration + PostInstall Action
|
-a InstallFailoverCluster
|
PreInstall Action + Install Failover Cluster SQL Server Services(DB/AS/RS/IS) and SQL Server Client depending on User input file Configuration + PostInstall Action
|
-a AddNode
|
Add a node to an existing cluster specified in the user input file
|
-a RemoveNode
|
Remove a node to an existing cluster specified in the user input file
|
-a Uninstall
|
Uninstall SQL Server Services(DB/AS/RS/IS) and SQL Server Client on a Stand Alone server depending on User input file Configuration and Uninstall SQL Server Client on Failover SQL clusters.
|
-a Reinstall
|
Used for DR purpose to Install SQL Server components both Standalone and Failover Cluster with an already existing SQL Server install Configuration File created during the Initial Server Build.
|
Parameter “-c” Help: User Input File Format:-
Sample User Input File,
User Input file format is very critical to successful execution of the unattended install script, details of every entry in user Input file is specified in the below table in this section,
#SQL Server Unattended Configuration File
SQL_SERVER_NAME=TESTSQLSERVER
SQLVERSION=SQL2016
INSTANCE_NAME=INST1
SQLINSTALL=TRUE
SQLCLIENTINSTALL=TRUE
ASINSTALL=TRUE
RSINSTALL=FALSE
ISINSTALL=FALSE
DQCINSTALL=FALSE
MDSINSTALL=FALSE
#Pre-InstallConfig-SQL DBEngine
SQLUSERDBDRIVE=D
SQLUSERLOGDRIVE=L
SQLBACKUPDRIVE=H
SQLTEMPDBDATADRIVE=T
SQLTEMPDBLOGDRIVE=L
SQLTEMPDBFILECOUNT=8
SQLSVCACCT=TESTDOMAIN\SQLDBServiceAccount
SQLSVCPWD=Password
SQLCOLLATION=(null)
SQLSYSADMINACCOUNTS= TESTDOMAIN\SQLDBAADGroup
SQLSVCSTARTUPTYPE=Automatic
SAPWD=Password
#Pre-InstallConfig-AS Engine
ASDATADRIVE=D
ASLOGDRIVE=L
ASBACKUPDRIVE=H
ASTEMPDRIVE=T
ASSVCACCT= TESTDOMAIN\SQLASServiceAccount
ASSVCPWD=Password
ASCOLLATION=Latin
ASSYSADMINACCOUNTS= TESTDOMAIN\SQLDBAADGroup
ASSERVERMODE=MULTIDIMENSIONAL
ASSVCSTARTUPTYPE=Automatic
#Pre-InstallConfig-IS Engine
ISAVCACCT= TESTDOMAIN\SQLISServiceAccount
ISSVCPWD=Password
ISSVCSTARTUPTYPE=Automatic
#Pre-InstallConfig-RS Engine
RSSVCACCT= TESTDOMAIN\SQLRSServiceAccount
RSSVCPWD=Password
#Pre-InstallConfig-Cluster
FAILOVERCLUSTERDISKS="Cluster Disk 1" "Cluster Disk 2"
FAILOVERCLUSTERGROUP=SQL Server (INST1)
FAILOVERCLUSTERIPADDRESSES=IPv4;10.0.0.1;Public Network;255.255.255.0
FAILOVERCLUSTERNETWORKNAME=SQLVIRTUALSERVERNAME
#Install PowerShell Config
SQLSETUPEXEPATH=Y:\SQLEXECUTABLEPATH
REINSTALLFILEPATH=(null)
|
Note: - The Default value of every configuration is (null) do not leave any value blank, instead update to (null).
Input Configuration
|
Description
|
Install mode Usage (Parameter 2)
|
Values
|
SQL_SERVER_NAME
|
Physical Server name for Stand Alone Install (without Instance name)
Cluster Network Name in case of Failover Cluster Install
|
All Install modes
|
<SQL_SERVER_NAME>, cannot be (null)
|
SQLVERSION
|
Value should be either SQL2008/SQL2012/SQL2014 or SQL2016
|
All Install modes
|
SQL2008/SQL2012/SQL2014 or SQL2016, cannot be (null)
|
INSTANCE_NAME
|
MSSQLSERVER for Default instance
<InstanceName> for named instance
|
All Install modes
|
MSSQLSERVER or <InstanceName>, cannot be (null)
|
SQLINSTALL
|
Set this TRUE to for SQL DB Engine install/Uninstall for both Stand Alone and Clusters.
|
Install, InstallFailoverCluster, AddNode, RemoveNode or Uninstall.
|
TRUE or FALSE, cannot be (null)
|
SQLCLIENTINSTALL
|
Set this TRUE to for SQL Client install/Uninstall for both Stand Alone and Clusters.
|
Install, InstallFailoverCluster, AddNode, RemoveNode or Uninstall.
|
TRUE or FALSE, cannot be (null)
|
ASINSTALL
|
Set this TRUE to for SQL Analysis Services install/Uninstall for both Stand Alone and Clusters.
|
Install, InstallFailoverCluster, AddNode, RemoveNode or Uninstall.
|
TRUE or FALSE, cannot be (null)
|
RSINSTALL
|
Set this TRUE to for SQL Reporting Services install/Uninstall for both Stand Alone and Clusters.
|
Install, InstallFailoverCluster, AddNode, RemoveNode or Uninstall.
|
TRUE or FALSE, cannot be (null)
|
ISINSTALL
|
Set this TRUE to for SQL Integration Services install/Uninstall for both Stand Alone and Clusters.
|
Install, InstallFailoverCluster, AddNode, RemoveNode or Uninstall.
|
TRUE or FALSE, cannot be (null)
|
DQCINSTALL
(Only from SQL 2012)
|
Set this TRUE to for Data Quality Client install/Uninstall for both Stand Alone and Clusters.
|
Install, InstallFailoverCluster, AddNode, RemoveNode or Uninstall.
|
SQL2012/SQL2014/SQL2016:
TRUE or FALSE, cannot be (null)
SQL2008:
FALSE, cannot be (null)
|
MDSINSTALL
(Only from SQL 2012)
|
Set this TRUE to for Master Data Services install/Uninstall for both Stand Alone and Clusters.
|
Install, InstallFailoverCluster, AddNode, RemoveNode or Uninstall.
|
SQL2012/SQL2014/SQL2016:
TRUE or FALSE, cannot be (null)
SQL2008:
FALSE, cannot be (null)
|
SQLUSERDBDRIVE
|
SQL Server User database data file drive.
|
Install, InstallFailoverCluster
|
Drive name (Eg:- D) or
Can be (null) to set SQL Server Default
|
SQLUSERLOGDRIVE
|
SQL Server User database Tlog file drive.
|
Install, InstallFailoverCluster
|
Drive name (Eg:- L) or
Can be (null) to set SQL Server Default
|
SQLBACKUPDRIVE
|
SQL Server Backup drive.
|
Install, InstallFailoverCluster
|
Drive name (Eg:- H) or
Can be (null) to set SQL Server Default
|
SQLTEMPDBDATADRIVE
|
SQL Server Tempdb data file drive
|
Install, InstallFailoverCluster
|
Drive name (Eg:- T) or
Can be (null) to set SQL Server Default
|
SQLTEMPDBLOGDRIVE
|
SQL Server Tempdb TLog file drive
|
Install, InstallFailoverCluster
|
Drive name (Eg:- L) or
Can be (null) to set SQL Server Default
|
SQLTEMPDBFILECOUNT
(Only for SQL Server 2016) |
Number of Tempdb Data Files
|
Install, InstallFailoverCluster
|
Number of Tempdb Data Files
Can be (null) to set SQL Server Default
|
SQLSVCACCT
|
SQL Server Service Account
|
Install, InstallFailoverCluster,
AddNode
|
AD Service account or Can be (null) to set SQL Server Default
|
SQLSVCPWD
|
Above SQL Server Service Account Password
|
Install, InstallFailoverCluster,
AddNode
|
Above AD Service account Password, Cannot be (null) if SQLSVCACCT is specified.
|
SQLCOLLATION
|
SQL Server Collation
|
Install, InstallFailoverCluster
|
<CollationName> or Can be (null) to set SQL Server Default
|
SQLSYSADMINACCOUNTS
|
Default SQL Server Admin AD Account
|
Install, InstallFailoverCluster
|
Usually SQL DB Administrators TESTDOMAIN\SQLDBAADGroup
|
SQLSVCSTARTUPTYPE
|
SQL Server Service Start up type
|
Install
|
Automatic , Manual or Can be (null) to set SQL Server Default
|
SAPWD
|
sa Login Password for SQL Server
|
Install, InstallFailoverCluster
|
<Password>, cannot be (null) as Mixed mode authentication is default Authentication mode.
|
ASDATADRIVE
|
Analysis Server Data Drive
|
Install, InstallFailoverCluster
|
Drive name (Eg:- D) or
Can be (null) to set SQL Server Default
|
ASLOGDRIVE
|
Analysis Server Log Drive
|
Install, InstallFailoverCluster
|
Drive name (Eg:- L) or
Can be (null) to set SQL Server Default
|
ASBACKUPDRIVE
|
Analysis Server Backup Drive
|
Install, InstallFailoverCluster
|
Drive name (Eg:- H) or
Can be (null) to set SQL Server Default
|
ASTEMPDRIVE
|
Analysis Server Temp Drive
|
Install, InstallFailoverCluster
|
Drive name (Eg:- T) or
Can be (null) to set SQL Server Default
|
ASSVCACCT
|
Analysis Server Service Account
|
Install, InstallFailoverCluster,
AddNode
|
AD Service account or Can be (null) to set SQL Server Default
|
ASSVCPWD
|
Above Analysis Server Service Account Password
|
Install, InstallFailoverCluster,
AddNode
|
Above AD Service account Password, Cannot be (null) if ASSVCACCT is specified.
|
ASCOLLATION
|
Analysis Server Collation
|
Install, InstallFailoverCluster
|
<CollationName> or Can be (null) to set SQL Server Default
|
ASSYSADMINACCOUNTS
|
Default Analysis Server Admin AD Account
|
Install, InstallFailoverCluster
|
Usually SQL DB Administrators TESTDOMAIN\SQLDBAADGroup
|
ASSERVERMODE
(Only from SQL 2012)
|
Analysis Server Install Mode MULTIDIMENSIONAL, POWERPIVOT or TABULAR
|
Install, InstallFailoverCluster
|
Value can be either MULTIDIMENSIONAL, POWERPIVOT or TABULAR. Can be (null) to set Analysis Server Default
|
ASSVCSTARTUPTYPE
|
Analysis Server Service Start up type
|
Install
|
Automatic , Manual or Can be (null) to set SQL Server Default
|
ISAVCACCT
|
Integration Server Service Account
|
Install, InstallFailoverCluster
|
AD Service account or Can be (null) to set SQL Server Default
|
ISSVCPWD
|
Above Integration Server Service Account Password
|
Install, InstallFailoverCluster,
AddNode
|
Above AD Service account Password, Cannot be (null) if ISAVCACCT is specified.
|
ISSVCSTARTUPTYPE
|
Integration Server Service Start up type
|
Install
|
Automatic , Manual or Can be (null) to set SQL Server Default
|
RSSVCACCT
|
Reporting Server Service Account
|
Install, InstallFailoverCluster
|
AD Service account or Can be (null) to set SQL Server Default
|
RSSVCPWD
|
Above Reporting Server Service Account Password
|
Install, InstallFailoverCluster,
AddNode
|
Above AD Service account Password, Cannot be (null) if RSSVCACCT is specified.
|
FAILOVERCLUSTERDISKS
|
Specifies the list of shared disks to be included in the SQL Server failover cluster resource group.
|
InstallFailoverCluster
|
List of Shared Disks to be included, Eg:- ("Cluster Disk 4" "Cluster Disk 7").Cannot be (null) for Cluster Install only.
|
FAILOVERCLUSTERGROUP
|
Specifies the name of the resource group to be used for the SQL Server failover cluster. It can be the name of an existing cluster group or the name of a new resource group.
|
InstallFailoverCluster, AddNode
|
<FAILOVERCLUSTERGROUPName>. Cannot be (null) for Cluster Install only.
|
FAILOVERCLUSTERIPADDRESSES
|
Specifies an encoded IP address. The encodings are semicolon-delimited (;) and follow the format <IP Type>;<address>;<network name>;<subnet mask>.
|
InstallFailoverCluster
|
<FAILOVERCLUSTERIPADDRESSESNAME> Cannot be (null) for Cluster Install only.
|
FAILOVERCLUSTERNETWORKNAME
|
Specifies the network name for the new SQL Server failover cluster. This name is used to identify the new SQL Server failover cluster instance on the network.
|
InstallFailoverCluster, AddNode,RemoveNode
|
<FAILOVERCLUSTERNETWORKNAME> Cannot be (null) for Cluster Install only.
|
SQLSETUPEXEPATH
|
Location of SQL Server Installation source binary folder.
|
All Install modes
|
<Full UNC Directory path/Share Directory Path> Cannot be (null)
|
REINSTALLFILEPATH
|
Location where the Unattended Install configuration File is Stored for DR
|
Reinstall
|
<Full UNC File path/Share File Path>. Cannot be (null) for Reinstall mode alone.
|
Hope this script helps to automate your SQL Install completely. I am still working on adding Upgrade of SQL Server and Install SQL CU and Service pack updates to the same script. Till then I have separate script to update the CU and Service pack for SQL Servers on this Blog.
Copyright © 2015 Vinoth N Manoharan.The information provided in this post is provided "as is" with no implied warranties or guarantees.
Mr. Manoharan,
ReplyDeleteThis seems like a great automation tool.
However, would you be able to provide an example for the ini file necessary to create AlwaysOn Cluster?
Thanks.
This is a wonderful tool, thank you for sharing. I used your earlier version to install SQL 2012 onto 30 virtual servers; it was a huge help. I had one issue in the earlier version that appears to be carried forward into the 2014/2016 script - I can specify a disk drive for tempdb log file, but the script doesn't use that value. It seems that the userdb log file disk drive is used instead. My tempdb database resides on FusionIO cards (SSD drives), and I'd like to see both tempdb data and tempdb log files go to the named drives. Can you recommend a workaround to resolve this? I will be spinning up 45 virtual servers in the next few weeks, and hope that I will not need to manually alter settings for tempdb on each of these servers after installation.
ReplyDeleteMany many thanks,
SteveA
Hi,
DeleteI seem to have missed to add the logic for the Tempdb drives, I will modify the script and let you know.
Regards,
Vinoth
Thanks, I look forward to the updated script. This is a wonderful tool, by the way. Just in case you didn't already know ;-)
DeleteThanks:-)...I have updated the script now, The TempDBLog drive configuration should work now. Let me know if you have any further issues.
DeleteRegards,
Vinoth.
This comment has been removed by the author.
DeleteThis comment has been removed by the author.
ReplyDeleteYes, It is to specify the number of Tempdb data files but the configuration has been introduced only in SQL 2016, The config will be ignored in my script if the install is not SQL 2016.
DeleteRegards,
Vinoth
Hi Vinoth,
ReplyDeleteThank you so much for the script. I have used it to setup our SQL 2014 VMs. I am just wondering if you have any plans to add support for Availability groups and AG listener?
Hi, great script. How could I add a separate service account for the agent? I have a client who has this requirement.
ReplyDeleteHi All,
ReplyDeleteWhen i try to run this script. I Couldnt find management studio of respective SQL Version. After running this script am getting four packages installed in system. Kindly let me know what needs to done. Am very much fresher. But i been task of automation of this installation. Please do provide guidance
I have seen examples on some websites where it is stated you could use the drive letter (i.e. "DISK E:") instead of the cluster drive resource name (i.e. "Cluster Drive 1" for the /FAILOVERCLUSTERDISKS parameter. I am trying to determine which disks should get assigned to which server during the silent install. My assumption is you would need to know how the LUNs were setup before creating the configuration file; however, if you know which drives were to be used for userdata, userlog, etc it would be beneficial to simply provide the drive letter versus the resource name. Do you know if this is supported?
ReplyDeleteVinoth,
ReplyDeleteI hope you're still monitoring this.
I'm getting the following error when trying to install a new instance using your script into a windows cluster:
START [Module 3]: Call CreateConfig Function
[Module 3]:SQL Server Install configuration file stored at [C:\SQLInstall\SOL-SQLAO_SOLUTIONS_SQLInstallFailoverCluster.ini]
STATUS [Module 3]:SUCCESS
END [Module 3]: Call CreateConfig Function
START [Module 4]:Execute SQL Server Setup
SQL Server 2016 transmits information about your installation experience, as well as other usage and performance data, to Microsoft to help improve the product. To learn more about SQL Server 2016 data processing and privacy controls, please see the Privacy
Statement.
The following error occurred:
The folder path specified is invalid. Please enter a valid folder path.
Error result: -2068578304
Result facility code: 1204
Result error code: 0
Please review the summary.txt log for further details
Microsoft (R) SQL Server 2016 13.00.4001.00
Copyright (c) 2016 Microsoft. All rights reserved.
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068578304
Exit facility code: 1204
Exit error code: 0
Exit message: The folder path specified is invalid. Please enter a valid folder path.
Start time: 2017-04-10 18:09:50
End time: 2017-04-10 18:10:21
Requested action: InstallFailoverCluster
STATUS [Module 4]:SQL Setup started Successfully, Check Module 4 Comments for Install Status!
STATUS [Module 4]:SQL Server Install Summary Log located @C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\Summary.txt
END [Module 4]:Execute SQL Server Setup
END[SQLInstall Script]:SQL Install Configuration File for DR and Output Log file of the Script is stored at C:\SQLInstall\ of the server this script was run
I cannot figure out what folder path it's asking for, the one for the installer is correct, as is the configuration file.
My config file contains this:
#SQL Server Unattended Configuration File
SQL_SERVER_NAME=SOL-SQLAO
SQLVERSION=SQL2016
INSTANCE_NAME=SOLUTIONS
SQLINSTALL=TRUE
SQLCLIENTINSTALL=TRUE
ASINSTALL=TRUE
RSINSTALL=TRUE
ISINSTALL=TRUE
DQCINSTALL=FALSE
MDSINSTALL=FALSE
SQLTEMPDBFILECOUNT=4
#Pre-InstallConfig-SQL DBEngine
SQLUSERDBDRIVE=K
SQLUSERLOGDRIVE=L
SQLBACKUPDRIVE=E
SQLTEMPDBDATADRIVE=T
SQLTEMPDBLOGDRIVE=T
SQLSVCACCT=solutions\svc-SQLDBService
SQLSVCPWD=-------------------------
SQLCOLLATION=(null)
SQLSYSADMINACCOUNTS=solutions\SQLDBAs
SQLSVCSTARTUPTYPE=Automatic
SAPWD=-------------
#Pre-InstallConfig-AS Engine
ASDATADRIVE=K
ASLOGDRIVE=L
ASBACKUPDRIVE=E
ASTEMPDRIVE=T
ASSVCACCT=solutions\svc-SQLASService
ASSVCPWD=----------------
ASCOLLATION=Latin
ASSYSADMINACCOUNTS=solutions\SQLDBAs
ASSERVERMODE=MULTIDIMENSIONAL
ASSVCSTARTUPTYPE=Automatic
#Pre-InstallConfig-IS Engine
ISAVCACCT=solutions\svc-SQLISService
ISSVCPWD=--------
ISSVCSTARTUPTYPE=Automatic
#Pre-InstallConfig-RS Engine
RSSVCACCT=solutions\svc-SQLRSService
RSSVCPWD=----------
#Pre-InstallConfig-Cluster
FAILOVERCLUSTERDISKS="Cluster Disk 3" "Cluster Disk 4"
FAILOVERCLUSTERGROUP=SQL Server (solutions)
FAILOVERCLUSTERIPADDRESSES=IPv4;10.x.xx.xx4;ClusterNetwork1;255.255.255.0
FAILOVERCLUSTERNETWORKNAME=Solxxxxx
#Install PowerShell Config
SQLSETUPEXEPATH=D
REINSTALLFILEPATH=(null)
Just an FYI, my message immediately above is critical I resolve quickly. Should I have the reinstallpath defined?
ReplyDeletewhere is your setup.exe stored for your install? SQLSETUPEXEPATH should contain full folder path of the setup.exe; Say for eg if it is in D:\Test folder it should be as below,
Delete#Install Power Shell Config
SQLSETUPEXEPATH=D:\Test
You do not need REINSTALLFILEPATH=(null) path its not relevant to your install. If the setup.exe is in D drive base folder use,
SQLSETUPEXEPATH=D:
Regards,
Vinoth.
I'll give that a try. It's currently D:\
DeleteI'll let you know how it goes.
Nope, no joy. :( One important detail I perhaps forgot to mention is that the type of install I'm attempting is to use the action switch for InstallFailoverCluster. This is on a two-node Windows Server 2016 cluster.
DeleteHere are the exceptions from the Summary log of the install.
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Chainer.Infrastructure.InputSettingValidationException
Message:
The folder path specified is invalid. Please enter a valid folder path.
HResult : 0x84b40000
FacilityCode : 1204 (4b4)
ErrorCode : 0 (0000)
Data:
SQL.Setup.FailureCategory = InputSettingValidationFailure
DisableWatson = true
Stack:
at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.LogAllValidationErrorsAndThrowFirstOne(ValidationState vs)
at Microsoft.SqlServer.Configuration.SetupExtension.ValidateFeatureSettingsAction.ExecuteAction(String actionId)
at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClasse.b__b()
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
Inner exception type: System.ApplicationException
Message:
The folder path specified is invalid. Please enter a valid folder path.
HResult : 0x80131600
Hi, Just to rule out where the issue is can you try doing SQL DB Cluster install alone first? I just ran the install on my test cluster everything seems to run fine.
DeleteAlso can you confirm you are running the install as As administrator? You have to run the powershell console as Adminstrator.
DeleteIf that does not work i am pretty sure the issue is with the Install path, Tomorrow I will give you a modified script which will print the actual install command which you can then verify if all the path in the command are valid.
DeleteThat sounds fantastic! Yup running this as administrator, and the account logged in is an administrator on the machine.
DeleteLooks like a permissions issue for my services, going to try again with a tweak.
DeleteVinoth,
ReplyDeleteI'm already grateful for your assistance. I've gotten services to create everything correctly. However I just can't catch a break. I really truly can't catch a break, is there a way to reinstall via the script and specify the sector size of the masterlog file?
Windows cannot start the SQL server service with the error:
Cannot use file 'K:\SOL-SQLAO_SOLUTIONS\Data\MSSQL13.SOLUTIONS\MSSQL\DATA\mastlog.ldf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 8192. Move the file to a volume with a sector size that is the same as or smaller than the original sector size.
What's stupid is that the volume is not formatted with a sector size of 8192, it's formatted with a sector size of 4096.
However even more odd is when I run:
C:\Users\administrator>fsutil fsinfo ntfsInfo K:
NTFS Volume Serial Number : 0x8c9655a096558b98
NTFS Version : 3.1
LFS Version : 2.0
Number Sectors : 0x0000000019a64fff
Total Clusters : 0x000000000334c9ff
Free Clusters : 0x0000000003341ff3
Total Reserved : 0x0000000000000400
Bytes Per Sector : 512
Bytes Per Physical Sector : 4096
Bytes Per Cluster : 4096
Bytes Per FileRecord Segment : 1024
Clusters Per FileRecord Segment : 0
I've looked up the error reported by the summary log and it seems to be a common error with SQL that's related to http: //social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/5c090e72-e83d-4fca-a087-75a3df5d2b4f/
I apologize for being a little extra needy.
-Ian
Does its script support executing to a remote computer?
ReplyDeleteHi Vinoth, for cluster disks actually we are using NAS Shares, SMB 3.0. So for the parameter FAILOVERCLUSTERDISKS what should i mention.
ReplyDeleteThank you
Hi Vinoth, not sure if you are still responding on this old topic, but can you please let me know any solution for the issue that i have mentioned regarding the NAS Shares.
ReplyDeleteThanks
Chakri
Hi,
DeleteI do think my scripts supports it, I will try to include it in the next version once we have the RTM of SQLVNext releases.
Regards,
Vinoth.
OK, I will give it a try and check. So for the field i will give something like below and see if that works
DeleteFAILOVERCLUSTERDISKS = \\TSTSQLSMB3\
Thanks
Chakri
Hi, I need to place C:\SQLInstall and "TESTSQLSERVER_INST1" under the Path where setup.exe is located, instead of creating them under the Drive directly. so that i will have all the directories under one path. How do I do that.
ReplyDeleteThanks
Anush
Hello Vinoth, how could i use my own folder structure by taking of "SOL-SQLAO" this folder naming.
ReplyDeleteHello Vinoth, I have installed SQL server 2016 but SSMS is not installed with bundle... can you help me how to do that along with your script.
ReplyDeleteHi Starting from SQL 2016 MS has made SSMS as a separate product(https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms) outside SQL server DB install, it does not come with SQL server install anymore. I will create a new Script for SSMS install separately soon.
DeleteHello Vinoth,
ReplyDeleteI am getting below error
"The IP Address '10.xx.xx.21 has an invalid network name 'Public Network'. To continue, specify an IP address with a valid network name and retry."
After I tried manually with GUI and Installed successfully.
I have verified IP address and all the Service account access. Do you have any idea what I am missing here?
Hello Vinoth,
ReplyDeleteI am getting below error
Incorrect Paramenter, use -c to specify the User Input File and use -a to specify the Action;The Value of -a can be only Install, Inst
allFailoverCluster, AddNode, RemoveNode, Uninstall,PreInstall,PostInstall or Reinstall
Help:-
******
#Parameter 1 :- -c to specify the path of User Input File for the Install
#Parameter 2 :- -a to Specify the Action of Install; The Value of -a can be only Install, InstallFailoverCluster, AddNode, RemoveNod
e, Uninstall,PreInstall,PostInstall or Reinstall
#Example1:- SQLInstall.ps1 -c -a
#Example2:- SQLInstall.ps1 -c c:\SQLAutoInstallConfig.ini -a Install
I have tried different way to use command like
.\SQLInstall.ps1 -c c:\Install.ini –a InstallFailoverCluster
.\SQLInstall.ps1 -c 'c:\Install.ini' –a 'InstallFailoverCluster'
.\SQLInstall.ps1 -c 'c:\Install.ini' –a InstallFailoverCluster
.\SQLInstall.ps1 -c "c:\Install.ini" –a "InstallFailoverCluster"
But nothing worked out. Do you have any idea about this error?
Hi Vinoth, I just wanted to thank you for your script ! I am currently modifying it to work with Cluster Shared Volumes (which is quite easy) and modifying your "arguments" logic to use newer PS logic with [(cmdletbinding)] etc ... !
ReplyDeleteHI Vinod,
ReplyDeleteIn SQL Server 2016, The SSMS tool need to install separately agter installation of sql server DB engine
is this script is take of SSMS tool installation also ?
HI Vinod,
ReplyDeleteIn SQL Server 2016, The SSMS tool need to install separately agter installation of sql server DB engine
is this script is take of SSMS tool installation also ?
Is there any way to script out the SQL cluster current set up so that that can be restored or used for the identifying the settings/values for the new cluster set up.
ReplyDeleteTODAY I GOT MY DESIRED XMAS LOAN AMOUNT $520,000.00 FROM A RELIABLE AND TRUSTED LOAN COMPANY. IF YOU NEED A LOAN NOW EMAIL CONTACT drbenjaminfinance@gmail.com
ReplyDeleteHello, I'm here to testify of how i got my loan from BENJAMIN LOAN FINANCE(drbenjaminfinance@gmail.com) I don't know if you are in need of an urgent loan to pay bills, start business or build a house, they offer all kinds of loan. So feel free to contact Dr. Benjamin Owen he holds all of the information about how to obtain money quickly and painlessly without cost/stress via Email: drbenjaminfinance@gmail.com
Consider all your financial problems tackled and solved ASAP. Share this to help a soul right now THANKS.
Using a DSLR tripod is up to you. While they can be bulky and add weight to the equipment you're carrying, they can also prevent blurry pictures due to shaky hands and bad lighting. Many DSLR cameras are now being manufactured to adjust for shaking and low lights. If you have one of these cameras or are considering getting one, there's not really a need for a tripod. If you just prefer using a tripod, then go for the best one that you can afford. As a photographer, you can't afford to buy bad equipment. Having your tripod break in the middle of a photo shoot will not improve your day. tripod for phone
ReplyDelete