Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2015
    Posts
    1

    Answered: The database is currently in use when backup

    hi all ,
    I have a IBM Filenet application connect with DB2(10.1) and i need to backup it , but when i run my backup script ,

    Code:
    CONNECT TO OS;
    QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
    CONNECT RESET;
    DEACTIVATE DATABASE OS;
    BACKUP DATABASE OS TO "F:\Dump" EXCLUDE LOGS WITHOUT PROMPTING;
    CONNECT TO OS;
    UNQUIESCE DATABASE;
    CONNECT RESET;
    and getting error ,

    Code:
    BACKUP DATABASE OS TO "F:\Dump" EXCLUDE LOGS WITHOUT PROMPTING
    
    Failed to execute command.  DAS returned the following error: sqlcode=-22220 output=SQL1035N  The database is currently in use.  SQLSTATE=57019
    ****But when I Down the IBM Filenet server and Do this , this work OK !!!!****

    But now i need to automate this process and cant manually down filenet server , so how can i can fix the issue in DB2 side , how can i drop all connections and isolate this till i do backups ?

    Thanks All for any Input

  2. Best Answer
    Posted by mark.b

    "Hi,

    Often the problem you faced is similar to the one described here:
    Offline database backup failing with SQL1035N
    Briefly: some application (Filenet server in your case probably) constantly tries to connect to the database making it to be activated temporarily to check if the incoming user is DBA or not.
    The resolution suggested in this technote will only work if the Filenet server user is not SYSADM or SYSCTRL or SYSMAINT.
    Other solutions can be:
    - do online backups
    - catalog the database OS with a different alias (let's say OSBKP), use it for the backup command only, and use the following backup script:
    Code:
    UNCATALOG DB OS;
    CONNECT TO OSBKP;
    QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
    CONNECT RESET;
    DEACTIVATE DATABASE OSBKP;
    BACKUP DATABASE OSBKP TO "F:\Dump" WITHOUT PROMPTING;
    CONNECT TO OSBKP;
    UNQUIESCE DATABASE;
    CONNECT RESET;
    CATALOG DB OS ON YOUR_DRIVE_LETTER:;
    TERMINATE;
    "


  3. #2
    Join Date
    Jul 2004
    Posts
    306
    Does the application ID for Filenet have Connect Quiesce priveledge? If so revoke it.

  4. #3
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    Often the problem you faced is similar to the one described here:
    Offline database backup failing with SQL1035N
    Briefly: some application (Filenet server in your case probably) constantly tries to connect to the database making it to be activated temporarily to check if the incoming user is DBA or not.
    The resolution suggested in this technote will only work if the Filenet server user is not SYSADM or SYSCTRL or SYSMAINT.
    Other solutions can be:
    - do online backups
    - catalog the database OS with a different alias (let's say OSBKP), use it for the backup command only, and use the following backup script:
    Code:
    UNCATALOG DB OS;
    CONNECT TO OSBKP;
    QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
    CONNECT RESET;
    DEACTIVATE DATABASE OSBKP;
    BACKUP DATABASE OSBKP TO "F:\Dump" WITHOUT PROMPTING;
    CONNECT TO OSBKP;
    UNQUIESCE DATABASE;
    CONNECT RESET;
    CATALOG DB OS ON YOUR_DRIVE_LETTER:;
    TERMINATE;
    Regards,
    Mark.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •