Steps:
- Go to Start and type "run" and open.
- In the Run console type "db2cmd" and the window will open.
Execute the below commands in the given order.
- CONNECT TO DBNAME user USERNAME using PASSWORD
- QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS
- CONNECT RESET
- DEACTIVATE DATABASE DBNAME
- BACKUP DATABASE DBNAME TO "C:\CASE STUDY DB BACKUP" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 COMPRESS WITHOUT PROMPTING
- ACTIVATE DATABASE DBNAME
- CONNECT TO DBNAME
- UNQUIESCE DATABASE
- CONNECT RESET
Note:
-Replace the word DBNAME with the name of your Database.
-USERNAME is databse admin name and PASSWORD is Databse admin password.
-USERNAME is databse admin name and PASSWORD is Databse admin password.
-Example commands are given below.
-For each command the "db2" should be pre-fixed before executing as given below.
Example of script:
db2 CONNECT TO AURORADB user db2admin using passme!23
db2 QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS
db2 CONNECT RESET
db2 DEACTIVATE DATABASE AURORADB
db2 BACKUP DATABASE AURORADB TO "C:\CASE STUDY DB BACKUP" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 COMPRESS WITHOUT PROMPTING
db2 ACTIVATE DATABASE AURORADB
db2 CONNECT TO AURORADB
db2 UNQUIESCE DATABASE
db2 CONNECT RESET
In the above the AURORADB is the Database name used, db2admin is database admin name and passme!23 is the password for the admin.
Please try and any doubts or queries comment down..
Sharing is Caring!!!!