Linux command line
Published 07 April 2020
The Schema Compare for Oracle command line is available as a Docker container through Docker Hub.
Differences when running in Docker
- The filesystem in a container is isolated from the rest of the system. You should use
--mount
to pass directories through to Schema Compare for Oracle, for example when working with scripts folders and project files. - The container is also separate from your host machine in terms of network addresses. You should use the IP address of your host machine or host.docker.internal instead of localhost when connecting to local Oracle instances.
- You should ensure you run docker commands as root or a member of the
docker
group. - You will need to indicate that you accept the Redgate EULA with the
/IAgreeToTheEULA
switch. By using this option you consent to the Redgate EULA.
Example Commands to run Schema Compare for Oracle through Docker
To compare two schemas on a live database
docker run --rm \ redgate/schema-compare-for-oracle /IAgreeToTheEULA \ /source system/my-password@10.120.115.96:1521/my-sid{EXAMPLE_SCHEMA_SOURCE} /target system/my-password@10.120.115.96:1521/my-sid{EXAMPLE_SCHEMA_TARGET}
To compare a scripts folder to a schema on a live database on localhost
docker run --rm \ --mount type=bind,src="/home/me/scriptsfolder",dst=/scriptsfolder \ redgate/schema-compare-for-oracle /IAgreeToTheEULA \ /source /scriptsfolder{EXAMPLE_SCHEMA} /target system/my-password@host.docker.internal/my-sid{EXAMPLE_SCHEMA}