db2 SQLSTATE 57019 because of BACKUP PENDING

I created a new db2 database, updated LOGARCHMETH1, LOGFILSIZ and some other things, then tried to import data created with db2move and db2look with a command like this:

db2 -tvf filename.dat

It failed, with SQLSTATE=57019, because of BACKUP PENDING.

I didn’t feel like performing a backup on an empty database, so I did this to solve the problem:

db2dart databasename /CHST /WHAT DBBP off

where “databasename” was obviously the name of my database. This successfully changed the state of the DB Backup Pending flag to “off”, which allowed me to do my import! Yay!

6 thoughts on “db2 SQLSTATE 57019 because of BACKUP PENDING”

  1. I’ve got the same problem right now.

    However, while I can see the potential of your fix – it did not work for me.
    The problem is I have no database connection so the command gives the following:
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    —————————— Commands Entered ——————————
    db2dart DREWRYDB /CHST /WHAT DBBP off;
    ——————————————————————————
    db2dart DREWRYDB /CHST /WHAT DBBP off
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL1024N A database connection does not exist. SQLSTATE=08003

    SQL1024N A database connection does not exist.

    Explanation:

    There is no connection to a database
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Trying to connect in the usual way (before db2dart) :

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    —————————— Commands Entered ——————————
    connect to DREWRYDB;
    ——————————————————————————
    connect to DREWRYDB
    SQL1116N A connection to or activation of database “DREWRYDB” cannot be made
    because of BACKUP PENDING. SQLSTATE=57019

    SQL1116N A connection to or activation of database “DREWRYDB ” cannot be made because of BACKUP PENDING.

    Explanation:

    The specified database requires a backup to be taken to provide a
    starting point for roll-forward recovery.

    No connection was made.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Any suggestions for getting out of this one? Thanks

  2. I’ve sometimes found it helpful to do the following to get into a “failsafe” state:


    db2 force applications all
    db2 terminate
    db2set DB2COMM=
    db2stop
    db2start
    db2 force applications all
    db2 terminate

    and then do the problematic stuff, for instance dropping a database, and then, to restore to normal:

    db2set DB2COMM=TCPIP
    db2stop
    db2start

    I’ve also noticed that a sleep of 15 seconds before db2dart is sometimes necessary, and sometimes it takes two attempts with db2dart to be successful.

    Hope this helps!

  3. Mattias

    Thank you very much for that help.

    Worked first time – and I got to learn something new as well!

    FYI I had this question in about 4 other blogs over the past week – nothing back.
    I had yours in a matter of hours. That’s what I call a result!

    Thanks again.

    Raymond

Leave a Reply