Server.Alter Server.Alter Server.Alter Method

Definition

Updates any Server object property changes on an instance of SQL Server.

Overloads

Alter() Alter() Alter()

Updates any Server object property changes on the instance of SQL Server.

Alter(Boolean) Alter(Boolean) Alter(Boolean)

Updates any Server object property changes on the instance of SQL Server with the option to override value checking.

Alter() Alter() Alter()

Updates any Server object property changes on the instance of SQL Server.

public:
 virtual void Alter();
public void Alter ();
Public Sub Alter ()

Examples

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")  
Write-Host "OS Version =" $srv.Information.OSVersion  
Write-Host "State =" $srv.Settings.State.ToString()  
Write-Host "Quoted Identifier support =" $srv.UserOptions.QuotedIdentifier  
$srv.Settings.LoginMode = [Microsoft.SqlServer.Management.Smo.ServerLoginMode]::Integrated  
$srv.UserOptions.AbortOnArithmeticErrors = $TRUE  
$srv.Alter()  

Remarks

The Alter method updates any changes that have been made to the Server object's properties since the Server object was created or since the last Alter statement. The modifications are combined and sent to the instance of SQL Server in one network trip.

Alter(Boolean) Alter(Boolean) Alter(Boolean)

Updates any Server object property changes on the instance of SQL Server with the option to override value checking.

public:
 void Alter(bool overrideValueChecking);
public void Alter (bool overrideValueChecking);
Public Sub Alter (overrideValueChecking As Boolean)
Parameters
overrideValueChecking
Boolean Boolean Boolean

A Boolean value that specifies whether to override validation of the Server object property values.

Applies to