mphillip85
asked on
Compare two exact tables from two different databases. Find is there is a change then update.
I would like to find the records that changes from the master db then update the backup db.
I am using vb 2003 to do this. Should I be using 2005, and how do I accomplish tjhis either way?
I am using vb 2003 to do this. Should I be using 2005, and how do I accomplish tjhis either way?
ASKER
I am inclined to use merge. IS there a reason why merge will not work or does not work for me?
1. Just want to check diferences between tables.
2. Update/merge differences on tables that have changed.
1. Just want to check diferences between tables.
2. Update/merge differences on tables that have changed.
merge replication?
ASKER
merge in vb .net 2003 /2005 commands
hmmm....no idea. they might work. I am not familiar with them.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
so merege will not work between two systems.
I usually transfer all the tables to a temporary database, then at midnight, I deleted all records from backup and then import to the backup db.
any thoughts on this?
I usually transfer all the tables to a temporary database, then at midnight, I deleted all records from backup and then import to the backup db.
any thoughts on this?
You are basically making a clean copy of db tables. I don't see why that wouldn't work. A lot of work though. Have you tried log shipping or other SQL fault tolerance setups? Is the backup database being utilized for anything other than if master goes down?
I ask as you could simply do backups of database each night versus having to code a transfer of tables, then when backup database is needed, you simply restore the latest or most appropriate backup file to that SQL instance.
Just thoughts. Again, if you are deleting rows in backup database at midnight, you should be able to transfer whatever data is in master database without having to figure out what changed.
Since you are doing this anyway, you can setup a linked server from backup to master and do total drop of tables and SELECT...INTO statements from master right to backup without having to do temporary tables as well.
I ask as you could simply do backups of database each night versus having to code a transfer of tables, then when backup database is needed, you simply restore the latest or most appropriate backup file to that SQL instance.
Just thoughts. Again, if you are deleting rows in backup database at midnight, you should be able to transfer whatever data is in master database without having to figure out what changed.
Since you are doing this anyway, you can setup a linked server from backup to master and do total drop of tables and SELECT...INTO statements from master right to backup without having to do temporary tables as well.
ASKER
I have readonly rights to master. So that cuts out the built in fault tolerance. The backup db is used for a different purpose and does not copy all the db records only the ones I need for my application for the customer.
The link is too slow to transfer all the records from all tables since master is web interface and the backupis remote desk top.
I would like to go back to the merge. It seems it would help me if it did work. I can gen a report of what changed what was added and deleted, which is important to know.
This would be a great help in the merge in vb code.
Thanks
The link is too slow to transfer all the records from all tables since master is web interface and the backupis remote desk top.
I would like to go back to the merge. It seems it would help me if it did work. I can gen a report of what changed what was added and deleted, which is important to know.
This would be a great help in the merge in vb code.
Thanks
ASKER
I only want to merge the records that I need or the table that has changes to be merged. plus i want to track what changed . deleted, added, changed.
If it were an exact copy i would, but i have extra tables and lots of views that are both indexed. and would not really want to re-create them over and over, which most people have told me.
I do not want to copy a table from a database that does not have any changes. I have over 200 tables, therefore time is an issue, then i have to process the changed records and update other databases.
That is why i would like to get the merge to work.
Thanks for any help on this.
If it were an exact copy i would, but i have extra tables and lots of views that are both indexed. and would not really want to re-create them over and over, which most people have told me.
I do not want to copy a table from a database that does not have any changes. I have over 200 tables, therefore time is an issue, then i have to process the changed records and update other databases.
That is why i would like to get the merge to work.
Thanks for any help on this.
ASKER
I noticed there is a merge in the SSIS / SQL Inteligence Development. Does anyone have any info on how to use that. Since the merge appears not to work in vb 2003 .net
ASKER
I am interested in the resolution to finding an answer to my last question or moving this question to another forum that is more appropriate for this question.
Thank you.
I still have a need for this.
Thank you.
I still have a need for this.
sql data compare from www.red-gate.com
free way:
tablediff.exe utility
http://articles.techrepublic.com.com/5100-10878_11-6177721.html