public class ben:harrell

June 18, 2007

UPDATE: Cannot open user default database. Login failed. Login failed for user ‘UserName’. (Microsoft SQL Server, Error: 4064)

Filed under: database, dba, SQL Server 2005 — benjamin harrell @ 10:24 am

 Thanks to Fritz Laurel for adding this in the comments section, after you gain access you may need to run this script to store the new default database for the Login you used.

ALTER LOGIN loginid
WITH DEFAULT_DATABASE = master
GO

Advertisements

3 Comments »

  1. Database Log In Failed
    An invalid username/password caused log in to database fail.

    Verify that the username/password you provided is correct.

    Comment by Deepthi Jaju — September 12, 2007 @ 5:20 am

  2. In one of our Database we used to login through one username And now the user name is changed.NOw we are not able to open the apllication.Can any one suggest wat to do

    the error is as follows.

    Database Log In Failed
    An invalid username/password caused log in to database fail.

    Verify that the username/password you provided is correct.

    Comment by Deepthi Jaju — September 12, 2007 @ 5:22 am

  3. […] UPDATE: Cannot open user default database. Login failed. Login failed for user ‘UserName’. (Micr… […]

    Pingback by MSSQL Queries « Psgprakash's Blog — June 30, 2010 @ 4:56 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: