Not able to set data source in SQL Management Studio

Hi,

Currently I am not able to set my database that is required to be updated in SQL Server Management studio with the SCA plugin. For me it is a blocker at the moment since there is no support for VS2022.

Regards,
David.

Best Answer

Answers

  • Hi David,

    Sorry to hear you're experiencing this issue!

    Could you try removing the "<TargetDatabase>" and "<TargetConnectionString>" from the ".sqlproj.user" file, then open the project from SSMS and this will allow you to select a development database.

    Let me know if this helps!

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • DavidVerDavidVer Posts: 13 Bronze 3
    Hi @DanC

    These are the only lines in my .sqlproj.user file at the moment.

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"></Project>
  •  Hi David,

    Interesting, thanks for that update. 

    When you open the project in SSMS, are you prompted to set the development source?

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • DavidVerDavidVer Posts: 13 Bronze 3
    Hi Dan,

    Yes I am prompted for setting a data source. Attached are some screenshots from my local SMSS and SCA.
    After testing the DB connection OK and clicking on OK I still have the "No Development Source" showing.


     
  • DavidVerDavidVer Posts: 13 Bronze 3
    Thank you for your great help today @DanC. I see this issue as resolved.

  • KevinHoffKevinHoff Posts: 2 New member
    I'm having a very similar problem.  Trying to set up a development source like above.  Connection to the DB Server works.  Connection to the Existing DB works.  No development source after that.
    I checked the .sqlproj.user file and the values are like above.
  • Hi @KevinHoff

    Sorry to hear you're experiencing this issue also!

    Can I check, have you tried clearing out all the values in the .sqlproj.user file and then remapping the connection details?

    In the support ticket behind the scenes, David manually added the target into the file and that worked, could you try the same potentially?

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • KevinHoffKevinHoff Posts: 2 New member
    Hi @DanC
    First, I tried remapping the connection details manually.  No luck.
    Then I uninstalled all RedGate tools.
    Uninstalled SSMS.
    Reinstalled SSMS - upgrade to v 18.11
    Reinstalled all RedGate tools.
    No luck.
    Then I remapped the connection details manually.
    It's working.

    Thanks for the help.
  • Hi @KevinHoff

    Ah, sorry you had to go through that level of hassle!

    I'm pleased to hear it's now working well for you now.

    If you come across anything else don't hesitate to reach out to us on support

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • JeromeLJeromeL Posts: 10 Bronze 4
    Hi @DanC,

    I updated my tools yesterday and I am experiencing similar problems since. When creating a new branch, the project.sqlproj.user is created nearly empty, it lacks the property group and target database tags. When I open VS, it loads and then crashes VS completetely.

    The workaround I found is to copy the .sqlproj.user from my trunk branch. The file has then a target database and I can change it. 

    In SSMS, it does not crash but changing the database with the SCA dialog does not work. The testing connection works, but when I click OK it reverts to connection not defined.

    Before it crashed, in VS, it displayed the default connection, which seems to be (localdb)\projectsv13\db name. I've been able to connect to it in SSMS without any problem. So I don't really get it...

    VS version : 4.5.23068.948
    SSMS plugin version : same

    Thanks
  • JeromeLJeromeL Posts: 10 Bronze 4
    Just to clarify my post, I understand that the workaround is to copy or edit the .sqlproj.user manually, but is there a pending issue on this? The tool should be able to do this on his own. At least one of my colleagues is experiencing the same thing.
Sign In or Register to comment.