Sunday, January 14, 2007

Reset "sa" in MSDE

Yeah, shit does happen especially when you dont plan properly. I forgot my MSDE password that store most of EventViewer alerts. Luckily, Builtin administrator accounts can be used to reset MSDE password. Here's the trick:

osql -E -d databasename -Q "sp_password NULL, 'newpassword', 'sa'"

-E to use trusted connection
-Q to execute query and exit

for more option, run osql /?

No comments: