Dışarıya aktar (0) Yazdır
Tümünü Genişlet
EN
Bu içerik dilinizde bulunmamaktadır ancak İngilizce sürümüne buradan bakabilirsiniz.

CREATE LOGIN (Azure SQL Database)

This topic is OBSOLETE. You can find the most current version in the SQL 14 Transact-SQL Reference.

ImportantImportant
This topic is not maintained. For the current version, see CREATE LOGIN.

Creates a new database login in Microsoft Microsoft Azure SQL Database. You must be connected to the master database to create a login.

Syntax Conventions (Azure SQL Database)


CREATE LOGIN login_name { WITH <option_list1> }

<option_list1> ::= 
    PASSWORD = { 'password' }
        

This syntax diagram demonstrates the supported arguments and options in Microsoft Azure SQL Database.

Microsoft Azure SQL Database does not support the following arguments and options when using the CREATE LOGIN statement:

  • hashed_password

  • MUST_CHANGE option

  • <option_list2> options:

    • SID

    • DEFAULT_DATABASE

    • DEFAULT_LANGUAGE

    • CHECK_EXPIRATION

    • CHECK_POLICY and

    • CREDENTIAL

For more information about the arguments and the CREATE LOGIN statement, see CREATE LOGIN in SQL Server Books Online.

In some methods of connecting to Microsoft Azure SQL Database, such as sqlcmd, you must append the Azure SQL Database server name to the login name in the connection string by using the <login>@<server> notation. For example, if your login is login1 and the fully qualified name of the Azure SQL Database server is servername.database.windows.net, the username parameter of the connection string should be login1@servername.

Because the total length of the username parameter is 128 characters, login_name is limited to 127 characters minus the length of the server name. In the example, login_name can only be 117 characters long because servername is 10 characters.

SQL Server rules allow you create a SQL Server authentication login in the format <loginname>@<servername>. If your SQL Azure server is myazureserver and your login is myemail@live.com, then you must supply your login as myemail@live.com@myazureserver.

ImportantImportant
The CREATE LOGIN statement must be the only statement in a SQL batch.

Only the server-level principal login (created by the provisioning process) or members of the loginmanager database role in the master database can create new logins.

Topluluk İçeriği

Show:
© 2014 Microsoft