How to access SQL Server when you've forget the password

There is a little known feature of SQL Server 2005 is that when you start SQL Server in single user mode local administrators of the server have sysadmin access to the sql server.

You may feel this a security concern, but if a user can get local admin of your server, and restart your service then having sysadmin access to your SQL Server is the least of your problems.

So next time you forget your sa password and restart your server in single user mode, login using sqlcmd and reset the password. And away you go.

Published Tuesday, May 22, 2007 11:28 PM by simonsabin


No Comments