locked
unsent data where is it storaged RRS feed

  • Question

  • hello everybody, i'm doing som tests with database mirror, so i can implement on my main production instances, and i have been looking on the net, but couldn't found any explicit information about, where the unsent data, is storaged, in case of partner server fails, so i can provision the hard drive space adequally.

     

    thanks in advance

    Monday, December 27, 2010 5:26 PM

Answers

  • All the data sent to the mirrored database are from primary database's log file and the transactions written into your logfile of primary database are then streamed over the TCP/IP endpoint to the mirrored database. So to answer your question , the unsent data is still in your primary logfile and there is no other file generated for this tracking , from my understanding one of the DB mirroring thread in primary instance scans through the log file and sends the transactions if they are not sent and then marks them as sent - all these shoud be done internally.

    You can measure these kinds of metrics through the object explained in this link http://msdn.microsoft.com/en-us/library/ms189931.aspx


    Thanks, Leks
    Monday, December 27, 2010 10:14 PM
    Answerer
  • There shouldnt be any problem or data loss if you perform a log backup on the primary when the secondary services are stopped or db mirroring is suspended , when the secondary server comes up it copes up with all the unsent transactions from principal server and moves into synchronized state using the LSN explained above.
    Thanks, Leks
    Tuesday, December 28, 2010 10:53 PM
    Answerer

All replies

  • All the data sent to the mirrored database are from primary database's log file and the transactions written into your logfile of primary database are then streamed over the TCP/IP endpoint to the mirrored database. So to answer your question , the unsent data is still in your primary logfile and there is no other file generated for this tracking , from my understanding one of the DB mirroring thread in primary instance scans through the log file and sends the transactions if they are not sent and then marks them as sent - all these shoud be done internally.

    You can measure these kinds of metrics through the object explained in this link http://msdn.microsoft.com/en-us/library/ms189931.aspx


    Thanks, Leks
    Monday, December 27, 2010 10:14 PM
    Answerer
  • To be a bit more precise: The principal server stores the LSN (log sequence number, which is as the name suggests the logical rownumber in the transaction logfile) of the last entry it has sent to the mirror. So when it disconnects nothing happens at all actually. And after reconnect the principal uses the last LSN information to know where to start from again.
    Tuesday, December 28, 2010 5:56 AM
  • Thak you for you're answer , that was my suspection.

     

    Just one adition to my question, if i do a log backup , while mirror is down, without the truncate option will i lose any data ??  will the log be cleared ??

    Tuesday, December 28, 2010 12:01 PM
  • There shouldnt be any problem or data loss if you perform a log backup on the primary when the secondary services are stopped or db mirroring is suspended , when the secondary server comes up it copes up with all the unsent transactions from principal server and moves into synchronized state using the LSN explained above.
    Thanks, Leks
    Tuesday, December 28, 2010 10:53 PM
    Answerer
  • ok, thank you very much, for your help
    Wednesday, December 29, 2010 11:33 AM
  • The data wont be sent to secondary...the data will only be sent to the secondary if it is active. ...Your data will be in Primary server.
    Wednesday, December 29, 2010 6:40 PM