• Hello everyone and thank you for reading my article.

    I would like to make two points on the comments I have seen here.

    There are some questions about the "sqlcmd -E" command. Once you place the SQL server into single user mode (sqlservr.exe -m), this is the best and recommended way to connect to the SQL server in this mode. You could use an id/account to connect but if you have an id/account already then you would not be locked out.

    Yes, by adding your own id/account to the SQL server, you should not get locked out. But this is not always the case. Here are some scenarios that could happen where you can not add your id/account and thus be locked out.

    1) The application is very sensitive and you are not allowed by the business owner, auditors and/or government agencies to just add your id/account and are forced to use a supplied account for access.

    2) The SQL server is inherited. When a company is bought out by another and people are let go, not everyone is nice enough to leave all the information.

    3) Someone has deliberately deleted id/account from the SQL server. Possibly an unhappy employee/staff member or worse.

    As you can see there are many reasons why you many not be able to connect to SQL server and if you ever run into this problem, I hope you will find this article helpful.

    Thanks,

    Rudy

    Rudy