D The following steps are built in the B2 environment:
1. Su–db2inst Note '-' There will be errors in the back ;
2. DB2 into the DB2 command line mode ;
3. Create DATABASE pb_db on/home/db2inst using codeset GBK territory ZH_CN pagesize 8192--- build library ;
4. Connect to pb_db --- connection ;
5. Create Bufferpool testpool size pagesize 32k-- temporary tablespace buffer pool ;
6. Create temporary tablespace temp pagesize 32k managed by database using (file ' \home\db2inst1\rdl\data ' 500 0) extentsize Bufferpool testpool -- temporary table space ;
7. Create Bufferpool pbloop Immediate size pagesize 32k-- user table space buffer pool ;
8. Create regular tablespace pbxt pagesize 32k managed by database using (file ' \home\db2inst1\rdl\data\user ' 102 4M) AutoResize no extentsize, overhead 10.5 prefetchsize, transferrate 0.14 bufferpool pbloop -- user table space
DB2 Database backup steps are as follows:
1. Make sure no user is using DB2:
DB2 list applications for DB pb_db;
2. Shut down the database and reboot to disconnect all connections:
Db2stop Force
Db2start;
3. Execute backup command: (using TSM as backup media)
DB2 Backup DB pb_db use TSM backups are successful, a timestamp will be returned
DB2 Backup DB pb_db to/home/db2inst1/rdl/data backing up the database in the data folder generates a 001 file
Db2The database recovery steps are as follows:
1. Check the memo history:
DB2 List History backup all for pb_db;
2. Restore data at a point in time:
DB2 RESTORE DATABASE pb_db From/home/db2inst1/rdl/data taken at 20140625141510
A warning will be displayed, and completing the y will restore
Building database backup and recovery for DB2 databases