I have two databases that are mirrored to another server using database mirroring. The mirror server has to be down for some reason for few days. Now the production server is having principal databases in (PRINCIPAL/DISCONNECTED) State. Clients can access those databases. So what happens when they keep on adding data to these databases?? Will the data get committed or waits till the mirror comes up?


Data will be committed, otherwise the mirroring would be known as the 'high unavailability' feature. The log(s) on the principal will grow as it must hold all transactions that are no shipped over to the mirror. When eventually the mirror comes back up the principal will show PRINCIPAL/SYNCHRONIZING as the log will be shipped over to the mirror. The log(s) will start to free up as transactions are being shipped to the mirror. When the all the transactions were received by the mirror the principal will enter the state PRINCIPAL/SYNCHRONIZED. Depending on the mirroring type (synchronous/asynchronous) in this state the clients may wait for all every transaction to be shipped to the mirror when committing.

If the disconnect is long and the log(s) had grown very large on the principal, the mirror will have to grow the log to a similar size when it re-connects. If there isn't sufficient disk space, mirroring will not resume (the ERRORLOG and system event log on the mirror will indicate this problem).

  • ok thanks. But why the log on the pricipal grows though it commited data ? The logs wil be active/inactive on the principal database when the mirror is disconnected? – user23996 Apr 5 '10 at 13:12
  • The log file grows because it has to store everything not delivered to the mirror. – Remus Rusanu Apr 5 '10 at 15:48
  • ok that means we cannot truncate the logs till they are sent to the mirror . Is that right? – user23996 Apr 7 '10 at 4:46
  • Right. Log will be 'in use' until sent. – Remus Rusanu Apr 7 '10 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.