Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • DonZalmrol 220 posts 833 karma points
    Apr 15, 2016 @ 13:58
    DonZalmrol
    0

    Umbraco first run and connection with MS SQL 2014 x64

    Hi all,

    I'm trying to do a test where I change my site from the build in MS CE database to the real deal. I have a MS SQL 2014 x64 up and running and I've created a test site.

    The IIS webserver and MS SQL server are both separate hosts and have a static IP, for testing I have disabled the firewall on both machines.

    The default setup is running and when I fill in my DB connection I receive the error "Could not connect to database"

    Any ideas or suggestions where I need to look into finding out what is causing the issue?

    I've followed this manual which is a really good one in my opinion. http://letswritecode.net/articles/setting-up-umbraco-locally/

    Thanks!

    Server is HOSTNAME\INSTANCE and then the DB name is the name of my database.

    The login is a local created account as specified in the manual. I have also tried my domain admin account to see if this solves it. Afraid the issue is the same...

    enter image description here

  • Steve Morgan 1350 posts 4460 karma points c-trib
    Apr 15, 2016 @ 14:23
    Steve Morgan
    0

    Can the webserver "route" requests to the SQL server via the hostname?

    The easy way to check is to open up a command window on the webserver and type "tracert XXXXXX" where XXX is your SQL hostname.

    If it can't resolve this host name then you need to add this to the hosts file with the IP of the SQL server.

    http://support.hostgator.com/articles/general-help/technical/how-do-i-change-my-hosts-file

    Steve

  • DonZalmrol 220 posts 833 karma points
    Apr 15, 2016 @ 15:13
    DonZalmrol
    0

    Hi Steve,

    Tracert returns the route correctly. I see the IP address that I have assigned to my SQL server.

  • Steve Morgan 1350 posts 4460 karma points c-trib
    Apr 15, 2016 @ 15:36
    Steve Morgan
    0

    Hi,

    Try the TestConnection.udl trick to test your SQL details - let's rule that out next.

    http://stackoverflow.com/questions/3910364/quick-ways-to-test-ole-db-connection-string

    Steve

  • DonZalmrol 220 posts 833 karma points
    Apr 15, 2016 @ 15:48
    DonZalmrol
    0

    Hi,

    Both options aren't working.

    But through the ODBC I receive this message: enter image description here

    Do I need to set anything up for allowing access further?

  • Steve Morgan 1350 posts 4460 karma points c-trib
    Apr 15, 2016 @ 16:35
    Steve Morgan
    2

    I'd suggest the problem lies in your SQL user and the access to the DB.

    I take it you've created a SQL user and given them access to the Umbraco db you've created? You've checked you have mixed auth mode enabled on the SQL Server?

    Test the user on the sql box by logging in with the Managment Studio tools with those details to rule this out.

  • DonZalmrol 220 posts 833 karma points
    Apr 17, 2016 @ 11:41
    DonZalmrol
    0

    Hi Steve,

    I can cannect with the SQL user in MS SQL Management Studio and access my DB.

    Seems there is an issue with connecting from another system to my SQL server.

    Are there any settings I need to check for remote connections?

    Mixed auth is enabled.

  • DonZalmrol 220 posts 833 karma points
    Apr 17, 2016 @ 12:18
    DonZalmrol
    100

    Ok, I'm making some progress.

    I can now connect with ODBC to my database as the custom local SQL user. But Umbraco is still having issues with connecting to it.

    I've followed this guide to solve my ODBC error: https://blogs.msdn.microsoft.com/walzenbach/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008/

    which was basically that TCP/IP was disabled, still set to the old DHCP IP (now static) and that the port 1433 was not set up.

    Firewalls have been configured correctly. The ODBC test was done on the webserver itself. So it's Umbraco (or my Visual studio) acting up...

  • DonZalmrol 220 posts 833 karma points
    Apr 17, 2016 @ 12:26
    DonZalmrol
    0

    Problem solved!

    It seems that you do not have to specify the instance name in my case... That solved it along with the URL I've posted.

    Thank you for you help Steve!

  • Steve Morgan 1350 posts 4460 karma points c-trib
    Apr 17, 2016 @ 15:28
    Steve Morgan
    0

    Ah! I've been caught by that remote connection thing before, I should have thought of that.

    Glad you're sorted!

  • DonZalmrol 220 posts 833 karma points
    Apr 17, 2016 @ 16:26
    DonZalmrol
    0

    No problem, can happen to all of us :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies