Solution
1.
My computer -- control panel -- Administrative Tools -- service -- Right-click MSSQLServer -- properties -- login identity -- select "Local SYSTEM account"
Or:
2.
My computer -- control panel -- Administrative Tools -- service -- Right-click MSSQLServer -- properties -- login identity -- select "this account" -- enter your modified administrator password in the password and Confirm Password.
Differences between the two:
Select the first method. The administrator password will be changed later. You do not need to adjust the password (but the system administrator is required to log on to the operating system)
Select the second method, modify the administrator password later, and repeat the above operation.
The following is an excerpt from bubble net.
Sqlserver2000 Error 1069 (unable to start the service due to login failure) Solution
The following describes how to solve the three most common connection errors.
The first error "SQL server does not exist or access is denied" is usually the most complicated. There are many causes of the error and there are many aspects to check. Generally, there are several possibilities:
1. the SQL server name or IP address is incorrectly spelled;
2. The server network configuration is incorrect;
3. The client network configuration is incorrect.
To solve this problem, we generally need to follow the steps below to find out the cause of the error step by step.
First, check the network physical connection:
Ping <Server IP address>
Or
Ping <Server Name>
If Ping <Server IP address> fails, the physical connection is faulty. In this case, Check hardware devices, such as NICs, hubs, and routers. Another possible cause is the installation of firewall software between the client and the server, such as ISA Server. Firewall software may block responses to ping, telnet, and so on. Therefore, when checking connection problems, we must temporarily disable the firewall software or open all closed ports.
If the ping <Server IP address> succeeds and the ping <Server Name> fails, it indicates that there is a problem with name resolution. In this case, check whether the DNS service is normal. Sometimes the client and server are not in the same LAN. At this time, you may not be able to directly use the server name to identify the server. At this time, you can use the hosts file for name resolution. The specific method is:
1. Use notepad to open the hosts file (usually in C:/winnt/system32/Drivers/etc ).
2. Add a record corresponding to the IP address and server name, for example:
172.1610.24 myserver
You can also configure it in the SQL Server Client Network utility, which will be described in detail later.
Second, use the Telnet command to check the SQL server's working status:
Telnet <Server IP addresses> 1433
If the command is successfully executed, you can see that the cursor does not stop flashing in the upper left corner after the screen flashes. This indicates that the SQL Server is working normally and is listening for TCP/IP connections on port 1433; if the command returns the error message "unable to open the connection", it indicates that the server has not started the SQL Server service, or the server has not enabled the TCP/IP protocol, or the server does not listen on the default port 1433 of SQL Server.
Next, we need to check the network configuration on the server, whether the named pipe is enabled, whether the TCP/IP protocol is enabled, and so on. We can use the server network tools provided by SQL Server for inspection.
Click program> Microsoft SQL Server> server network tools. The following figure is displayed after the tool is opened:
Here we can see which protocols are enabled on the server. In general, we enable Named Pipes and TCP/IP protocols.
Click TCP/IP protocol and select "attribute". We can check the settings of the default port of the sqk Server Service, as shown in:
Generally, we use the default port 1433 of SQL Server. If you select "Hide server", it means that the client cannot see this server by enumerating the server. This protects the server, but does not affect the connection.
After checking the network configuration of the server, we will go to the client to check the network configuration of the client. We can also use the client network provided by SQL Server to perform the check. The difference is that this tool is run on the client this time.
Click program> Microsoft SQL Server> client network tool. The following figure is displayed after the tool is opened:
Here we can see which protocols are enabled on the client. In general, we also need to enable the named pipe and TCP/IP protocol.
Click TCP/IP protocol and select "properties" to check the default connection port settings of the client, as shown in.
The port must be the same as the server.
Click the "alias" tab to configure an alias for the server. The server alias is the name used for connection. The server in the connection parameter is the real server name. The two can be the same or different. For example, we can use myserver to replace the real server name sql2kcn-02 and use the network library named pipes. The alias settings are similar to the hosts file.
Through the above checks, the cause of Error 1 can basically be ruled out. Next we will describe in detail how to solve Error 2.
When you try to use SA in the query analyzer to connect to SQL Server, or use SA in the Enterprise Manager to create a new SQL Server registration, you will often encounter the error message 2. 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;
2. Expand "SQL Server group", right-click the name of the SQL Server server, select "properties", and then select the "Security" tab;
3. Under "authentication", select "SQL Server and Windows".
4. Restart the SQL Server service.
In the preceding solution, if you fail to use "use Windows Authentication" to connect to SQL Server in step 1, we will encounter a dilemma: first, the server only supports Windows authentication. Secondly, in the preceding solution, if you use "use Windows Authentication" in step 1 to connect to SQL Server, we will encounter a dilemma: first, the server only allows Windows authentication, and second, even if Windows authentication is used, it still cannot connect to the server. This situation is vividly referred to as "locking yourself out of the door", because no matter what method is used, users cannot use the connection. In fact, we can change the Authentication Mode to SQL Server and Windows Hybrid Authentication by modifying a registry key value. The steps are as follows:
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. Close the 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, but 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 and <machine Name>/administrator. 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.
The following registry key
HKEY_LOCAL_MACHINE/software/Microsoft/MSSQLServer/loginmode
The value determines the Authentication mode that SQL server will adopt. If the value is 1, it indicates that the Windows Authentication mode is used; If the value is 2, it indicates that the Windows Authentication and SQL Server authentication are used ).
After reading how to solve the first two errors, let's take a look at the third error shown in 3.
If a third error occurs, it generally indicates that the client has found this server and can be connected. However, an error occurs because the connection time exceeds the allowed time. This usually occurs when a user runs the enterprise manager on the Internet to register another server that is also on the Internet and is using a slow connection, the above timeout error may occur. In some cases, the LAN may cause such errors.
To solve this problem, you can modify the connection timeout settings of the client. By default, the timeout setting for registering another SQL server through the Enterprise Manager is 4 seconds, the query analyzer is 15 seconds (this is also the reason why there is a high possibility of errors in the Enterprise Manager ). The procedure is as follows:
1. In the Enterprise Manager, select "Tools" from the menu, and then select "options".
2. In the pop-up "SQL Server Enterprise Manager properties" window, click the "advanced" tab;
3. Enter a large number, such as 20, in the "Login timeout (seconds)" box on the right under "connection settings.
The query analyzer can also be set at the same position.
Choose Windows Control Panel> Administrative Tools> services> MSSQLServer> Properties> change to your new operating system password!
Or
Choose Windows Control Panel> Administrative Tools> services> MSSQLServer> Properties> change to local login!