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

Configure Table Mapping and Owner Mapping via command line

oliveramadeooliveramadeo Posts: 3
edited December 2, 2014 9:09AM in SQL Compare 11

I am new to SQL Compare. I'm wondering if there is a way to configure Table Mapping and Owner Mapping using the command line? I want to map the tables from source to target that has different schema name (example; [server1].[schema01].[UserTable] >>> [server1].[schema02].[UserTable]). I also would like to map source schema owner and target schema owner (example; [schema01] >>> [schema02]). I've tried using the UI but I need to implement it using the command line because I will be integrating this process with SSIS package for automation.


  • Options

    If you were able to set it up successfully in the UI then you can save a project file and then use the project file by adding the /project:<project> (substitute <project> for your project file) switch when you call SQLCompare.exe

    Does this help?
    Software Engineer
    Redgate Software
  • Options
    Hi Robert,

    Thank you for responding on my post. :)

    Unfortunately I cannot use the saved project since the servername, databasename, username, password, schema and tables that I am using will all be dynamic. Mapping of schema names will also be dynamic that's why I needed to find out how to do it via command line. This will be used for multiple clients.

    Sample Scenarios:

    "1st Client"

    Source: Target:
    client_db1 prod_db
    dev.table1 >> schema01.table1
    dev.table2 >> schema01.table2

    owner mapping:
    dev >> schema01
    schema01 << dev

    "2nd Client"
    Source: Target:
    client_db2 prod_db
    dev.table1 >> schema02.table1
    dev.table2 >> schema02.table2

    owner mapping:
    dev >> schema02
    schema02 << dev

    "3rd Client"

    Source: Target:
    client_db3 prod_db
    dev.table1 >> schema03.table1
    dev.table2 >> schema03.table2

    owner mapping:
    dev >> schema03
    schema03 << dev

    Based on the scenarios above, will I be able to use the project file without having to edit it out given that the objects names differ from each source and schema name changes for every new client.

    Thanks in advance! :)
  • Options
    Sorry, there's currently no way of specifying mappings without using a project file.

    If you want to suggest it as a feature, you could post the suggestion on our User Voice site.

    Software Engineer
    Redgate Software
  • Options
    Pixelated_1Pixelated_1 Posts: 6 Bronze 1
    edited September 12, 2017 8:29AM

    Has this feature been implemented since the last response dated December 2, 2014 9:09AM?
  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @Pixelated_1,

    Unfortunately, no. :/

    It doesn't look like a request was ever added to our UserVoice forum either. Our developers use the forum as an important resource when considering new features. Can you please add the request there which will allow others to vote for it as well?

    Thank you!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Sign In or Register to comment.