How To Restore Database DB2 With Cli

The first before a restore DB2 database and following step by step for you attention. he i use operating system Linux Ubuntu 16, For exemple i wan't to restore DB2 database from server production.

1. Open Terminal (CTRL+ALT+T)
2. Then writes command proxychains ssh user@ip_server, will appear as shown below


2. If your succes login to server, right now you write command sudo nano name.sql , for your               example sudo nano bpmdb.sql, will appear as shown below


3. Next your copy script bpmdb.sql shown below : 
create database BPMDBNEW automatic storage yes  using codeset UTF-8 territory US pagesize 32768;
connect to BPMDBNEW;
grant dbadm on database to user bpmadmin;
UPDATE DB CFG FOR BPMDBNEW USING LOGFILSIZ 4096 DEFERRED;
UPDATE DB CFG FOR BPMDBNEW USING LOGSECOND 64 DEFERRED;
connect reset; 

4. Then your running file bpmdb.sql, with command db2 -tvf bpmdb.sql will appear as shown below


5. The last your must be restore file who a backup in server, with command 
 db2 restore database BPMDBNEW from /home/bpmadmin/backup_tes_db2 taken at                  20161109112515


Finish Restore DB2 Database With Cli, i hope your succes for backup DB2 database





Next
Previous
Click here for Comments

0 comments: