Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Server::UserOptions Property

 

Applies To: SQL Server 2016 Preview

Gets the user options for the current connection to the instance of SQL Server.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public:
[SfcObjectAttribute(SfcObjectRelationship::ChildObject, SfcObjectCardinality::One)]
property UserOptions^ UserOptions {
	UserOptions^ get();
}

Property Value

Type: Microsoft.SqlServer.Management.Smo::UserOptions^

A UserOptions object that specifies user options for the current connection to the instance of SQL Server.

The UserOptions property points to the UserOptions object. This object can be used to view or modify user-specific settings, such as the ANSI settings, for the instance of SQL Server. The UserOptions object properties contain other settings that you can modify.

Legacy Code Example

Code snippet is not found. Confirm that the code snippet name 'SMO How to' is correct.

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()
Return to top
Show:
© 2015 Microsoft