Friday, October 17, 2014

Recovering from "database is being taken offline and cannot be opened" on Domino Server

Today in the morning many users cannot access the Domino Server because they get the error message "database is being taken offline and cannot be opened". In the Server tasks we see that the DBMT task hangs on a database. Our Domino admin has restarted the server to solve the problem with no success. The databases which are not accessible have a xxx.tmp file with the exact same size as the nsf file. We have tried to remove the xxx.tmp file, but the databases are still offline. Even the normal procedures to recover from database corruption like "compact, fixup, updall" did not help to solve this problem.

So i dig deeper and found out that there is a C API to bring databases offline and online again. I am not a C expert, but fortunately it is possible to call this API from lotus script. I wrote a small agent in a test database on the server which executes the API on the databases which are not accessible. For example:

Option Public
Option Declare

Declare Private Function NSFBringDatabaseOnline Lib "nnotes" Alias "NSFBringDatabaseOnline" (  ByVal dbPath As String, ByVal Z As Long) As Integer
Sub Initialize
 Call NSFBringDatabaseOnline("mail/hugo.nsf",0)
 Call NSFBringDatabaseOnline("mail/heinz.nsf",0)
 Call NSFBringDatabaseOnline("db/crm.nsf",0)
End Sub

Be sure that you have checked the option that the agent is allowed to run restricted operations.

Agent settings to recover from database is being taken offline and cannot bei opened

 Then run this agent on the server with tell amgr run "agent.nsf" 'agent'. Replace "agent.nsf" and "agent" with the names you have chosen for your agent.

P.S. If you like it please share it on your favorite social network.


  1. Nice finding. Thanks. It solved my issue with a couple of databases also.

  2. The accessibility of a database object through a transaction is dependent upon the ability to lock on to the object. Based upon the access operation as well as the lock type, the acquisition of a lock might be postponed or blocked, if a separate transaction has locked the specific object.kpi dashboards

  3. The sensitive information needs to be encrypted for public networks. mysql dashboards

  4. More information can be acquired and more information can be stored. Early in the information revolution, security trading systems often only stored recent transaction details.

  5. Great Article
    Cyber Security Projects

    projects for cse

    Networking Projects

    JavaScript Training in Chennai

    JavaScript Training in Chennai

    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training