How is SQL Change Automation helping you? Share to win DevOps books.

SCA Filter File

How do I correctly create and include a SQL Compare filter file in a SCA project to exclude both user and role schema objects? I am at least able to create a file, but not sure if it's correct. I can't include the filter in the project though to test. 
Tagged:

Best Answers

  • Kendra_LittleKendra_Little Portland, OR, USAPosts: 125 Gold 2
    edited April 9, 2020 1:59PM Accepted Answer
    Update: I did a quick livestream here which I hope answers your question: https://youtu.be/Y56X9H4XG08

    The demo there is for working with an existing project in SSMS, but the workflow is quite similar to what you would do in visual studio.

    The TSQL I used to create simple objects to test the filter is:

    CREATE ROLE DoYouSeeThisRole;
    GO

    CREATE USER DoYouSeeThisUser WITHOUT LOGIN;
    GO


    --DROP ROLE IF EXISTS DoYouSeeThisRole;

    --DROP USER IF EXISTS DoYouSeeThisUser;
    -------------------------------
    @Kendra_Little
    Product Manager at Redgate
  • CAT_KeithCAT_Keith Posts: 3 New member
    Accepted Answer
    This video was excellent and resolved my issue. Just for context this was an existing SCA project, so it already had a baseline and I am doing SCA via SSMS. I had followed the guide on creating the filter and had placed it in my folder with my SCA project, because I do want it to be shared with all team members. The naming of the file in the project folder was the last step I was missing.

    Thank you very much for the quick response and the excellent walk through video. 

Answers

  • Kendra_LittleKendra_Little Portland, OR, USA Posts: 125 Gold 2
    Hi @CAT_Keith,

    Couple of questions for clarification -- Are you using SQL Change Automation in SSMS, or Visual Studio?

    And is this a new project you are setting up, or an existing one where you have already baselined, and you want to add the filter later? (I am thinking perhaps the second from the context of your question but I'm not 100% sure.)

    Thanks,
    Kendra
    -------------------------------
    @Kendra_Little
    Product Manager at Redgate
Sign In or Register to comment.