I am not able to Connect to SQL Server when system administrators are locked out

Lokesh Kumar Pattajoshi 0 Reputation points
2024-12-24T14:54:47.86+00:00

My administrator account is locked. I followed the step provided here https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/connect-to-sql-server-when-system-administrators-are-locked-out?redirectedfrom=MSDN&view=sql-server-ver15 still i am getting that your account is locked. I even tried with "SQL Server Configuration Manager" and faced same issue. Could you help me on this?

User's image

User's image

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,213 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 114.6K Reputation points MVP
    2024-12-24T15:13:09.8633333+00:00

    So this is a slightly different situation from the one described in the article. In that article, all sysadmin accounts have been deleted from Windows, and the sa login is not available.

    In this case, your account is available, but it has been disabled.

    The remedy would be to create a second account in Windows with administrator rights (if you don't have one already) and then run SQLCMD as this account. (Which you can do with help of the RUNAS command.)

    0 comments No comments

  2. ZoeHui-MSFT 38,951 Reputation points
    2024-12-25T02:49:24.1666667+00:00

    Hi @Lokesh Kumar Pattajoshi.

    Take a look at this blog to see if it is helpful.

    How to connect to SQL Server when you're locked out

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.