Hi, all experts here,
Thank you very much for your kind attention.
I encountered a problem with SA account log on. This problem occured after I detached one of the database, and when I tried to connect to the server with SA account, the problem occured, the error message is: Cannot open user default database. Login failed. Login failed for user 'sa'. (Microsoft SQL Server, Error:4064)
I then logged on to the server with windows authentification as administrator of the machine, and I have changed the password for SA account as my new password, but when I tried to log on as SA with my new password, the problem still remained.
Would please any experts here give me som advices for why is that and what else could I try to figure it out?
Thank you very much and I am looking forward to hearing from you shortly.
With best regards,
Yours sincerely,
To answer my own question, I logged on as windows athentification, change the password for SA account via LOGINs properties. It works fine now.
|||The reason that it worked when you changed it in the GUI is because when you opened the edit account window in the GUI you also changed the default database.
To get around this in the future log into the SQL Server with osql (the command line tool) and specify the -d flag with a name of a database such as master and you can get connected. You can then change the default database using the sp_defaultdb procedure or ALTER LOGIN (if SQL 2005).
|||Hi, Mrdenny,
Thanks a lot for your kind advices.
With best regards,
Yours sincerely,
No comments:
Post a Comment