Login for logging into SQL Server
1,create SQL Server Login
CREATE LOGIN Testloginname with password='j345#$) THB'= db_study
PASSWORD ='PASSWORD'
Applies to SQL Server logins only. Specifies the password for the login, that's being created. You should use a strong password. For more information see strong passwords and Password Policy.
passwords is case-sensitive. Passwords should always is at least 8 characters long, and cannot exceed, 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 is assigned to the login. If This option isn't included, the default database is set to master.
Default_language =LANGUAGE
Specifies the default language to being assigned to the login. If This option isn't 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 [<domainName>\<login_name>] from WINDOWS;
Login_name
Specifies the name of the login is created. When is creating logins that is mapped from a Windows domain account and you must use the pre-windows $ user logon n AME in the format [<domainname>\<login_name>].
3,next Steps
After creating a login, the login can connect to the Database Engine, but only have the permissions granted to the publ IC role. Consider performing the some of the following activities.
To connect to a database, create a database user for the login. For more information, see CREATE USER (Transact-SQL).
Create a user-defined server role by using CREATE server role (Transact-SQL). Use ALTER SERVER ROLE ... add MEMBER to add the new login to the user-defined server role. For more information, see CREATE Server role (Transact-SQL) and ALTER server role (Transact-SQL).
Use sp_addsrvrolemember to add the login to a fixed server role. For more information, see Server-level Roles and sp_addsrvrolemember (Transact-SQL).
Use the GRANT statement, to grant Server-level permissions to the new login or to a role containing the login. For more information, see GRANT (Transact-SQL).
Reference Documentation:
https://msdn.microsoft.com/en-us/library/ms189751 (v=sql.110). aspx
Security1:create Login