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)

<SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.One)>
Public ReadOnly Property UserOptions As UserOptions

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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft