I tried to backup the IBM DB2 (LUW) Database using this command:./db2 backup database DBEMP to /home/user1/db2bkup But I got this message: SQL1035N The database is currently in use. SQLSTATE=57019 Then I tried this:./db2 backup database DBEMP online to /home/user1/db2bkup And I got this message: SQL2413N Online backup is not allowed because the database is not recoverable or a backup pending condition is in effect. What does it mean?
Is there alternative way to backup the database online? I can't stop the database because it's being used. Unfortunately, it's not possible to take an online backup of a DB2 database if it's in, which is the default for DB2 databases when they are created. You can check whether your database is using circular logging by issuing:./db2 get db cfg for dbemp grep LOGARCH If both LOGARCHMETH options are switched off. First log archive method (LOGARCHMETH1) = OFF Second log archive method (LOGARCHMETH2) = OFF. Then you'll need to change your database configuration to use before backups can be taken.
![Db2 Offline Backup Script Windows 10 Db2 Offline Backup Script Windows 10](http://www.db2dean.com/Previous/AutoMaintDS_files/image003.jpg)
I'm not 100% sure of this but I believe you'll need to restart your database and take an offline backup before you can start taking online backups. There's an overview of how to do this in. Note that if you change from CIRCULAR LOGGING to ARCHIVE LOGGING, you'll need to figure out what to do with your archived log files. Storing them on SAN/NAS/Tape to allow roll-forward recovery can be a really good idea if this data is important to you. It's likely that TSM won't be installed and you'll want to use DISK (If you have a Tivoli Storage Management (TSM) service running, I'd suggest speaking to the people that look after it). The disadvantage of setting up archive logging is that you'll need to start maintaining (archiving or deleting) the files in your new archive log directory - it also means that DB2 has a little more work to do when it reaches the end of a log file. The benefits should outweigh the costs.
As Ian Bjorhovde suggested, it'd be wise to read up on how backup/recovery works in a bit more detail. – May 15 '13 at 9:39. You are correct about needing an offline backup first. As for managing logs (and backups) you can actually do so with another (three) parameters. AUTODELRECOBJ if set to ON will manage your (full) backups both online and offline and your archived logs. NUMDBBACKUPS tells DB2 how many full backups to retain and RECHISRETENTN tells DB2 how many days you want to keep the value set for NUMDBBACKUPS. We use that at our shop.
UpdateStar has been tested to meet all of the technical requirements to be compatible with Windows 10, 8.1, Windows 8. Backup for DB2 PDF manual (beginning at page 2.
We taken onlines twice a day and an offline once a week. We keep 3 backups for 2 days. – May 16 '13 at 12:45.
The purpose of the online backup is because I'm doing development of application that connect to remote IBM DB2 server that also being connected by many developers. I want to backup a database from the remote DB2 and restore into my local DB2 (Express-C version) because I want to use local DB2 for development. It's not a routine database backup that usually performed in production. So is this command enough?
= db2 update db configuration for DBEMP using logarchmeth1 disk:F:/dbemp/archivedlogs (note: my machine OS is Windows) – May 16 '13 at 14:48. Online backups require that the database be enabled for rollforward recovery. However, this is not the default when you create a database. In order to do this, you need to set the LOGARCHMETH1 database. Once you have done this, you'll need to take one offline backup (i.e., no users can be connected).
Once you've completed these steps, you'll be able to run online backups as you wish. You may want to spend some time reading the section of the DB2 Database Administration guide to help familiarize yourself with DB2 Backup/Recovery.