SQL Server operation excerpt

Source: Internet
Author: User

Use commands to create a user
Below is a simple example of adding a login account:
Exec sp_addlogin 'pattern'
RememberProgramUse the exec keyword before the name.
The following is a complicated example of adding a new login account.
Sp_addlogin 'sharonr', 'mypassword', 'northwind ', 'us _ English'
This command creates a user named sharonr and uses the mypassword password. The default database is northwind and the default language is U. S. English. In general, it is better to enable SQL Server to establish security identification than you do.
The sp_grantlogin pre-stored program has the following syntax:
Sp_grantlogin 'login _ name'
An example of using the sp_grantlogin prestorage program is as follows:
Exec sp_grantlogin 'mountain _ dew \ dickb'
After adding these login accounts, select the logon data folder in the left pane to view these login accounts in enterprise manger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.