0

I took one of my database filegroups offline . I want to know is there any way to bring this offline filegroup online?

Prior thanks to your answers.

Amir Keshavarz
  • 3,050
  • 1
  • 19
  • 26

2 Answers2

0

You can bring it back online with restoring from backup.

https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options?view=sql-server-2017

A file set to OFFLINE can only be set online by restoring the file from backup

Elvin Ahmadov
  • 536
  • 5
  • 10
-2

To make a database online/offline you can use the following commands in you master database context.

Database Offline

ALTER DATABASE Database_Name SET OFFLINE;

Database Online

ALTER DATABASE Database_Name SET ONLINE;

Edit
Restore you File with "With Recovery" Option. something like this ..

RESTORE DATABASE DatabaeName 
FILEGROUP='C' 
WITH RECOVERY
M.Ali
  • 67,945
  • 13
  • 101
  • 127