SQL 2017 - Log Truncation

  • Hi all

    After removing a database from our AlwaysOn AvailabilityGroup and put it into simple mode, i've tried to shrink the database log file and i found that the log was not being truncated.

    Looking into the log_reuse_wait_desc in sys.databases, the column is showing "AVAILABILITY_REPLICA".
    how is that possible? The database is not in the AG anymore.. Am I missing something?

  • Have you taken any backups since changing the recovery model?

  • Hi Beatrix
    First of all, thanks for taking the time to reply my question.
    Since i've changed the db to simple, i had to make a new full backup..and yes,  the backup was done without further issues.

    Having said that, my problem was fixed with the following steps:

    -After removing the db from AO and still being unable to shrink the log file (even in the simple recovery mode), i've changed to full recovery mode again.
    - new full backup
    - joined the database one more time into the Avail.Groups.
    - removed again from AO
    - changed to simple mode and shrink the TLOG.

    I basically performed the same steps, but it worked on the second time.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply