Monday, September 29, 2014

Create SQL Login

<![if !supportLists]>1.       <![endif]>CREATE a login for SQL Server  for windows authentication

      CREATE LOGIN [domainName\loginName] FROM WINDOWS;    
                                                     
<![if !supportLists]>2.       <![endif]>CREATE a login with password –( SQL Login) this will work from SQL 2000 onwards

CREATE LOGIN VenkatSangu WITH PASSWORD = 'password'

<![if !supportLists]>3.  <![endif]> CREATE a login with password and password must change when the user first time connecting to SQL Server  this will not support in older version i.e SQL Server 2000/2005

CREATE LOGIN VenkatSangu WITH PASSWORD='pwd@123pdw' MUST_CHANGE, DEFAULT_DATABASE=[master], CHECK_EXPIRATION=ON
     
To use MUST_CHANGE keyword must passwords must meet the following guidelines
<![if !supportLists]>·         <![endif]>The password does not contain the account name of the user.
<![if !supportLists]>·         <![endif]>The password is at least eight characters long.
<![if !supportLists]>·         <![endif]>The password contains characters from three of the following four categories:
<![if !supportLists]>·         <![endif]>Latin uppercase letters (A through Z)
<![if !supportLists]>·         <![endif]>Latin lowercase letters (a through z)
<![if !supportLists]>·         <![endif]>Base 10 digits (0 through 9)
<![if !supportLists]>·         <![endif]>Non-alphanumeric characters such as: exclamation point (!), dollar sign ($), number sign (#), or percent (%).


Thanks
Venkat Sangu

No comments:

Post a Comment

Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists

If you received below error while attaching a .mdf file in cluster environment please follow below steps to resolve the issue ERROR Ca...