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
    smriti
    0

    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 5217 posts 19022 karma points MVP 3x admin c-trib
    Jan 18, 2018 @ 15:29
    Alex Skrypnyk
    0

    Hi Smriti

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

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

    Alex

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

    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:

    https://stackoverflow.com/questions/11665322/how-to-set-web-config-file-to-show-full-error-message

  • Sumesh KP 24 posts 93 karma points
    Jan 20, 2018 @ 20:03
    Sumesh KP
    0

    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:

Draft