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…)
Figured it out after a few simple troubleshooting steps (maybe not written in the order taken, but tried all that ).
1. It’s Java based – it should be something with the app itself, right? No.
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???
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:
So… I finally have an error (“Microsoft SQL Server, Error: 4064 – Cannot open user default database.”) which actually means something!
No real problem here – I can connect with my admin account and take a more careful look at this SQL login/user. Lets see:
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.
No need to mention that app installation went just fine after taking care of this “thingy”. I love troubleshooting.