There are several reasons why you get this error. First of all, an error occurs if you have a filegroup with a damaged or missing data file, so you can check this first.
state_desc sys.databases. RECOVERY_PENDING, , ( ), , .
ALTER DATABASE userDB MODIFY FILE (NAME=’damagedFile’, OFFLINE)
:
ALTER DATABASE userDB SET ONLINE
, .
, .