SQL server login password reset (forgot password)

I installed SQL server 2014 some time ago and used SQL server authentication to log in. The login name is sa (it seems to be the default universal one). The password was set during the installation, but it was forgotten after a long time.
After countless trials and errors, I got tired of it and planned to uninstall and reinstall it, but it seemed to be a bit troublesome.
Insert image description here

Windows login

Switch to windows authentication (no password required) and skip to the next step if you can log in.

Of course, you may also be unable to log in (looking for Du Niang).
Possible problems:

Question one

A network-related or instance-specific error occurred while establishing a connection to SQL Server. Server not found or cannot be reached. Please verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Unable to open connection to SQL Server) (Microsoft SQL Server, error: 2)Insert image description here

It may be that the SQL server agent is not turned on. Find the "SQL server configuration manager" program in the start menu (or win+S quick search).
Insert image description here
Find the SQL server agent and open it (right-click to start).
Insert image description here
Question 2: Not yet, I will update when I encounter it.

Change login password

After successful login, focus on the Object Explorer on the left.

When installing SQL server, there was an "authentication mode" setting. Generally, the mixed mode (SQL server authentication and Windows authentication) was selected. Only when the mixed mode was selected, a password was required to log in. Windows authentication seemed not to be required. password.

If the blending mode is not selected, you can change it (if the blending mode is selected at the time, you can skip this step).

In the Object Explorer on the left, right-click the root directory name (the server name, which is the name of your computer ) and find Properties .

Under Security, check the verification method and change it.
Insert image description here

reset Password

Find the user name (sa) according to the directory on the left and right-click to enter the properties interface.
db39de784.png)
Change the password, check Force password expiration, and click OK.
Insert image description here
Restart the software and the password change is completed.

Reference sources:

  1. https://blog.csdn.net/qq_41903105/article/details/85223574
  2. https://blog.csdn.net/ChanWillian/article/details/118303545

Guess you like

Origin blog.csdn.net/m0_67313306/article/details/124626035