1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Backup restore fails on multi-user mode error

Discussão em 'StackOverflow' iniciado por fdantas, Agosto 8, 2017.

  1. fdantas

    fdantas Administrator Moderador

    I have a script to automate restoring a database from a backup. My script first stops all appserver instances, stops all databases, then restores from a backup. Below is the pseudo-code:

    foreach appserver:
    asbman -name (appserver) -stop

    foreach database:
    dbman -name (database) -stop

    proutil database.db -C enablelargefiles
    echo y | prorest database.db backup.bak -verbose


    Once my script reaches the prorest command, it outputs the following error:

    ** The database D:\Directory\Wrk\db\database is in use in multi-user mode. (276)


    After waiting ~60 seconds, running the prorest command again executes as expected, and the database is restored correctly. My guess is that there are processes tied to the database that are still running after the database is stopped. I would like to find a solution to this problem without having to use methods such as a sleep-retry to determine when the database is capable of being restored. Is there a solution to this problem, or are there better methods for restoring a database in this way?

    Continue reading...

Compartilhe esta Página