Share via


Credential 類別

The Credential object represents a Microsoft SQL Server credential.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute> _
Public NotInheritable Class Credential _
    Inherits NamedSmoObject _
    Implements ICreatable, IAlterable, IDroppable
'用途
Dim instance As Credential
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute]
public sealed class Credential : NamedSmoObject, 
    ICreatable, IAlterable, IDroppable
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute]
public ref class Credential sealed : public NamedSmoObject, 
    ICreatable, IAlterable, IDroppable
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute>]
type Credential =  
    class
        inherit NamedSmoObject
        interface ICreatable
        interface IAlterable
        interface IDroppable
    end
public final class Credential extends NamedSmoObject implements ICreatable, IAlterable, IDroppable

備註

Credentials provide SQL Server authenticated users with an identity outside of SQL Server, on the local machine or on the network domain.

Credentials can also be used when a SQL Server authenticated user needs access to a domain resource, such as a file location to store a backup.

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

To set Credential object properties and run the Alter method, users must have ALTER ANY CREDENTIAL permission on the parent server, or be a member of the sysadmin fixed server role.

To create a credential, users must have ALTER ANY CREDENTIAL permission on the parent server, or be a member of the sysadmin fixed server role.

To drop a credential, users must have ALTER ANY CREDENTIAL permission on the parent server, or be a member of the sysadmin fixed server role.

Thread Safety

這種類型的任何公用靜態 (在 Microsoft Visual Basic 中則為 Shared) 成員都可用於多執行緒作業。並不是所有的執行個體成員都保證可以用於所有的執行緒。

執行緒安全性

這個類型的任何公用static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員都可以是安全執行緒。