Posts

Showing posts from 2017

db2 - backup

Take an OFFLINE backup db2 connect to db2 quiesce database immediate force connections db2 connect reset db2 backup database to compress without prompting after backup completes: db2 connect to db2 unquiesce database db2 connect reset Take an ONLINE Backup db2 backup db to online compress or use a background process on a linux/unix machine nohup db2 backup db to online compress & List recent backups and where they are stored =>db2 list history backup all for Check the integrity of a backup image =>db2ckbkp Restore from Incremental Backup Automatic =>db2 restore db incremental automatic taken at If you need to restore an incremental backup manually this command will give you the required previous backups. =>db2ckrst -d -t

DB2 related

The following notes are for myself only. Whoever happened to accidentally read these notes, please do not ask any question. SQL2413N Online backup is not allowed because the database is not recoverable or a backup pending condition is in effect. Explanation Online backup cannot be performed while the database is not logging for forward recovery as forward recovery will be required at restore time. Forward recovery is placed into effect by setting either the database configuration LOGARCHMETH1 or LOGARCHMETH2 and then performing an offline backup of the database. User response Execute an offline backup or reconfigure the database for roll-forward recovery and issue an offline backup so that subsequent online backups will be allowed. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The operation failed because the specified database cannot be connected to in the mode requested.  SQLSTATE=57019 Resolving the problem The issue can be addressed by using th

Manage wtmp Log Size In Aix

1. CONVERT WTMP FILE TO A  TEXT FILE AND REMOVE UNWANTED ENTRIES. Covert the wtmp file to readable ascii text file: /usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/wtmp.ascii.txt We can calculate number of lines of wtmp.ascii.txt file; # cat /tmp/wtmp.ascii.txt|wc -l     3010110 See... how big it is! We can use text editor such as vi editor or other text editor to remove unwanted entry from this wtmp.ascii.txt file. However, if the file is too big, some text editor software is unable to open it. As an option, we can keep only last 1,500,500 lines (it is my number, you can choose your number yourself); tail -1500500 /tmp/wtmp.ascii.txt >> /tmp/wtmp.ascii2.txt We might edit the smaller wtmp.ascii2.txt file using text editor. 2. CONVERT THE TEXT FILE BACK TO WTMP FORMAT AND COPY TO THE DEFAULT LOCATION Use the trimmed file. /usr/sbin/acct/fwtmp -ic < tmp/wtmp.ascii2.txt>  /var/adm/wtmp 3. REMOVE TEMPORARY FILES (optional). rm /tmp/wtmp.ascii.tx