-
Notifications
You must be signed in to change notification settings - Fork 225
Set‑SqlDscStartupParameter
Sets startup parameters on a Database Engine instance.
Set-SqlDscStartupParameter [-ServerName <String>] [-InstanceName <String>] [-TraceFlag <UInt32[]>]
[-InternalTraceFlag <UInt32[]>] [-Force] [-WhatIf] [-Confirm]
[<CommonParameters>]
Set-SqlDscStartupParameter -ServiceObject <Service> [-TraceFlag <UInt32[]>] [-InternalTraceFlag <UInt32[]>]
[-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Sets startup parameters on a Database Engine instance.
Set-SqlDscStartupParameters -TraceFlag 4199
Replaces the trace flags with 4199 on the Database Engine default instance on the server where the command in run.
$serviceObject = Get-SqlDscManagedComputerService -ServiceType 'DatabaseEngine'
Set-SqlDscTraceFlag -ServiceObject $serviceObject -TraceFlag 4199
Replaces the trace flags with 4199 on the Database Engine default instance on the server where the command in run.
Set-SqlDscTraceFlag -InstanceName 'SQL2022' -TraceFlag @()
Removes all the trace flags from the Database Engine instance 'SQL2022' on the server where the command in run.
Specifies that the startup parameters should be set without any confirmation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Specifies the instance name on which to set the startup parameters.
Type: String
Parameter Sets: ByServerName
Aliases:
Required: False
Position: Named
Default value: MSSQLSERVER
Accept pipeline input: False
Accept wildcard characters: False
Specifies the internal trace flags to set.
From the Database Engine Service Startup Options documentation: "...this sets other internal trace flags that are required only by SQL Server support engineers."
Type: UInt32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the server name where the instance exist.
Type: String
Parameter Sets: ByServerName
Aliases:
Required: False
Position: Named
Default value: (Get-ComputerName)
Accept pipeline input: False
Accept wildcard characters: False
Specifies the Service object on which to set the startup parameters.
Type: Service
Parameter Sets: ByServiceObject
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies the trace flags to set.
Type: UInt32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This command should support setting the values according to this documentation: https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/database-engine-service-startup-options
- Add-SqlDscNode
- Add-SqlDscTraceFlag
- Complete-SqlDscFailoverCluster
- Complete-SqlDscImage
- Connect-SqlDscDatabaseEngine
- ConvertFrom-SqlDscDatabasePermission
- ConvertFrom-SqlDscServerPermission
- ConvertTo-SqlDscDatabasePermission
- ConvertTo-SqlDscServerPermission
- Disable-SqlDscAudit
- Disconnect-SqlDscDatabaseEngine
- Enable-SqlDscAudit
- Get-SqlDscAudit
- Get-SqlDscConfigurationOption
- Get-SqlDscDatabasePermission
- Get-SqlDscManagedComputer
- Get-SqlDscManagedComputerService
- Get-SqlDscPreferredModule
- Get-SqlDscServerPermission
- Get-SqlDscStartupParameter
- Get-SqlDscTraceFlag
- Import-SqlDscPreferredModule
- Initialize-SqlDscRebuildDatabase
- Install-SqlDscServer
- Invoke-SqlDscQuery
- New-SqlDscAudit
- Remove-SqlDscAudit
- Remove-SqlDscNode
- Remove-SqlDscTraceFlag
- Repair-SqlDscServer
- Save-SqlDscSqlServerMediaFile
- Set-SqlDscAudit
- Set-SqlDscDatabasePermission
- Set-SqlDscServerPermission
- Set-SqlDscStartupParameter
- Set-SqlDscTraceFlag
- Test-SqlDscIsDatabasePrincipal
- Test-SqlDscIsLogin
- Test-SqlDscIsSupportedFeature
- Uninstall-SqlDscServer
- SqlAG
- SqlAGDatabase
- SqlAgentAlert
- SqlAgentFailsafe
- SqlAgentOperator
- SqlAGListener
- SqlAGReplica
- SqlAlias
- SqlAlwaysOnService
- SqlAudit
- SqlConfiguration
- SqlDatabase
- SqlDatabaseDefaultLocation
- SqlDatabaseMail
- SqlDatabaseObjectPermission
- SqlDatabasePermission
- SqlDatabaseRole
- SqlDatabaseUser
- SqlEndpoint
- SqlEndpointPermission
- SqlLogin
- SqlMaxDop
- SqlMemory
- SqlPermission
- SqlProtocol
- SqlProtocolTcpIp
- SqlReplication
- SqlRole
- SqlRS
- SqlRSSetup
- SqlScript
- SqlScriptQuery
- SqlSecureConnection
- SqlServiceAccount
- SqlSetup
- SqlTraceFlag
- SqlWaitForAG
- SqlWindowsFirewall