1

My database log is growing out of control, I recently removed the database from an availability group by when I look at the log reuse wait description it shows "AVAILABILITY_REPLICA"

I have tried to set the database to simple mode and then shrink the log file, I have tried full backups, log backups (in full mode after a full backup). But the status will not change and I cannot shrink the log file.

Any suggestions?

  • what version of sql server are you using and what is the patch level ? What do you get from this select a.*, b.name from sys.dm_hadr_database_replica_states a LEFT JOIN sys.databases b ON a.database_id = b.database_id ? – Kin Shah Jul 29 '18 at 21:24
0

Take your database offline then back online. This should clear the AVAILABILITY_REPLICA wait, then you can shrink whatever you need to shrink.

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.