Copied to clipboard

Flag this post as spam?

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


  • Rayyan 46 posts 238 karma points
    Oct 30, 2017 @ 18:12
    Rayyan
    0

    Umbraco sql server connection string

    Hello there,

    I have created a new sql database on sql server 2017 (developer version) and i have used SQLite Toolbox to convert the sdf db, however I have tried to connect the website to it but didn't succeed.

    Here's my connection string I'm currently using;

        <add name="umbracoDbDSN" connectionString="server=servername;database=dbname;user id=rayyan;password=123456" providerName="System.Data.SqlClient" />
    

    And I have tried this one;

        <add connectionString="Data Source=servername;Initial Catalog=dbname;User ID=dbo;Password=123456" name="umbracoDbDSN" providerName="System.Data.SqlClient" />
    

    What's the right way to connect it to the db?

    Thank you,

  • Martin Aguirre 42 posts 210 karma points
    Oct 30, 2017 @ 18:51
    Martin Aguirre
    0

    Hi Rayyan

    Try this one

         <connectionStrings>
        <remove name="umbracoDbDSN" />
        <add name="umbracoDbDSN" connectionString="server=servername;database=databasename;user id=idUser;password=Password" providerName="System.Data.SqlClient" />
      </connectionStrings>
    
  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    Oct 31, 2017 @ 08:28
    Paul Seal
    101

    Hi Rayyan Have you set the server to mixed mode. Maybe this video will help you.

    https://www.youtube.com/watch?v=-7H_r_9WtQg

    Paul

  • Rayyan 46 posts 238 karma points
    Oct 31, 2017 @ 08:47
    Rayyan
    0

    Hi Paul, Thank you very much, your video is very helpful, anyway I still getting the same error

    Umbraco cannot start. A connection string is configured but Umbraco cannot connect to the database.
    

    What I'm going to do is to start fresh with a new Umbraco website and connect it to a new database, and I can work with any version of sql, not just Express, right?

  • Rayyan 46 posts 238 karma points
    Oct 31, 2017 @ 09:16
    Rayyan
    0

    Hi again, It seems you were right, and the problem is with the db authentication, I have changed it and restart the sql from the services and the ssms, but didn't take affect.

    enter image description here

    Where do you think is the problem? Thanks alot

  • Daniel 29 posts 142 karma points
    May 10, 2018 @ 13:32
    Daniel
    0

    Hi Paul, Rayyan, Can you give the title of the video? Or maybe the correct URL, as the video seems to have moved. I am getting a "Video not found" error when going to the URL... Thanks! Daniel

  • Rayyan 46 posts 238 karma points
    Oct 31, 2017 @ 09:50
    Rayyan
    0

    I have used sa for username and just worked! Thanks all

  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    Oct 31, 2017 @ 16:57
    Paul Seal
    1

    Glad you got it working. Please mark as resolved.

  • Charles R. Matvchuk 18 posts 124 karma points
    Oct 31, 2017 @ 17:04
    Charles R. Matvchuk
    1

    You shouldn't use sa for your username it is not best practice and also is a big security risk. You should create a user and then assign it to the database and the proper mappings. The sa account should always be disabled.

    The reason your sa account works and the other did not, is because you didn't assign the account the proper database mapping and most likely the proper permissions.

  • Rayyan 46 posts 238 karma points
    Oct 31, 2017 @ 17:22
    Rayyan
    0

    Thank you Charl, I have followed your advice, I don't know what's the problem with the main username, so I created a new one and worked just fine.

  • Charles R. Matvchuk 18 posts 124 karma points
    Oct 31, 2017 @ 17:23
    Charles R. Matvchuk
    1

    Great to hear that you got it working properly.

Please Sign in or register to post replies

Write your reply to:

Draft