Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to find the latest

How to find the latest

Scheduled Pinned Locked Moved Database
databasetutorial
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    krishnan s
    wrote on last edited by
    #1

    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

    A W N S 4 Replies Last reply
    0
    • K 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

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      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

      K 1 Reply Last reply
      0
      • A Ashfield

        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

        K Offline
        K Offline
        krishnan s
        wrote on last edited by
        #3

        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

        A 1 Reply Last reply
        0
        • K krishnan s

          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

          A Offline
          A Offline
          Ashfield
          wrote on last edited by
          #4

          Probably not then.

          Bob Ashfield Consultants Ltd

          1 Reply Last reply
          0
          • K 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

            W Offline
            W Offline
            Wendelius
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • K 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

              N Offline
              N Offline
              nelsonpaixao
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • K 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

                S Offline
                S Offline
                shiva kore
                wrote on last edited by
                #7

                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 *******************

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups