다음을 통해 공유


Settings 클래스

The Settings object represents a group of configurable settings on the instance of SQL Server.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo.dll의 Microsoft.SqlServer.Smo

구문

‘선언
<SfcElementTypeAttribute("Setting")> _
Public NotInheritable Class Settings _
    Inherits SqlSmoObject _
    Implements IAlterable, IScriptable
‘사용 방법
Dim instance As Settings
[SfcElementTypeAttribute("Setting")]
public sealed class Settings : SqlSmoObject, 
    IAlterable, IScriptable
[SfcElementTypeAttribute(L"Setting")]
public ref class Settings sealed : public SqlSmoObject, 
    IAlterable, IScriptable
[<SealedAttribute>]
[<SfcElementTypeAttribute("Setting")>]
type Settings =  
    class
        inherit SqlSmoObject
        interface IAlterable
        interface IScriptable
    end
public final class Settings extends SqlSmoObject implements IAlterable, IScriptable

주의

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

To get Settings object properties, users can be a member of the public fixed server role.

To set Settings object properties, users must be a member of the sysadmin fixed server role.

Thread Safety

이 유형의 모든 public static(Microsoft Visual Basic의 경우 공유) 멤버는 다중 스레드 작업을 수행하기에 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.

예제

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Display information about the instance of SQL Server in Information and Settings.
Console.WriteLine("OS Version = " & srv.Information.OSVersion)
Console.WriteLine("State = " & srv.Settings.State.ToString)
'Display information specific to the current user in UserOptions.
Console.WriteLine("Quoted Identifier support = " & srv.UserOptions.QuotedIdentifier)
'Modify server settings in Settings.

srv.Settings.LoginMode = ServerLoginMode.Integrated
'Modify settings specific to the current connection in UserOptions.
srv.UserOptions.AbortOnArithmeticErrors = True
'Run the Alter method to make the changes on the instance of SQL Server.
srv.Alter()

상속 계층 구조

System. . :: . .Object
  Microsoft.SqlServer.Management.Smo. . :: . .SmoObjectBase
    Microsoft.SqlServer.Management.Smo. . :: . .SqlSmoObject
      Microsoft.SqlServer.Management.Smo..::..Settings

스레드로부터의 안전성

이 형식의 모든 공용 static(Visual Basic에서는 Shared) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.