Copied to clipboard

Flag this post as spam?

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

  • smriti 32 posts 103 karma points
    Jan 18, 2018 @ 14:09

    Changing database connection string form SQL to Windows

    I want to change current implementaion of SQL connection string on my website with Windows connection string but I don't know how to accomplish this.

    I changed the connection string to below: Data Source=SERVER;Initial Catalog=DATABASENAME;Integrated Security=SSPI;

    With this, the website start giving service unavailable error. I know there are a few settings which should be done on IIS level as well for this but I don't understand what changes to make. A few online articles suggest that I should change

    Please suggest how I can proceed with this change.

  • Alex Skrypnyk 6054 posts 23213 karma points MVP 5x admin c-trib
    Jan 18, 2018 @ 15:29
    Alex Skrypnyk

    Hi Smriti

    You need a login and password also, something like that:

    server=.\;database=test;User ID=sa;Password=test


  • Lennart Stoop 304 posts 842 karma points
    Jan 18, 2018 @ 20:24
    Lennart Stoop

    I think the question is to change the connection string from SQL to windows authentication in which case no username/password is needed.

    The example connection string you posted looks fine. Are you sure the value for data source is correct (this should contain the name of your SQL server instance) ?

    It may also be helpful to temporarely enable detailed error messages on your website, to better pinpoint the source of the error:

  • Sumesh KP 32 posts 104 karma points c-trib
    Jan 20, 2018 @ 20:03
    Sumesh KP

    Hi Smriti,

    Can you please update your connection string as follows and try:

    <add name="umbracoDbDSN" connectionString="data source=SERVER_NAME;database=DATABASE_NAME;Integrated Security=SSPI;persist security info=True;" providerName="System.Data.SqlClient" />

    Good luck :)

Please Sign in or register to post replies

Write your reply to: