Type the following commands without the quotes (“ “)
- “net stop mssqlserver” and press enter. (mssqlserver is your server instance name)
- “net start mssqlserver /m” and press enter
- “sqlcmd” and press enter
- “CREATE LOGIN tempuser WITH PASSWORD = ‘Password123’ “ and press enter
- “GO” and press enter
- “sp_addsrvrolemember ‘tempuser’, ‘sysadmin’ “ and press enter
- “GO” and press enter
- “quit” and press enter
- “net stop mssqlserver” and press enter
- “net start mssqlserver” and press enter
Now you can login with "tempuser" account with the "Password123" as password and reset sa user account password.
No comments:
Post a Comment