Hi @sakuraime ,
Please read the MS doc :ALTER DATABASE (Transact-SQL) File and Filegroup Options. You can MODIFY FILE to OFFLINE, but there is no command to make a filegroup offline.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to offline the whole filegroups that has multiple files ?
ALTER DATABASE dbname MODIFY FILE (NAME = 'filename', OFFLINE) << this can only offline a single file
Hi @sakuraime ,
Please read the MS doc :ALTER DATABASE (Transact-SQL) File and Filegroup Options. You can MODIFY FILE to OFFLINE, but there is no command to make a filegroup offline.
Yes, but Books Online says: Sets the file offline and makes all objects in the filegroup inaccessible.
Furthermore: Use this option only when the file is corrupted and can be restored. A file set to OFFLINE can only be set online by restoring the file from backup.
Just a note that you can set the filegroup Read Only. You don't tell what your scenario is, so it is difficult to suggest what might be useful for you.