Database migration to a different structured database

peterpjpeterpj Posts: 2 New member
Hi All,
         I am very new to this forum so my apologies if I'm in the wrong place.
What I'm trying to achieve is to migrate a database with one structure to a database with a different structure, what I mean by structure is that the individual tables have the same columns but they are in a different order. How do I go about doing this task for the whole database. The new database is completely new has no data just a different structure.
Appreciate any help or direction
Best Regards,
peterpj
Tagged:

Answers

  • Sergio RSergio R Posts: 600 Rose Gold 5
    Hi peterpj,

    If I understand correctly you want to migrate data, as opposed to the schema?

    If you are migrating data, column order is not relevant.

    SQL Data Compare can help you migrate this data.

    Kind Regards,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • peterpjpeterpj Posts: 2 New member
    Hi sergio R,
    Unfortunately due to my lack of understanding I'm not always clear. I want to completely migrate the schema and the data from one database to another which has a different structure. The target database also has tables that do not exist in the source database but maybe related to a table that both the source and the target have. The target database is far more comprehensive that the source.
    Sorry about the confusion, I hope you can point me in the right direction as to how I might achieve this.
    Best Regards,
    Peterpj
  • Sergio RSergio R Posts: 600 Rose Gold 5
    Hi Peterpj,

    All that should be possible using our tools.

    You should start by migrating the schema, you can use SQL Compare for this task.
    If you want to make the schema in the target 100% identical to the source, this should be straightforward: usually it's just a case of comparing, making sure that all objects are selected for deployment and then deploying.
    Please note that if you are using default options, a different column order in a table, by itself, will not cause SQL Compare to consider the source and target different, so if column order is important, you should enable the "Force Column Order" option in the project options.
    If you don't want to drop any tables that only exist on the target, you can do so quickly, by unticking the tables correct group in the Comparison screen:

    SQL Compare and SQL Data Compare map tables automatically using the table name, however you can override this .

    Kind Regards,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
Sign In or Register to comment.