Solve the problem that the sa account of each SQL Server Version cannot be logged on. sqlserversa

Source: Internet
Author: User
Tags builtin management studio

Solve the problem that the sa account of each SQL Server Version cannot be logged on. sqlserversa

1. use Management Studio Express, log on with "Windows Authentication", select the SQL server name, right-click and select properties, and select "security" on the server properties option page ", change Server Authentication from "Windows Authentication" to "SQL Server and Windows Authentication", and click OK.

2. use the SQL Server 2005 peripheral application configurator, select "service and connected peripheral application configurator", select SQL Express-> Database Engine-> service, stop, and then start, restart the SQL Server.

3. return to Management Studio Express, select "security"-> logon name-> sa, right-click, and select the status on the logon properties-sa page, change "disabled" to "enabled" for Logon (you can set the sa logon password or cancel the logon password in the general options), and click OK.

Specific operations:

1. log in with windows Authentication

2. Whether to connect to the Database Engine-authorize logon-enable


SQL server 2005 Development edition cannot log on with the sa account. Why?

Ah. This is simple. Since windows authentication is successful, log on to the manager as this identity first, and then set a server authentication in the server attribute to the SQL server and windows authentication modes. Next, set attributes of the sa user in "security"> "Logon". The "Logon" field is displayed in the "status" column. The attribute is disabled by default and enabled. After the modification, restart the Enterprise Manager to log on with the sa user name. the problem persists. After thinking for half a day, I had to restart the service after setting "SQL server and windows Authentication mode. After the settings were completed, the Enterprise Manager was restarted and its service was not restarted.
========================================================== ================================
Give a high praise ....

Why does the SQL database fail to log on as SQL Server, prompting the user to log on to sa (Microsoft SQL server, error 18456)

This is a good thing to remember!

I. log on to the control panel-> services-> ms SQL server-> Local SYSTEM account-> restart MS SQL SERVER
Log on to the query analyzer using windows verification -- execute sp_password null, sa new password, 'sa'

2. "unable to connect to the server, user xxx Login Failed"
This error occurs because SQL Server uses the "Windows only" authentication method,
Therefore, you cannot connect to the SQL Server login account (such as sa). The solution is as follows:
1. Use the enterprise manager on the Server side and select "use Windows Authentication" to connect to SQL Server
Procedure:
In Enterprise Manager
-- Right-click your server instance (the one with the green icon)
-- Edit SQL Server Registration attributes
-- Select "use windows Authentication"
-- Select "use SQL Server Authentication"
-- Enter sa in the login name and sa in the password
-- OK
2. Set to allow SQL Server login
Procedure:
In Enterprise Manager
-- Expand "SQL Server group", right-click the name of the SQL Server
-- Select "attribute"
-- Select the "Security" tab.
-- Under "authentication", select "SQL Server and Windows ".
-- OK, and restart the SQL Server service.
In the preceding solution, if you fail to connect to SQL Server by using "use Windows Authentication" in step 1,
Modify the Registry to solve this problem:
1. Click "start"-"run", enter regedit, and press enter to enter the Registry Editor.
2. Expand the registry key in sequence and browse to the following registry key:
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSSQLServer]
3. Find the name "LoginMode" on the right of the screen and double-click to edit the double-byte value.
4. Change the original value from 1 to 2 and click "OK"
5. Disable Registry Editor
6. Restart the SQL Server service.
In this case, you can successfully use sa to create an SQL Server registration in the Enterprise Manager,
However, you still cannot connect to SQL Server in Windows Authentication mode.
This is because there are two default logon accounts in SQL Server:
BUILTIN \ Administrators
<Machine Name> \ Administrator deleted.
To restore these two accounts, you can use the following methods:
1. Open the Enterprise Manager, expand the server group, and then expand the server
2. Expand security, right-click logon, and click New logon"
3. In the Name box, enter BUILTIN \ Administrators
4. On the "server role" tab, select "System Administrators"
5. Click "OK" to exit
6. Use the same method to add <machine Name> \ Administrator to log on.
Note:
The following registry key:
HKEY_LOCAL_MACHINE & # ...... remaining full text>

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.