Saturday, June 24, 2017

db2 backup and drop database


db2 connect to xydb
--the next command forces off the users asynchronously
db2 quiesce database immediate force connections
--but you need to unquiesce to drop
db2 unquiesce database
db2 connect reset
-- hope you don't have a connection in between
-- also make sure the database isn't activated....
db2 deactivate db xydb
-- do this as a safeguard cause there is no going back once you drop it.....
db2 backup db xydb to '<path you provide>' compress
db2 drop db xydb