DB2 database back up and restore commands & using db2cc tool UNIX and windows
This post briefs the steps to take back up of a database in DB2.
There are mutiple ways to take database back up in DB2. I felt the easiest way of taking back up for a database is using the DB2CC tool (DB2 control center tool). There the process or steps to take back up or restore a particular DB is pretty straight and easy.
Yet another simple process to take back up is commands in the command line.
To take back up :
db2inst1@nc145016:/opt> db2 BACKUP DATABASE CDSDB TO "/opt/BKP"
Backup successful. The timestamp for this backup image is : 20100709051851
However you can see the command generated during the back up taking process using db2cc tool.
It looks some thing like below ...
-- The following commands may not run as expected in a multi database partition environment if executed from a single script.
-- Quiesce Database
-- Run on any database partition.
CONNECT TO CDSDB;
QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
CONNECT RESET;
-- Backup Database Partition Grouping 1
-- Run on database partition(s): 0
BACKUP DATABASE CDSDB TO "/opt/BKP" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;
-- Unquiesce Database
-- Run on any database partition.
CONNECT TO CDSDB;
UNQUIESCE DATABASE;
CONNECT RESET;
To restore a database :
A simple command looks like below to restore a particular database.
db2inst1@nc145016:/opt/BKP> db2 RESTORE DATABASE CDSDB FROM "/opt/BKP" TAKEN AT 20100708081818
DB20000I The RESTORE DATABASE command completed successfully.
And where as the db2cc generated SQL query may look like some thing below
RESTORE DATABASE CDSDB FROM "/opt/BKP" TAKEN AT 20100708081818 WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;
Hope this helps .. any related information to db2 database back up / restore process can be posted to this in comments.
1 comments to "DB2 database back up and restore commands and using db2cc tool unix and windows"
Post a Comment
Whoever writes Inappropriate/Vulgar comments to context, generally want to be anonymous …So I hope U r not the one like that?
For lazy logs, u can at least use Name/URL option which doesn’t even require any sign-in, The good thing is that it can accept your lovely nick name also and the URL is not mandatory too.
Thanks for your patience
~Krishna(I love "Transparency")
Popular Posts
-
The best solution to know about these init levels is to understand the " man init " command output on Unix. There are basically 8...
-
How to Unlock BSNL 3G data card to use it with Airtel and Vodafone Model no : LW272 ? How to unlock BSNL 3G data card( Model no : LW272 )us...
-
How to transfer bike registration from one State to other (Karnataka to Andhra)?? Most of us having two wheelers purchased and registered in...
-
ఓం శ్రీ స్వామియే శరణం ఆయ్యప్ప!! Related posts : Trip to Sabarimala - Part 1 Trip to Sabarimala - Part 2 Ayappa Deeksha required things...
-
Following are some of interesting blogs I found till now ...please comment to add your blog here. Blogs in English : http://nitawriter.word...
Popular posts
- Airtel and vodafone GPRS settings for pocket PC phones
- Andhra 2 America
- Ayyappa Deeksha required things
- Blogs I watch !
- Captions for your bike
- DB2 FAQs
- Deepavali Vs The Goddes of sleep
- ETV - Dhee D2 D3
- Evolution of smoking in India Women
- How to make credit card payments?
- init 0, init 1, init 2 ..
- Java-J2EE interview preparation
- mCheck Application jar or jad download
- My SQL FAQs
- My Travelogues
- Old is blod - New is italic
- Online pay methids for credit cards
- Oracle FAQs
- Pilgrimages
- Smoking in Indian Women
- Technology Vs Humans
- Twitter feeds for all Telugu stars on single page.
- Unix best practices
- Unix FAQs
Nagaraju says:
Hi
Please visit my blog gsystime.blogspot.com
This blog having so much of information.
(English-jan,feb-10 and Telugu)
Regards,
Nagaraju