Monday, November 29, 2010

How can I change the sa password without knowing the old password?

Use OSQL with the –E option (for authenticated user). If you are an administrator of the OS, you will get in without being prompted for the sa password. Once you are at the OSQL interactive prompt, issue the following command:

EXEC sp_password NULL, 'newpassword', 'username' GO 

No comments:

Post a Comment