Sql Express 2012 and "Unable to connect to the database"

Discussion in 'SmarterTrack' started by dukejames, Nov 25, 2011.

  1. dukejames

    dukejames Member

    I've setup and installed SmarterTrack with SQL Express 2008 in the past but now, the same steps don't seem to be working with SQL Express 2012 x64.

    On this particular server (Windows Server Standard 2008 64bit), it previously had SQL Express 2008 x64 installed. I uninstalled it completely, rebooted and then installed SQL Express 2012 x64.

    After its successful install, I installed SmarterTrack 7.4.4338 for the first time. This step went by fine as always however, when on the SmarterTrack Database connection page I can't advance. I keep getting an error of "Unable to connect to the Database. Check the setup information and try again".

    I've tried using "Integrated Authentication" first, being that I was installing it as an administrator; didn't work.

    Next, I tried creating a user in Active Directory (this is a domain controller) adding it as a SQL login and then attaching this user to all of the server roles. Trying this account on the ST database connection page didn't work either.

    I double checked the Database name, Server type and Domain name; these are all correct as well. The only thing I changed was the prefix. It now has 10 characters, the last being an underscore.

    Lastly, I made sure the firewall was turned off and TCP/IP is allowed in the SQL Configuration. Restarting the services and the server hasn't helped.

    Would anyone please shed some light to this issue or have any idea what I could try next?

    F.Y.I - If I have to go back to SQL 2008 Express I will however I thought it would be great to try 2012 and move forward if it all worked.
  2. dukejames

    dukejames Member

    Ok, I've solved it.

    It turns out that I had some events popping up in my Event Viewer under Applications which said:

    "Login failed for user 'NT AUTHORITY\System'. Reason: Failed to open the explicitly specified database 'SmarterTrack'. [CLIENT: <local machine>]"

    Once I saw this, I verified that the 'NT AUTHORITY\System' was associated with the 'sysadmin' role. It wasn't. I added it and then I tried setting up the database again using the defaults on the SmarterTrack Database connection page with a custom prefix. It worked!!

    I just don't understand why my custom created user login 'SmarterTrack' wouldn't work earlier? And why 'NT AUTHORITY\System' wasn't part of the 'sysadmin' role by default. Anyone know?

    Finally, does the 'NT AUTHORITY\System' still need to be associated with the 'sysadmin' role now that the database has been created? Possibly for updating the database?

    TIA!