Reset MSDE (Microsoft SQL Desktop) password

article #25, updated 6195 days ago

MSDE has its own passwording system. Instead of “Administrator”, the first username is “sa”. To reset it, log in as local admin, and use this command line:

osql -S COMPUTERNAME\SERVERNAME -d databasename -Q "sp_password NULL, 'newpassword', 'sa'"

COMPUTERNAME is the hostname of the local system, i.e., the contents of COMPUTERNAME in batch.

SERVERNAME is whatever the server name is. Some MSDE installations appear to not need the -S item at all. If you don’t have SERVERNAME, try the command without the -S option, and see if it works. If it doesn’t, you’ll have to investigate your MSDE application to find out what SERVERNAME it is using.

databasename is the database name of the application.

newpassword is the new password you want to use for username ‘sa’.

This procedure may work with the fully-fledged Microsoft SQL Server, but has not been confirmed with it.

Categories: