-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added New parameter ProductCoveredbySA that is introduced in SQL 2022 (…
…#2044) - SqlSetup - Added new parameter ProductCoveredbySA which is introduced in SQL 2022.
- Loading branch information
1 parent
3c30929
commit dd56306
Showing
6 changed files
with
277 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
source/Examples/Resources/SqlSetup/8-InstallDefaultInstanceSingleServer2022OrLater.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to install a default instance of SQL Server, and | ||
Analysis Services in Tabular mode, on a single server. | ||
It contains configurations that apply to Sql Server 2022 or later only. | ||
.NOTES | ||
SQL Server setup is run using the SYSTEM account. Even if SetupCredential is provided | ||
it is not used to install SQL Server at this time (see issue #139). | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
[CmdletBinding()] | ||
param | ||
( | ||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[System.Management.Automation.PSCredential] | ||
$SqlInstallCredential, | ||
|
||
[Parameter()] | ||
[ValidateNotNullOrEmpty()] | ||
[System.Management.Automation.PSCredential] | ||
$SqlAdministratorCredential = $SqlInstallCredential, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[System.Management.Automation.PSCredential] | ||
$SqlServiceCredential, | ||
|
||
[Parameter()] | ||
[ValidateNotNullOrEmpty()] | ||
[System.Management.Automation.PSCredential] | ||
$SqlAgentServiceCredential = $SqlServiceCredential | ||
) | ||
|
||
Import-DscResource -ModuleName 'xPSDesiredStateConfiguration' -ModuleVersion '9.1.0' | ||
Import-DscResource -ModuleName 'SqlServerDsc' | ||
|
||
node localhost | ||
{ | ||
#region Install prerequisites for SQL Server | ||
WindowsFeature 'NetFramework35' | ||
{ | ||
Name = 'NET-Framework-Core' | ||
Source = '\\fileserver.company.local\images$\Win2k12R2\Sources\Sxs' # Assumes built-in Everyone has read permission to the share and path. | ||
Ensure = 'Present' | ||
} | ||
|
||
WindowsFeature 'NetFramework45' | ||
{ | ||
Name = 'NET-Framework-45-Core' | ||
Ensure = 'Present' | ||
} | ||
#endregion Install prerequisites for SQL Server | ||
|
||
#region Install SQL Server | ||
SqlSetup 'InstallDefaultInstance' | ||
{ | ||
InstanceName = 'MSSQLSERVER' | ||
Features = 'SQLENGINE,AS' | ||
SQLCollation = 'SQL_Latin1_General_CP1_CI_AS' | ||
SQLSvcAccount = $SqlServiceCredential | ||
AgtSvcAccount = $SqlAgentServiceCredential | ||
ASSvcAccount = $SqlServiceCredential | ||
SQLSysAdminAccounts = 'COMPANY\SQL Administrators', $SqlAdministratorCredential.UserName | ||
ASSysAdminAccounts = 'COMPANY\SQL Administrators', $SqlAdministratorCredential.UserName | ||
InstallSharedDir = 'C:\Program Files\Microsoft SQL Server' | ||
InstallSharedWOWDir = 'C:\Program Files (x86)\Microsoft SQL Server' | ||
InstanceDir = 'C:\Program Files\Microsoft SQL Server' | ||
InstallSQLDataDir = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Data' | ||
SQLUserDBDir = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Data' | ||
SQLUserDBLogDir = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Data' | ||
SQLTempDBDir = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Data' | ||
SQLTempDBLogDir = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Data' | ||
SQLBackupDir = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Backup' | ||
ASServerMode = 'TABULAR' | ||
ASConfigDir = 'C:\MSOLAP\Config' | ||
ASDataDir = 'C:\MSOLAP\Data' | ||
ASLogDir = 'C:\MSOLAP\Log' | ||
ASBackupDir = 'C:\MSOLAP\Backup' | ||
ASTempDir = 'C:\MSOLAP\Temp' | ||
SourcePath = 'C:\InstallMedia\SQL2016RTM' | ||
UpdateEnabled = 'False' | ||
ProductCoveredbySA = $true | ||
ForceReboot = $false | ||
SqlTempdbFileCount = 4 | ||
SqlTempdbFileSize = 1024 | ||
SqlTempdbFileGrowth = 512 | ||
SqlTempdbLogFileSize = 128 | ||
SqlTempdbLogFileGrowth = 64 | ||
|
||
PsDscRunAsCredential = $SqlInstallCredential | ||
|
||
DependsOn = '[WindowsFeature]NetFramework35', '[WindowsFeature]NetFramework45' | ||
} | ||
#endregion Install SQL Server | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.