How to find the latest
-
Hi, I have 2 db's for my application one as primary and another as backup. At any time both will be having same data. If any DB goes down i will sync it after the DB comes alive. If an entry is present in both the DB's , I now use last updated time to find the latest affected record , but it is causing some problems. Is there any other way to keep track of the correct record if the entry is present in both the DB's Thanks in Advance krishnan.S
-
Hi, I have 2 db's for my application one as primary and another as backup. At any time both will be having same data. If any DB goes down i will sync it after the DB comes alive. If an entry is present in both the DB's , I now use last updated time to find the latest affected record , but it is causing some problems. Is there any other way to keep track of the correct record if the entry is present in both the DB's Thanks in Advance krishnan.S
-
It depend on how you are keeping them in sync in the first place. If you are using replication then it should be straight forward as this is one of its features.
Bob Ashfield Consultants Ltd
Actually Iam not using replication , Iam mainting a seperate table for the records to be synced. Is there any way to identify the latest record without using time as key. krishnan.S :-D
-
Actually Iam not using replication , Iam mainting a seperate table for the records to be synced. Is there any way to identify the latest record without using time as key. krishnan.S :-D
-
Hi, I have 2 db's for my application one as primary and another as backup. At any time both will be having same data. If any DB goes down i will sync it after the DB comes alive. If an entry is present in both the DB's , I now use last updated time to find the latest affected record , but it is causing some problems. Is there any other way to keep track of the correct record if the entry is present in both the DB's Thanks in Advance krishnan.S
I take it that the problem is because of the resolution of time in sql server (meaning you can have the same time on multiple rows). You could use constantly growing surrogate key for each table but not as a key but as a change identification. This would give you unique, growing values for each row so you could easily identify differences between tables based on this column. Hope this helps, Mika
The need to optimize rises from a bad design
-
Hi, I have 2 db's for my application one as primary and another as backup. At any time both will be having same data. If any DB goes down i will sync it after the DB comes alive. If an entry is present in both the DB's , I now use last updated time to find the latest affected record , but it is causing some problems. Is there any other way to keep track of the correct record if the entry is present in both the DB's Thanks in Advance krishnan.S
why 2 databases? use backups trigger them often. if it goes down i would wait after everthing ok and put online again, and use backup to restore data. if a create a 2nd database i would use it just when 1st goes to "vacations" :laugh: and use it like temp store until 1st returns from that create your own strategies:~
nelsonpaixao@yahoo.com.br trying to help & get help
-
Hi, I have 2 db's for my application one as primary and another as backup. At any time both will be having same data. If any DB goes down i will sync it after the DB comes alive. If an entry is present in both the DB's , I now use last updated time to find the latest affected record , but it is causing some problems. Is there any other way to keep track of the correct record if the entry is present in both the DB's Thanks in Advance krishnan.S
Could you pls tell me how you are created backup database. where i am using only single database to keep my 10000 record of info. if something goes wrong what to do... ************ S G KORE *******************