Login.Create Login.Create Login.Create Method

Definition

Creates a login account on the instance of SQL Server as defined by the Login object.

Overloads

Create(SecureString, LoginCreateOptions) Create(SecureString, LoginCreateOptions) Create(SecureString, LoginCreateOptions)

Creates a login account on the instance of SQL Server as defined by the Login object.

Create(String) Create(String) Create(String)

Creates a login account on the instance of SQL Server as defined by the Login object.

Create(String, LoginCreateOptions) Create(String, LoginCreateOptions) Create(String, LoginCreateOptions)

Creates a login account on the instance of SQL Server as defined by the Login object.

Create() Create() Create()

Creates a login account on the instance of SQL Server as defined by the Login object.

Create(SecureString) Create(SecureString) Create(SecureString)

Creates a login account on the instance of SQL Server as defined by the Login object.

Create(SecureString, LoginCreateOptions) Create(SecureString, LoginCreateOptions) Create(SecureString, LoginCreateOptions)

Creates a login account on the instance of SQL Server as defined by the Login object.

public:
 void Create(System::Security::SecureString ^ password, Microsoft::SqlServer::Management::Smo::LoginCreateOptions options);
public void Create (System.Security.SecureString password, Microsoft.SqlServer.Management.Smo.LoginCreateOptions options);
Public Sub Create (password As SecureString, options As LoginCreateOptions)
Parameters

Remarks

The [FlagsAttribute] enumeration, LoginCreateOptions contains values that are used to specify the password options when you create a logon.

Value Description
None = 0 No options.
IsHashed = 1 Indicates if the password has already been hashed, which allows passwords to be reapplied to a login.
MustChange = 2 Indicates whether the user has to change the password on the next login.

Create(String) Create(String) Create(String)

Creates a login account on the instance of SQL Server as defined by the Login object.

public:
 void Create(System::String ^ password);
public void Create (string password);
Public Sub Create (password As String)
Parameters

Create(String, LoginCreateOptions) Create(String, LoginCreateOptions) Create(String, LoginCreateOptions)

Creates a login account on the instance of SQL Server as defined by the Login object.

public:
 void Create(System::String ^ password, Microsoft::SqlServer::Management::Smo::LoginCreateOptions options);
public void Create (string password, Microsoft.SqlServer.Management.Smo.LoginCreateOptions options);
Public Sub Create (password As String, options As LoginCreateOptions)
Parameters

Remarks

The [FlagsAttribute] enumeration, LoginCreateOptions contains values that are used to specify the password options when you create a logon.

Value Description
None = 0 No options
IsHashed = 1 Indicates if the password has already been hashed, which allows passwords to be reapplied to a login.
MustChange = 2 Indicates whether the user has to change the password on the next login.
See Also

Create() Create() Create()

Creates a login account on the instance of SQL Server as defined by the Login object.

public:
 virtual void Create();
public void Create ();
Public Sub Create ()

Examples

Managing Users, Roles, and Logins

Create(SecureString) Create(SecureString) Create(SecureString)

Creates a login account on the instance of SQL Server as defined by the Login object.

public:
 void Create(System::Security::SecureString ^ password);
public void Create (System.Security.SecureString password);
Public Sub Create (password As SecureString)
Parameters
See Also

Applies to