Secondary data file is in 'Recovery Pending' state, but database is online I got an issue. I have a database (Say, DBASE) which have three files - Two data files (namely D:\Data1.mdf and D:\Data2.ndf) and a log file (E:\log.ldf) and all are in different file group. The secondary data file i.e., Data2.ndf is in recovery pending state. Remaining two db files are good and my database is online. When I took a look on database properties (GUI), I found there the size of Data2.ndf as 0MB where it's actual size is 10GB. We have given a try in below methods to fix the issue, but no luck.


resetdbstatus
Taking database to offline, then back to online.
Detach and attach operations
No errors from checkdb, unfortunately we don't anything in error log (as they are recycled)


Can someone help me in fixing the issue please?

FYI - Version : SQL 2012 SP1 Enterprise.
Since you mentioned earlier that your DB gets restored daily and it has different filegroups, it seems to me the case of piecemeal restore. You need to check the script used for restore and make sure it is recovering all the filegroups present in the DB backup. 

It looks like currently the script is only recovering primary filegroup and skipping the others which is causing the DB to recover but without the skipped filegroups. So you can query all your data which is present in PRIMARY filegroup but not the skipped ones. Just recover all the filegroups using the example given in below link and you should be fine. 

http://blogs.lessthandot.com/index.php/datamgmt/dbadmin/sql-server-filegroup-piecemeal-restores-1/