Altering a Filegroup

  • Comments posted to this topic are about the item Altering a Filegroup

  • Have encountered this before.

    Nice question, thanks Steve

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • The correct answer is: "The command seems to pause and hang, and the add file operation will run when the backup is complete."

    From BOL: https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql?view=sql-server-2017

    Interoperability

    SQL Server uses an online backup process to allow a database backup while the database is still in use. During a backup, most operations are possible; for example, INSERT, UPDATE, or DELETE statements are allowed during a backup operation.

    Operations that cannot run during a database or transaction log backup include:

    File management operations such as the ALTER DATABASE statement with either the ADD FILE or REMOVE FILE options.

    Shrink database or shrink file operations. This includes auto-shrink operations.

    If a backup operation overlaps with a file-management or shrink operation, a conflict arises. Regardless of which of the conflicting operation began first, the second operation waits for the lock set by the first operation to time out (the time-out period is controlled by a session timeout setting). If the lock is released during the time-out period, the second operation continues. If the lock times out, the second operation fails.

  • Carlo Romagnano wrote:

    The correct answer is: "The command seems to pause and hang, and the add file operation will run when the backup is complete." From BOL: https://docs.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql?view=sql-server-2017

     

    That's what I thought - I think it used to just fail in previous versions.

  • Altering the Database while it's being backed up is beyond my bravery level.

  • Altered the question to note the timeout. The question was phrased because if timeout is exceeded, the operation fails.

  • Altered the question to note the timeout. The question was phrased because if timeout is exceeded, the operation fails.

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

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