Can not Truncate the database because “Secondary has no log was added”

  • I got an error when trying to truncate the database: "Database can not shrink until all secondaries have moved past the point where the log was added". When I check the status of the secondary on the primary machine (Always On High Availability Dashboard), it has heath: good and Synchronization state: Synchronizing. But the status of database on secondary is NULL not ONLINE. When I check on the Always On High Availability of the Secondary machine, it's state is No data available on secondary replicas. What should I do and what is going on with the database..?

    (I want to truncate because the free space is no more enough.)

    Thank for reading. Pls help.image_2023-04-10_160641231

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • I am not 100% sure but I think the problem might be as follows:

    The log file from the primary server isn't applying to the secondary server which will cause the log file on the primary to continue to increase in size.

    If you run

    select * from sys.dm_hadr_availability_replica_states

    on the primary server it might give some more information.

    I don't think the output of that query contains any confidential information. If not then, if you post the results here, then someone might be able to assist.

  • Have there been any alter database actions on the primary?

    do the primary and secondary instances have the same drive\path assignments

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • This was removed by the editor as SPAM

Viewing 5 posts - 1 through 4 (of 4 total)

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