How do I customize the name of the shadow database by including the user's credentials?

I would like to customize the shadow DB configuration, and have used the <project_name>.sqlproj.user file to do so. But since multiple developers might be using the tool and working in the same database, I would like to include the developers username in the name of the shadow database, like "ProjectName_imackenzie_shadow". This is consistent with the default naming convention.

Best Answer

  • David AtkinsonDavid Atkinson Posts: 1,384 Rose Gold 2
    edited March 18, 2020 8:27PM Accepted Answer
    Try adding this to your .user file. This should work for any Windows environment variable.
    &nbsp; &nbsp;<ShadowConnectionString>Data&nbsp;Source=SERVER\INSTANCE;Initial&nbsp;Catalog=ProjectName_$(username)_shadow;Integrated&nbsp;Security=True</ShadowConnectionString>
    David Atkinson
    Product Manager
    Redgate Software

Answers

Sign In or Register to comment.