SQL Server2005 to set logins as Windows and SQL Server mixed logins

Source: Internet
Author: User
Tags execution log mixed
Server|window sqlserver2005 The default is Windows authentication after installation, you can change to mixed logins in the following ways. first log on to SQL Server with Windows Authentication, right-click on the SQL Server instance field in Object Explorer, select Properties, and select Security in the Properties dialog box. Select SQL Server and Windows Authentication Mode in the Security dialog box, and click OK. If you want to log in with the SA user, you can simply modify the SA user password. If you want to create a new user, back to the SQL Server instance field in Object Explorer, click the right mouse button and select New query, and the SQL edit box appears in the edit box, which creates a logon user and password for SQL Server server authentication in the statement. Created SQL statement: Create LOGIN jywhu with password= ' 123 '; then click Execute on the edit box. If the execution succeeds, create a username that is jywhu, and the password is a 123 login account. This account is then set up as a server role so that you can log in to create and delete databases and data tables, as well as in the SQL Editor just now. Set the SQL statement: Execute sp_addsrvrolemember ' jywhu ' sysadmin; then click Execute. If you want to remove its server role: Execute sp_dropsrvrolemember ' jywhu ' sysadmin; execution is ok.

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.