I have a database with two file groups:
1- PrimaryFileGroup
2- ArchiveFileGroup
now I have a backup from first filegroup: Primary.bak. and restore with below script :
USE [master]
GO
ALTER DATABASE MyDatabase
SET SINGLE_USER
WITH
ROLLBACK IMMEDIATE;
RESTORE DATABASE MyDatabase
FILEGROUP = 'PRIMARY'
FROM DISK = 'C:\Primary.bak'
WITH PARTIAL, REPLACE
GO
ALTER DATABASE SaleTabriz
SET MULTI_USER
It successfully restores. but my another tables which are in ArchiveFileGroup, goes into with below error while I'd like to select from them :
The query processor is unable to produce a plan for the table or view 'Customer' because the table resides in a filegroup which is not online
What is my mistake?