Excluding objects from the changes list - how to keep unchecked object scripts unchecked

We have a couple of SCA packages and have unchecked the import check boxes to exclude the roles and users from generating/importing scripts. In one project the unchecked roles and users continue to list unchecked when refreshed for changes, but in another project we continually need to un-check every role/user object/script from the changes after each refresh. Is there a setting we can update to ensure that the unchecked objects/scripts remain unchecked so that we are no encumbered with un-checking the objects after future refreshes? 


  • I would recommend using a compare filter in your project to achieve that. You can create a filter file using SQL Compare to exclude users and roles and add the filter to your project so the comparison process in SCA can ignore those objects when importing/generating scripts for changes. Here's the documentation with detailed instructions: https://documentation.red-gate.com/sca3/developing-databases-using-sql-change-automation/configuring-script-generation/filtering-database-objects
  • teetee Posts: 25 New member
    edited December 14, 2018 9:09PM
    Thank you Arneh. Although I had a bit of trouble getting the project to load a filter in VS 2017, it seems to be working now.  I'm aware of the filter option, but, for some unknown reason, in one of the projects, the roles and users, after having been unchecked/excluded, always remain unchecked/excluded; but in another project the objects continue to list as checked/included; so I'm wondering if there is a setting or a trigger action that ensures that once unchecked/excluded the object will remain unchecked/excluded in object changes list. I would like for the objects to remain unchecked if there is a setting or a trigger to accomplish retention of the unchecked box.
  • I couldn't reproduce this (previous settings are saved for me) - is there anything specific about that particular project that may help identify the problem? 
    Have you visited our Help Centre?
  • teetee Posts: 25 New member
    @Russell D - thanks for investigating. In answer to your question ~ no". Both projects were created identically (except the databases of course). But one continues to serve up the change list of previously unchecked objects still unchecked and the other serves up the change list of objects with all objects checked even though,  all but new, objects were previously unchecked. 
  • I must confess at a bit of a loss as to what could be causing it. Are you able to share any of your projects?
    Have you visited our Help Centre?
  • teetee Posts: 25 New member
    The projects are real work, so I can't share them. When I have unchecked an object from an object change list, to exclude the object from generate and import, what, precisely, in the project, retains the knowledge that I have excluded the object? Is there a cache or config file somewhere that I could examine? Maybe I could see differences between the project settings wherever they are saved.
  • Russell DRussell D Posts: 1,324 Diamond 5
    edited January 2, 2019 3:48PM
    Hi, sorry for the delay, no this is not cached anywhere and when hitting refresh it should be checking everything so there's possibly a bug here. I couldn't reproduce it locally though so without a reproduction from you it's going to be hard to investigate.
    Have you visited our Help Centre?
Sign In or Register to comment.