Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SQL2008's sa account is disabled. The solution is that other accounts can't connect.

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the solution that SQL2008's sa account is disabled and other accounts can not be connected. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

You have an account with other sysadmin permissions, you can log in with this account and reset your SA password. But what to do under the following circumstances?

1. The SA password is lost or the SA account is disabled.

two。 You have done some security operations to remove the BuiltinAdministrator account from SQL Server. Then you can't log in to SQL Server with the account with sysadmin permission. Are you going to reinstall SQL Server 2008? Actually, you don't have to reinstall the system. We can start SQL Server 2008 into single-user mode, and then log in to SQL Server 2008 with members of Windows Administrative groups.

Procedure:

1. We can first add a member with the account Test to Windows Administrative groups and log in to the operating system with the Test account.

two。 Use Run as an administrator to open a command prompt and type NET STOP MSSQLSERVER to stop MSSQLSERVER from running.

3. Type NET START MSSQLSERVER / m at the command prompt to start SQL Server 2008 into single-user mode.

4. You can then log in to SQL Server 2008 with your Test account.

5. SQL Server is already started in single-user mode, that is, only one user connection is allowed. Clicking "New Query" will cause an error of "Login failed for user. Reason: Server is in single user mode. Only one administrator can connect at this time".

6. Right-click the instance name, click "disconnect", close "object Explorer", and then click "New Query" to connect, you can use the command ALTER Login SA enable to reopen the SA account.

7. You can create a new SQL Server account SAMLPE with sysadmin privileges. CREATE LOGIN SAMPLE WITH PASSWORD='PASSWORD@123' SP_ADDSRVEROLEMEMBER 'SAMPLE',' SYSADMIN'

8. Now you need to close SQL Server, type NET STAR MSSQLSERVER at the command prompt to start SQL Server normally, and you can log in to SQL Server with your SA account or the newly created account.

So much for the solution that SQL2008's sa account is disabled and other accounts can't connect. I hope the above content can help you and learn more. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report