Login Members
The Login object represents a Microsoft SQL Server login account that has been granted access to the instance of SQL Server through Microsoft Windows Authentication or SQL Server Authentication.
The following tables list the members exposed by the Login type.
Public Constructors
Nombre | Description | |
---|---|---|
Login | Overloaded. Initializes a new instance of the Login class. |
Arriba
Protected Fields
Nombre | Description | |
---|---|---|
m_ExtendedProperties | (inherited from SqlSmoObject ) |
Arriba
Public Properties
(see also Protected Properties )
Nombre | Description | |
---|---|---|
AsymmetricKey | Gets the asymmetric key associated with the login. | |
Certificate | Gets the certificate associated with the login. | |
CreateDate | Gets the date and time when the login account was created. | |
Credential | Gets the credential associated with the login. | |
DateLastModified | Gets the date and time when the login account was last modified. | |
DefaultDatabase | Gets or sets the default database that the login account is assigned to after logging on to the instance of Microsoft SQL Server. | |
DenyWindowsLogin | Gets or sets the Boolean property value that specifies whether the login account has been granted or denied the ability to log on to the instance of Microsoft SQL Server. | |
Events | Gets the events associated with the login account. | |
HasAccess | Gets or sets the Boolean property value that specifies whether the Microsoft SQL Server login account has access to the instance of SQL Server. | |
ID | Gets the ID value that uniquely identifies the login account. | |
IsDisabled | Gets or sets the Boolean property value that specifies whether the Microsoft SQL Server login account is disabled. | |
IsLocked | Gets the Boolean property value that specifies whether the login account has been locked out of the instance of Microsoft SQL Server. | |
IsPasswordExpired | Gets the Boolean property value that specifies whether the password for the Microsoft SQL Server login account has expired. | |
IsSystemObject | Gets or sets the Boolean property value that specifies whether the Microsoft SQL Server login account is a system object. | |
Language | Gets or sets the language required by the referenced login account for date formats and system messages. | |
LanguageAlias | Gets the alias name used for the language that is required by the Microsoft SQL Server login account. | |
LoginType | Gets or sets the type of Microsoft SQL Server login account. | |
MustChangePassword | Gets the Boolean property value that specifies whether the login account password must be changed when the user next logs on to the instance of Microsoft SQL Server. | |
Name | Gets or sets the name of the object. (inherited from NamedSmoObject) | |
Parent | Gets the Server object that is the parent of the Login object. | |
PasswordExpirationEnabled | Gets the Boolean property value that specifies whether the password for the login account will automatically expire. | |
PasswordPolicyEnforced | Gets the Boolean property value that specifies whether password policy is enforced for this login account. | |
Properties | Gets a collection of Property objects that represent the object properties. (inherited from SqlSmoObject) | |
Sid | Gets or sets the security identifier (SID) for the login account. | |
State | Gets the state of the referenced object. (inherited from SmoObjectBase) | |
Urn | Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (inherited from SqlSmoObject) | |
UserData | Gets or sets user-defined data associated with the referenced object. (inherited from SmoObjectBase) | |
WindowsLoginAccessType | Gets the type of Microsoft Windows logon access. |
Arriba
Protected Properties
Nombre | Description | |
---|---|---|
ExecuteForScalar | Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (inherited from SqlSmoObject) | |
ObjectInSpace | Gets the Boolean property value that specifies whether the object exists in isolation or whether it is connected to the instance of Microsoft SQL Server directly or indirectly. (inherited from SqlSmoObject) | |
PresetProperties | Gets or sets the preset properties of the referenced object. (inherited from SqlSmoObject) | |
ScalarResult | Gets the scalar result for the referenced object. (inherited from SqlSmoObject) |
Arriba
Public Methods
(see also Protected Methods )
Nombre | Description | |
---|---|---|
AddToRole | Adds the login account to a Microsoft SQL Server role. | |
Alter | Updates any Login object property changes on the login account on the instance of Microsoft SQL Server. | |
ChangePassword | Overloaded. Changes the password for the login account. | |
Create | Overloaded. | |
Deny | Overloaded. Denies the specified set of permissions for the specified grantees on the login account. | |
Disable | Disables the login account. | |
Drop | Removes the login account from the instance of Microsoft SQL Server. | |
Enable | Enables the login account. | |
EnumAgentProxyAccounts | Enumerates a list of agent proxy accounts in which the login account is participating. | |
EnumDatabaseMappings | Enumerates a list of login account mappings to databases and database users. | |
EnumObjectPermissions | Overloaded. Enumerates a list of object permissions for the login account. | |
Equals | Overloaded. (inherited from Object ) | |
GetDatabaseUser | Gets the name of the user that the login account is mapped to in a specified database. | |
GetHashCode | (inherited from Object ) | |
GetType | (inherited from Object ) | |
Grant | Overloaded. Grants the specified set of permissions to the specified grantees on the login account. | |
Initialize | Overloaded. Initializes the object and forces the properties be loaded. (inherited from SqlSmoObject) | |
IsMember | Returns a Boolean value that specifies whether the login account is a member of a specified role. | |
ListMembers | Returns a list of the roles of which the login account is a member. | |
ReferenceEquals | (inherited from Object ) | |
Refresh | Refreshes the script name. (inherited from ScriptNameObjectBase) | |
Rename | Renames the login account. | |
Revoke | Overloaded. Revokes a previously granted set of permissions from a grantee or grantees on the login account. | |
Script | Overloaded. Generates a Transact-SQL script that can be used to re-create the login account. | |
ToString | Returns a String that represents the referenced object. (inherited from SqlSmoObject) |
Arriba
Protected Methods
Nombre | Description | |
---|---|---|
AlterImpl | (inherited from SqlSmoObject ) | |
AlterImplFinish | (inherited from SqlSmoObject ) | |
AlterImplInit | (inherited from SqlSmoObject ) | |
AlterImplWorker | (inherited from SqlSmoObject ) | |
AppendCommaText | (inherited from ScriptNameObjectBase ) | |
AppendWithCommaText | (inherited from ScriptNameObjectBase ) | |
AppendWithOption | (inherited from ScriptNameObjectBase ) | |
BindDefaultImpl | (inherited from SqlSmoObject ) | |
BindRuleImpl | (inherited from SqlSmoObject ) | |
CheckCollation | (inherited from SqlSmoObject ) | |
CheckObjectState | Overloaded. Validates the state of the referenced object. (inherited from SqlSmoObject) | |
CheckObjectStateImpl | (inherited from SqlSmoObject ) | |
CheckTextCorectness | (inherited from ScriptNameObjectBase ) | |
CheckTextModeSupport | (inherited from ScriptNameObjectBase ) | |
CheckVersion80 | Checks the validity of the object on Microsoft SQL Server 2000. (inherited from SqlSmoObject) | |
CheckVersion80SP3 | Checks the validity of the object on Microsoft SQL Server 2000 SP3. (inherited from SqlSmoObject) | |
CheckVersion90 | Check the validity of the object on Microsoft SQL Server 2005. (inherited from SqlSmoObject) | |
CheckVersionBelow90 | (inherited from SqlSmoObject ) | |
CleanObject | Cleans the referenced object. (inherited from ScriptNameObjectBase) | |
CreateImpl | (inherited from SqlSmoObject ) | |
CreateImplFinish | (inherited from SqlSmoObject ) | |
CreateImplInit | (inherited from SqlSmoObject ) | |
DropImpl | (inherited from SqlSmoObject ) | |
DropImplWorker | (inherited from SqlSmoObject ) | |
Finalize | (inherited from Object ) | |
ForceTextModeOnTextBody | Enforces text mode on the text body. (inherited from ScriptNameObjectBase) | |
FormatSqlVariant | (inherited from SqlSmoObject ) | |
GenerateDataSpaceScript | (inherited from SqlSmoObject ) | |
GetBindDefaultScript | (inherited from SqlSmoObject ) | |
GetBindRuleScript | (inherited from SqlSmoObject ) | |
GetBoolParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetBraketNameForText | (inherited from ScriptNameObjectBase ) | |
GetDateTimeParameter | (inherited from SqlSmoObject ) | |
GetDateTimeParameterAsInt | (inherited from SqlSmoObject ) | |
GetDBName | Gets the database name associated with the object. (inherited from SqlSmoObject) | |
GetEnumParameter | (inherited from SqlSmoObject ) | |
GetFragOptionString | (inherited from SqlSmoObject ) | |
GetGuidParameter | (inherited from SqlSmoObject ) | |
GetIsTextDirty | Determines whether the text value is consistent with stored value. (inherited from ScriptNameObjectBase) | |
GetParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetPropValue | (inherited from SqlSmoObject ) | |
GetPropValueOptional | (inherited from SqlSmoObject ) | |
GetPropValueOptionalAllowNull | (inherited from SqlSmoObject ) | |
GetRealValue | (inherited from SqlSmoObject ) | |
GetScriptIncludeExists | (inherited from ScriptNameObjectBase ) | |
GetScriptingOptionsForCreate | (inherited from SqlSmoObject ) | |
GetServerName | Gets the name of the instance of Microsoft SQL Server with which the object is associated. (inherited from SqlSmoObject) | |
GetSqlServerVersionName | Gets the version name of the instance of Microsoft SQL Server with which the object is associated. (inherited from SqlSmoObject) | |
GetStringParameter | Overloaded. (inherited from SqlSmoObject ) | |
GetTextBody | Overloaded. Returns the text body. (inherited from ScriptNameObjectBase) | |
GetTextForScript | (inherited from ScriptNameObjectBase ) | |
GetTextHeader | (inherited from ScriptNameObjectBase ) | |
GetTextMode | Determines whether the script name is using text mode. (inherited from ScriptNameObjectBase) | |
GetTextProperty | (inherited from ScriptNameObjectBase ) | |
GetTimeSpanParameterAsInt | (inherited from SqlSmoObject ) | |
GetUrnRecursive | Overloaded. (inherited from SqlSmoObject ) | |
ImplInitialize | (inherited from SqlSmoObject ) | |
IsCollectionDirty | (inherited from SqlSmoObject ) | |
IsObjectDirty | Determines whether the referenced object is consistent with the stored object. (inherited from ScriptNameObjectBase) | |
IsObjectInitialized | Verifies whether the object has been initialized. (inherited from SqlSmoObject) | |
IsObjectInSpace | Verifies whether the object is isolated or connected to the instance of Microsoft SQL Server. (inherited from SqlSmoObject) | |
IsVersion80SP3 | (inherited from SqlSmoObject ) | |
MarkDropped | (inherited from SqlSmoObject ) | |
MarkForDropImpl | (inherited from SqlSmoObject ) | |
MemberwiseClone | (inherited from Object ) | |
PostAlter | (inherited from SqlSmoObject ) | |
PostCreate | This method supports the SQL Server Management Objects infrastructure and is not intended to be used directly from your code. (inherited from SqlSmoObject) | |
PostDrop | (inherited from SqlSmoObject ) | |
RenameImpl | (inherited from NamedSmoObject ) | |
RenameImplWorker | (inherited from NamedSmoObject ) | |
ScriptAlter | (inherited from SqlSmoObject ) | |
ScriptAnsiQI | (inherited from ScriptNameObjectBase ) | |
ScriptChangeOwner | (inherited from NamedSmoObject ) | |
ScriptCreate | This method supports the SQL Server Management Objects infrastructure and is not intended to be used directly from your code. (inherited from SqlSmoObject) | |
ScriptDdl | (inherited from SqlSmoObject ) | |
ScriptDrop | This method supports the SQL Server Management Objects infrastructure and is not intended to be used directly from your code. (inherited from SqlSmoObject) | |
ScriptImpl | Overloaded. (inherited from SqlSmoObject ) | |
ScriptImplWorker | (inherited from SqlSmoObject ) | |
ScriptInformativeHeaders | (inherited from ScriptNameObjectBase ) | |
ScriptRename | This method supports the SQL Server Management Objects infrastructure and is not intended to be used directly from your code. (inherited from NamedSmoObject) | |
SetCollectionTextMode | (inherited from ScriptNameObjectBase ) | |
SetParentImpl | (inherited from SqlSmoObject ) | |
SetTextBody | (inherited from ScriptNameObjectBase ) | |
SetTextHeader | (inherited from ScriptNameObjectBase ) | |
SetTextMode | (inherited from ScriptNameObjectBase ) | |
SwitchTextMode | (inherited from ScriptNameObjectBase ) | |
ThrowIfTextIsDirtyForAlter | (inherited from ScriptNameObjectBase ) | |
Trace | (inherited from SqlSmoObject ) | |
UnbindDefaultImpl | (inherited from SqlSmoObject ) | |
UnbindRuleImpl | (inherited from SqlSmoObject ) | |
UpdateCollectionState2 | (inherited from SqlSmoObject ) |
Arriba
Vea también
Referencia
Login Class
Microsoft.SqlServer.Management.Smo Namespace
Otros recursos
Managing Users, Roles, and Logins
Entidades de seguridad
CREATE LOGIN (Transact-SQL)