MSSQL Reset SA Password after Database File Locked
MSSQL database file is locked and we couldn’t open it in SQL Server. Whether could we reset SA password to open it?
Undoubtedly the answer is yes. SA account is the default administrator of SQL Server. So not only opening database file, but also all of things could be done by SA account in Microsoft SQL Server. The important problem is how to reset SA password.
The following passage would introduce two ways to reset SA password for MSSQL according to whether we have Windows administrator privileges.
- Run Command Prompt to reset SA password with Windows administrator privileges
- Run SQL Password Genius to reset SA password without Windows administrator privileges
Way 1: Run Command Prompt to reset SA password with Windows administrator privileges
- Click Start and type cmd in search box, press Enter to run Command Prompt as administrator.
- Type following command to reset MSSQL SA password. Press Enter after every command line.
1> EXEC sp_password NULL, yourpassword, sa
Way 2: Run SQL Password Genius to reset SA password without Windows administrator privileges
iSunshare SQL password reset tool, SQL Password Genius is one effective tool for SQL user password reset. With it, you could reset all user passwords for SQL Server database, including SA and other users with different privileges for SQL Server database file.
Tips: Close SQL Server Services before running SQL Server Genius to rest SQL password.
1. Install and run SQL Password Genius on computer.
2. Import SQL Server database file into password reset tool.
Master.mdf file is the main and most import SQL Server database file. Just click “Open File” button and you could find it in this location generally.
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
Click “Open” button and import it into SQL Password Genius.
3. Reset MSSQL SA password.
All users are shown in list after database file import. Select “sa” account in list and click “Reset” button at the bottom of window. Type new password in pop-up dialog and click “OK”.
Instantly, SA password has been reset and new password appears in list.