1

My server is shutting down because the electrical. And when I opened my database in SSMS, database is recovery pending. I checked my ERROR LOG, the message are :

4 transactions rolled forward in database 'POSDW' (14:0). This is an informational message only. No user action is required. restoreHkDatabase: DbId 14, Msg 41313, Level 16, State 1, The C compiler encountered a failure. The exit code was 2.

[ERROR] Database ID: [14] 'POSDW'. Failed to load XTP checkpoint. Error code: 0x82000009. (d:\sql12_main_t\sql\ntdbms\hekaton\sqlhost\sqlmin\hkhostdb.cpp : 3126 - 'RecoverHkDatabase') Error: 41313, Severity: 16, State: 1.

I already tried to take offline but when I bring online I get error. Can you guys help me.

Thanks

Henry
  • 167
  • 1
  • 10

2 Answers2

0

It looks like corruption. You can try one of the following options:

  1. Restore from existing backup
  2. Try enter the database into emergency mode and run DBCC CHECKDB. according to the results you can see if you can restore the pages from existing backup (in some cases) or run DBCC CHECKDB .
  3. If you have functional replica of the data take the data from there.

Hope this helps.

Shahar Gvirtz
  • 2,418
  • 1
  • 14
  • 17
0

You were able to move the database files while they were in "Recovery Pending" mode because that status means SQL couldn't open the database files for some reason. It also means it couldn't lock the files as well.

Setting a database to "offline" is similar because it unlocks the underlying files (that's why you can move database files while it's offline).

I'm pretty sure that if you'd try setting all these databases to "online" you'd get the error message you talk about or something similar.

ALTER DATABASE MyDB SET ONLINE

You can use the above statement to try and activate databases that are "offline" or are in "Recovery Pending" mode. If there's some kind of problem, SQL Server will let you know at that moment.

You can also read this thread: How to fix Recovery Pending State in SQL Server Database?

Priyanka
  • 11
  • 2