Add DB to a AG - complains about space on secondary

  • Dear all,

    I removed a DB from an AG a few days ago to shrink the logs. When I try to add again, I get this error:

    The share in the secondary has plenty of space, several times the space of the DB and the logs.

    Any idea or suggestion to fix this problem and add the DB?

    Many thanks in advance.

     

     

  • I've never really looked into precisely how these checks work and what they look at, but I'm wondering if the space check is looking at the default drives for databases and you're actually using a different drive - or indeed, the opposite way around (the default is fine but the drive that the Primary is using has insufficient space on the replicas).

     

  • I did this operation a few months ago, which went very well.

    If I ignore the warning and proceed, the DB stays in the secondary "Not Synchronizing / Recovery Pending".

    • This reply was modified 1 year, 5 months ago by  turandot.
  • As I responded on SQL team forum:

    You don't need to remove the database from the AG to shrink the log.  You should just issue DBCC SHRINKFILE and follow that up with a transaction log backup, repeat as needed until the log file is at the expected size.

    If SQL Server is reporting that it doesn't have enough space - then either the data drive or log drive where SQL Server is trying to put the files is out of space.  Depending on how you removed the database from the secondary, it is possible the files still exist - taking up the space needed for that databases files.

    You need to login to the secondary and validate the space is available on the drives where this database is placing the files.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Make sure your server properties/database settings/database default locations are set to the drives you expect them to be.

  • duplicate

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

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