How can we help you today? How can we help you today?

Unable to connect to {database name} in order to perform shadow clean

Hi All

Using VS Professional 2017/Git  I've created a new branch, and am trying to connect to a database solution file and build it on my local server, and when I do I get this unhelpful error message: 



Looking in the Error List tab it shows this warning (not an error) 

Severity Code Description Project File Line Suppression State
Warning Unable to connect to {database name} in order to perform shadow clean:  {repeat of above image text}. 

Is anyone familiar with this error?

Thanks.
Jim

Jim_Horn
0

Comments

6 comments

  • Jessica R
    Hi Jim,

    So sorry to hear you're running into an issue!

    I found a few older tickets with a similar error and the problem was usually that the connection to the shadow database was failing. Can you please check the shadow database connection from your usersettings file https://documentation.red-gate.com/sca/reference/sql-change-automation-project-user-settings to confirm it's valid?
    Jessica R
    0
  • Jim_Horn
    The above doesn't help as it's just a rehash of my question and a link to a one-paragraph page, which doesn't even say what the navigation path is to the properties TargetConnectionString and ShadowConnectionString are.   Neither property is in the solution or the project file. 

    Also most other solutions load fine, which would imply that it's something specific to the one I'm trying to load.
    Jim_Horn
    0
  • Jessica R
    Hi @Jim_Horn,

    My apologies for that, this would have been the more appropriate link to send: https://documentation.red-gate.com/sca/developing-databases/concepts/shadow-database

    It would be in the '<YourProjectName>.sqlproj.user' file

    Do you have this file and is the 
    ShadowConnectionString is correct? If you don't have the file, can you please create it to specify the ShadowConnectionString?
    Jessica R
    0
  • Jim_Horn
    I have a .sqlproj.user file, but none of these files have a node for <ShadowConnectionString>, and yet all other solutions load except for the one that returns this error.
    Jim_Horn
    0
  • Jim_Horn
     
    Jim_Horn
    0
  • Jessica R
    Hi @Jim_Horn,

    Thanks for confirming!

    Hm, it's odd. I mentioned that the issue appears to be with connecting to the shadow database, but if there is no ShadowConnectionString defined, it should be trying to connect to the same server where the development DB is.

    Assuming that clicking "Change connection" and testing connection to the development db still works, can you please try pre-creating a shadow db and specifying it in the .sqlproj.user file? (by manually adding the  <ShadowConnectionString> property
    https://documentation.red-gate.com/sca/developing-databases/concepts/shadow-database)
    Jessica R
    0

Add comment

Please sign in to leave a comment.