Read through all the doc and have a script that will iterate through a list of databases to make scripts for each in a corresponding git repository folder. I created a filter NoSecurity.scpf that unchecks Role, Schema and User objects. Running the command, it still creates the Schemas and Users folders with the corresponding files to represent the objects.... What?
Here's the kicker...
I set up a project in the UI with the exact same options and it performs as expected.
sqlcompare.exe /Server1:MY-SERVER /Database1:MyDatabase /Makescripts:c:\source\db-my_database\schema_objects /Options:NoAutoColumnMapping,DecryptPost2kEncryptedObjects,IgnoreFileGroups,IgnoreFillFactor,IgnorePermissions,IgnoreSchemaObjectAuthorization,IgnoreSystemNamedConstraintNames,IgnoreTSQLT,IgnoreUsersPermissionsAndRoleMemberships,IgnoreUserProperties,IgnoreUsers,IgnoreWhiteSpace,IgnoreWithElementOrder /Filter:NoSecurity.scpf /Verbose
SQLCompare V14.5.1.18536
==============================================================================
Copyright © Red Gate Software Ltd 1999-2021
Argument /server1 has value 'EPC-PROD-SQL-1'
Argument /database1 has value 'MyDatabase'
Argument /makescripts has value 'c:\source\db-my_database\schema_objects'
Argument /options has value 'AddObjectExistenceChecks;NoAutoColumnMapping;DecryptEncryptedObjects;IgnoreFileGroupsPartitionSchemesAndPartitionFunctions;IgnoreFillFactor;IgnorePermissions;IgnoreSchemaObjectAuthorization;IgnoreSystemNamedConstraintAndIndexNames;IgnoreTSQLT;IgnoreUsersPermissionsAndRoleMemberships;IgnoreUserProperties;IgnoreUsersPermissionsAndRoleMemberships;IgnoreWhiteSpace;IgnoreWithElementOrder'
Argument /filter has value 'NoSecurity.scpf'
Argument /verbose has value 'True'
Redgate Client capability version: 2
SQL Compare: activated, edition professional
SQL Compare running with option: NoAutoColumnMapping (OK).
SQL Compare running with option: DecryptEncryptedObjects (OK).
SQL Compare running with option: IgnoreFileGroupsPartitionSchemesAndPartitionFunctions (OK).
SQL Compare running with option: IgnoreFillFactor (OK).
SQL Compare running with option: IgnorePermissions (OK).
SQL Compare running with option: IgnoreSchemaObjectAuthorization (OK).
SQL Compare running with option: IgnoreSystemNamedConstraintAndIndexNames (OK).
SQL Compare running with option: IgnoreTSQLT (OK).
SQL Compare running with option: IgnoreUsersPermissionsAndRoleMemberships (OK).
SQL Compare running with option: IgnoreUserProperties (OK).
SQL Compare running with option: IgnoreUsersPermissionsAndRoleMemberships (OK).
SQL Compare running with option: IgnoreWhiteSpace (OK).
SQL Compare running with option: IgnoreWithElementOrder (OK).
Here's the kicker...
I set up a project in the UI with the exact same options and it performs as expected.
The command line is:
sqlcompare.exe /Server1:MY-SERVER /Database1:MyDatabase /Makescripts:c:\source\db-my_database\schema_objects /Options:NoAutoColumnMapping,DecryptPost2kEncryptedObjects,IgnoreFileGroups,IgnoreFillFactor,IgnorePermissions,IgnoreSchemaObjectAuthorization,IgnoreSystemNamedConstraintNames,IgnoreTSQLT,IgnoreUsersPermissionsAndRoleMemberships,IgnoreUserProperties,IgnoreUsers,IgnoreWhiteSpace,IgnoreWithElementOrder /Filter:NoSecurity.scpf /Verbose
Here is the verbose output: