What are the challenges you face when working across database platforms? Take the survey

Is it possible to have two or more repositories update the database, isolated by schema?

We are implementing a micro-service architecture, where the data for micro-service is isolated from the others via database schema - but one physical database. Is it possible using redgate tools to isolate database compares, deploys, syncs, etc. via database schema?

Best Answer

  • Options
    David EDavid E Posts: 75 Silver 1
    edited September 12, 2017 9:24AM Answer ✓

    Its possible to use filters in most Redgate products to achieve this. You can specify a filter to include only objects in a certain schema and only these will be compared and deployed.

    In SQL Compare you can set up a number of projects targeting the same database but different scripts folders and specify the appropriate filter with each. If these scripts folders are then targeted by DLM Automation the appropriate filter files will be picked up and used during deployment.

    Unfortunately SQL Source Control only allows linking each database to one repository, and therefore will only allow a single filter to be specified. This means that it might not be the best fit if you have multiple repositories referencing the same database.

    ReadyRoll does allow linking multiple projects (and therefore repositories) to the same database but does not yet support filter files. An alternative would be to filter the pending changes table on each import and only select those items under the schema for the current repository. There is support for excluding certain objects so that they never appear in the pending changes list, but this may take a while to configure for each micro service.
    Software Engineer
    Redgate Software
Sign In or Register to comment.