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)

Syntax

[SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.One)]
public UserOptions UserOptions { get; }
public:
[SfcObjectAttribute(SfcObjectRelationship::ChildObject, SfcObjectCardinality::One)]
property UserOptions^ UserOptions {
    UserOptions^ get();
}
[<SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.One)>]
member UserOptions : UserOptions with get
<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.

Remarks

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.

Examples

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()

See Also

Server Class
Microsoft.SqlServer.Management.Smo Namespace

Unable to find linked topic '776ac273-bbe5-45e2-8bc8-a6f2b9cac03a'.Unable to find linked topic '08c3c7ce-56e5-433d-976c-0fc874b6aa66'.

Return to top