Can we compare two databases only for changed records

murthymurthy Posts: 8
Hi,

Can we compare two databases like ..

1.Get data script for only changed tables from local database.
2.Compare this changed records with server database.

Because database is very large and actually I need get data from one local work station (.mdf ,.bkp,scrpit..) to server database, then I need to apply compare.

Is it possibe with Red Gate's SQL Data Compare?

Thanks,

Satyanarayana Murthy

Comments

  • Hello Satyanarayana,

    SQL Data Compare can now compare data scripts to a live database. Creating the script folder will result in a schema script and a data script file that contains nothing but INSERT commands, and therefore I don't think you would get much advantage out of comparing the script folder to the production database as opposed to comparing the local and production databases directly.

    If you cannot get a SQL connection between the two data sources, then you could use a backup, as SQL Data Compare can also compare backups to live data sources. This option may be better because it's "cleaner" to copy a database backup to your server than a folder full of script files.
  • Hellow Brian,

    Thanks for quick reply,

    Actually my question is like..

    Can we take backup for only modified records.

    Assume like i have one backup file for last month.and another backup this month.Now i need another backup file which contains only changes/new records in relational database.
    can we do this brain..?

    If it is possible ..then i can move only 3rd backup file to server station , there i can compare this database with server database and apply sync process there with redgate tool.

    So Here i have two steps like..

    1.Get only changed records from substation as backup file.
    (moving manually there is no network)

    2.Compare "changes backupfile" with "serverdatabase or is's backup file".



    regards,
    Satyanarayana murthy
  • SQL Data Compare will compare two databases and make the output in the form of a SQL DML script. These scripts aren't really portable -- ie if you use SQL Data Compare on two databases and output the differebces, then Data Compare will output a script full of UPDATE queries, and you can't compare these scripts to a live database using SQL Data Compare. You could check them into source control or run them to synchronize the databases.

    SQL Data Compare is not going to create a backup of only the different records, though. The idea of Data Compare is to do the comparison to locate the differences for you more than anything else.
Sign In or Register to comment.