SQL Login Account Disabled

Jorge 21 Reputation points
2020-09-30T13:35:58.94+00:00

Hello Everyone,

One of my SQL Login Account is disabled.

I have asked coworkers and no-one has disabled it. Not even by accident. The last few days I was the only one using SSMS and SQL.

How can I know why it was disabled apparently by the server itself? And also I want to know when it was disabled and how can I get the account to be able because it is a sysadmin.

Thanks for your help,

Jorge

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

Accepted answer
  1. AmeliaGu-MSFT 13,976 Reputation points Microsoft Vendor
    2020-10-01T06:33:10.787+00:00

    Hi @Jorge ,

    --I want to know when it was disabled.
    Have you enabled SQL Server audit? If you cannot find any message in Windows event viewer and SQL Server errorlog, you can use SQL Server audit and SQL Server trace to get details of the login who failed to log in after enabling it.
    Please refer to Audit SQL Server Logins without filling up the Error Log and How to audit login to my SQL Server which might help.

    --how can I get the account to be able.
    In Object Explorer, expand Security-> Logins->right-click the sql server login-> Properties. On the Status page, in the Login section, click Enabled.
    29525-1.jpg

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Olaf Helper 44,501 Reputation points
    2020-09-30T13:43:26.877+00:00

    How can I know why it was disabled apparently by the server itself?

    Is the "Check Policy" property for the login set to ON? The the login gets disabled after the user entered 3 times a wrong password.
    Lookup the SQL Server ErrorLog if you see failed logins by the user.

    1 person found this answer helpful.
    0 comments No comments

  2. Jorge 21 Reputation points
    2020-09-30T13:53:44.36+00:00

    I use Windows Authentication to login. In the event viewer the only failed login to the account is the one I made when trying to connect but using Windows Authentication.


  3. Stacy Clark 26 Reputation points
    2020-12-11T11:25:22.337+00:00

    If you have a password policy set for SQL logins then your account may get disabled if you hit incorrect password for x-times. It is also possible that password is expired and it needs to be changed. In both of these cases your account will need to be enabled. You may be able to run following command to enable your login once again:

    alter login [your_sql_login_name] enable;
    GO

    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.