Solutions for forgetting the SQL server password

Source: Internet
Author: User

See http://www.cnblogs.com/jiang_zheng/archive/2009/02/05/1384622.html

1 ==========

In the CMD window

C: \ Documents ents and Settings \ Administrator> osql-e

1> sp_password null, 'abc123', 'sa'

2> go

Password Changed.
1> exit

As a result, the SA password is changed to ABC123.

The key is osql this stuff, specific view http://msdn.microsoft.com/zh-cn/vstudio/ms162806.aspx

2 ========

C: \ Documents ents and Settings \ Administrator> osql-e
1> exec sp_addlogin WC, WC
2> go
You have created a new logon.
1> exec SP_ADDSRVROLEMEMBER 'wc ', 'sysadmin'
2> go
'Wc 'has been added to the role 'sysadmin.
1> quit

 

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.