Tom's Notes

  • Posts
  • Reviews
  • About

Tag Archives: login

SQL Server error 4064 – the little things that matter

By Tomica Kaniski in Other 05/04/2017 0 Comment

Funny thing I’ve learned the other day, which I want to share.

I was installing an app that needed the SQL database. As this was some “non-conventional” Java app, error that I’ve got made no sense – it said something like “Error 9. Database failed.”. (So helpful in many troubleshoots…) Smile

Figured it out after a few simple troubleshooting steps (maybe not written in the order taken, but tried all that Smile).

Steps taken:

1. It’s Java based – it should be something with the app itself, right? No. Smile

2. My app account doesn’t have required SQL permissions? Recheck. It has.

3. Then this is definitely a networking/firewall issue (it’s always the network)? Not this time.

4. I know – it must be the (mistyped) password!? Retype (several times), reset password – no luck.

5. What then??? Smile

Next step in my troubleshoot (that actually gave some results) was to try to launch the SQL Server Management Studio with the user account that app uses to access SQL.

And… the moment of truth:

image

So… I finally have an error (“Microsoft SQL Server, Error: 4064 – Cannot open user default database.”) which actually means something! Smile

No real problem here – I can connect with my admin account and take a more careful look at this SQL login/user. Lets see:

image

It turns out that the login in question was having it’s Default database property set to blank. And it was blank because I’ve previously deleted the old database, without checking if it’s used somewhere… just to make sure the app installation creates a fresh one… silly me. Smile

No need to mention that app installation went just fine after taking care of this “thingy”. I love troubleshooting. Smile

Cheers!

Archives

Proudly powered by WordPress. Theme: DW Minion by DesignWall.