DB2 online backup is one of our most commonly used database backup methods. The following describes the steps of DB2 online backup methods in detail, hoping to help you.
DB2 online database backup test:
-- Change database configuration parameters
Db2 update db cfg using LOGRETAIN on
-- Completely back up the database offline to remove the database from the "backup temporarily suspended" status
Db2 backup db TestDB to D: \ DB2_Train
-- Insert a new record in the test table and verify the record
Db2 insert into T1 (C1, C2) values (2, 'Online backup test ')
Db2 select * from T1
-- Online backup database
Db2 backup db TestDB online To D: \ DB2_Train
-- Obtain the path of the database activity log and back up the log
-- Simulate a disaster and delete a database
Db2 drop db TestDB
-- Restore database
Db2 restore db TestDB from D: \ DB2_Train taken at 20100426075221
-- Database connection will fail)
C: \> db2 connect to TestDB
SQL1117N cannot connect to or activate the database because it is in the ROLL-forward pending state.
"TESTDB ". SQLSTATE = 57019
-- Roll back the database to make it available
Db2 rollforward database testdb to end of logs and complete overflow log path ("D: \ DB2_Train \ SQLOGDIR ")
-- Connect to the database and Test
Db2 connect to TESTDB
Db2 select * from T1
How to Create a DB2 instance in Windows
DB2 Time Functions
Four ways to delete DB2 data
DB2 tablespace size limit
Lotus Notes calls the DB2 Stored Procedure