SQL Compare command line filter does not work on Mac (M1)
KRedgate
Posts: 1 New member
in SQL Compare
Hi,
I'm trying to get the /filter command to work, and I dont understand why its not working.
I have a filter (Filter.scpf) generated on Windows, that I would like to use on my Mac (through the command line).
The Filter.scpf file looks something like this :
The issue I'm having - is when I try to run the filter through this command:
I get these error
FilterService: Filter file does not exist /absolute/path/to/Filter.scpf
I'm trying to get the /filter command to work, and I dont understand why its not working.
I have a filter (Filter.scpf) generated on Windows, that I would like to use on my Mac (through the command line).
The Filter.scpf file looks something like this :
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!---->
<NamedFilter version="1" type="SQLCompareFilter">
<!--This filter can be loaded using the SQL Compare UI or used with a SQL Compare command line session using the /filter switch-->
<FilterName>Filter created using SQL Source Control</FilterName>
<Filter version="1" type="DifferenceFilter">
<FilterCaseSensitive>False</FilterCaseSensitive>
<Filters version="1">
...
</Filters>
</Filter>
</NamedFilter>
The issue I'm having - is when I try to run the filter through this command:
docker run --platform linux/amd64 --rm --interactive --tty
--mount type=bind,src=/absolute/path/to/Database,dst=/temp
redgate/sqlcompare /IAgreeToTheEULA /scripts1:"/temp"
/s2:host.docker.internal /db2:myDb /u2:myUser /p2:password
/filter:/absolute/path/to/Filter.scpf /verbose /sync
I get these error
SQL Compare V15.2.7.24880
==============================================================================================
Copyright © Red Gate Software Ltd 1999-2023
The SQL Compare CLI is subject to licensing restrictions. Learn more.
Argument /IAgreeToTheEULA has value 'True'
Argument /scripts1 has value '/temp'
Argument /server2 has value 'host.docker.internal'
Argument /database2 has value 'myDb'
Argument /username2 has value 'myUser'
Argument /password2 has value 'password'
Argument /filter has value '/absolute/path/to/Filter.scpf'
Argument /verbose has value 'True'
Argument /synchronize has value 'True'
Beta (expires on Wednesday, 19 June 2024)
Warning: Some settings are missing from the RedGateDatabaseInfo.xml file in the scripts folder
'/temp': default values will be used for any omitted setting.
Event Aggregator: No registered listeners for RedGate.Compare.CommonUI.Shared.Events.FilterChanged
Event Aggregator: No registered listeners for RedGate.Compare.CommonUI.Shared.Events.FilterChanged
FilterService: Filter file does not exist /absolute/path/to/Filter.scpf
Summary Information
==============================================================================================
DB1 = temp
DB2 = host.docker.internal.myDb
Where the filter is not recognized.
FilterService: Filter file does not exist /absolute/path/to/Filter.scpf
I have tried to have /filter:Filter.scpf and run the command from the folder where it exists, but that yields the same result.
I dont know what I am doing wrong, and I have tried googling my eyes out. I cant find the same issue anywhere. Can anyone see what I am doing wrong?
Sidenote: RedGateDatabaseInfo.xml exists in the folder I am running the command from. I dont know why its complaining about that aswell
Thank you so much in advance for you time!
Tagged:
Answers
Apologies for the delay, Would you be able to provide a copy of the filter file for us to test it. I don't believe the arm architecture on apple silicon chips would be a problem, especially if being run with docker.