After installing SQL server on a machine, it happens that you connect or disconnect that machine to domain. WHen you do this, the administrator account can no longer access the database engine. The below steps allow you to regain access to the SQL server...
ms sql server 2008 R2, It sows me login window on execution of Alter query, Can you me- ZAHID
Stupid! doesn't work on SQL Server 2008 +
Its working on SQL Server 2008 R2
Small update on step 1 and 3
Run as administrator both command line and SQL Server Management Studio
Bogus information, you can't do anything in the management studio without authenticating first.
its work fine on 2012 , thnax alot :D
it doest work on any server
This worked for me, just make sure you're starting SQL Server Management Studio as Administrator, and then authenticate using the domain admin account once in management mode.
Thanks for sharing! Helpful post!
Thanks, it has worked for me. cheers.
Does work on 2012 box. Run as admin after and connect to local host using windows auth.