码迷,mamicode.com
首页 > 其他好文 > 详细

Security1:Create Login

时间:2016-01-12 19:29:39      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

Login 用于登陆SQL Server

1,Create Sql Server login

CREATE LOGIN TestLoginName
with password=J345#$)thb
,DEFAULT_DATABASE = db_study


PASSWORD =password 

Applies to SQL Server logins only. Specifies the password for the login that is being created. You should use a strong password. For more information see Strong Passwords and Password Policy.

Passwords are case-sensitive. Passwords should always be at least 8 characters long, and cannot exceed 128 characters.  Passwords can include a-z, A-Z, 0-9, and most non-alphanumeric characters. Passwords cannot contain single quotes, or the login_name.

DEFAULT_DATABASE =database              

Specifies the default database to be assigned to the login. If this option is not included, the default database is set to master.

DEFAULT_LANGUAGE =language              

Specifies the default language to be assigned to the login. If this option is not included, the default language is set to the current default language of the server. If the default language of the server is later changed, the default language of the login remains unchanged.

 

2,Creating a login from a Windows domain account

CREATE LOGIN [<domainName>\<login_name>] 
FROM WINDOWS;

login_name                               

Specifies the name of the login that is created. When you are creating logins that are mapped from a Windows domain account, you must use the pre-Windows 2000 user logon name in the format [<domainName>\<login_name>].


 

3,Next Steps    

After creating a login, the login can connect to the Database Engine, but only has the permissions granted to the public role. Consider performing the some of the following activities.

 

参考文档:

https://msdn.microsoft.com/en-us/library/ms189751(v=sql.110).aspx

 

Security1:Create Login

标签:

原文地址:http://www.cnblogs.com/ljhdo/p/5125140.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!