Post -5:How to use the image generated by LOAD...COPY YES

81 views
Skip to first unread message

malla kishore

unread,
Sep 4, 2007, 2:55:10 AM9/4/07
to mirac...@googlegroups.com

Hi Team, 

SAMPLE database is enabled for archieve logging and I tried to load data
in one of the tables using db2 LOAD utility with COPY YES option.

During the process, the backup image will be generated...
How can we use this backup image to restore the table data if load fails


Thanks in advance.
Kishore
 

Siva Prasad

unread,
Sep 4, 2007, 5:48:34 AM9/4/07
to mirac...@googlegroups.com

Hi Kishore,
Try to load the data using load cursor option


Thanks & Regards
Siva prasad Sekharamahanti
DB2 DBA,Data Stage Consultant
Miracle Software Systems
WorkPhone: 0012482331854
Mobile: 9959672794
website: www.miraclesoft.com

------- Original Message -------
From : malla kishore[mailto:mallak...@gmail.com]
Sent : 9/4/2007 2:55:10 AM
To : mirac...@googlegroups.com
Cc :
Subject : RE: Post -5:How to use the image generated by LOAD...COPY YES

Sanjay kumar akasapu

unread,
Sep 4, 2007, 5:58:49 AM9/4/07
to mirac...@googlegroups.com

Hi Kishore,
You can specify the path to which the backup can be taken by using the option.
>>-LOAD--+--------+--FROM----+-filename---+-+--OF--filetype----->
'-CLIENT-' +-pipename---+
+-device-----+
'-cursorname-'


+-COPY--+-YES--+-USE TSM--+--------------------------+--------+-+-+
| | '-OPEN--num-sess--SESSIONS-' | |
| | .-,----------------. | |
| | V | | |
| +-TO----device/directory-+---------------------+ |
| '-LOAD--lib-name--+--------------------------+-' |
| '-OPEN--num-sess--SESSIONS-'


If any concerns please reply to me.

Thanks & Regards
Sanjay kumar Akasapu,
Jr.Database Administrator,
Miracle Software Systems India(P)Ltd,
Mail:saka...@miraclesoft.com,
Mobile:
phone:248-233-31854.

MallaKishore

unread,
Sep 4, 2007, 6:02:01 AM9/4/07
to mirac...@googlegroups.com

Hi Shiva,

Thanks for the reply..But i couldnt get ur answer can u please breif me out and let me explain once again .. i 
did my load operation using option COPY YES now it gave me a image file 

(USE THIS OPTION...
[{COPY {NO | YES { USE TSM [OPEN num-sess SESSIONS]
                 | TO dir/dev [ {,dir/dev} ... ]

                  | LOAD lib-name [OPEN num-sess SESSIONS]}}


Now u will get the file some thing like this

SAMPLE.4.DB2.NODE0000.CATN0000.20070904124914.001

means  this image will have the table data which i loaded ... now i want to restore the table date using this image...

How can i do that..

Please feel free to ping me if any queries


Thanks & Regards
KishoreMalla,
DB2 DBA,
ODW Team,
Prestige Towers,
99,Residency Road,
Banglore-56025,
INDIA
Tel-0-9916084285


------- Original Message -------
From    : Siva Prasad[mailto:msekhara...@miraclesoft.com]
Sent    : 9/4/2007 5:48:34 AM

To      : mirac...@googlegroups.com
Cc      : 
Subject : RE: Post -5:How to use the image generated by LOAD...COPY YES

 

Hi Kishore,

Try to load the data using load cursor option




Thanks & Regards 
Siva prasad Sekharamahanti 
DB2 DBA,Data Stage Consultant
Miracle Software Systems
WorkPhone: 0012482331854
Mobile: 9959672794
website: www.miraclesoft.com



MallaKishore

unread,
Sep 5, 2007, 1:08:23 AM9/5/07
to mirac...@googlegroups.com


Hi Sanjay,

I want to be clear with my question...

I used load command with copy = yes and i have got the image now i want to restore that image . how can i do that
restore

For example: db2 load from common.ixf of ixf insert into common.emptype copy yes to c:\

the above is the command i used

then i got the image to c:\

as


SAMPLE.NODE0000.CATN0000.20070904164827.001


Now i want to restore this image

How can i restore ?
..

If i have to use some restore command please let me know what command i have to use

Please let me know any issues

Thanks & Regards
KishoreMalla,
DB2 DBA,
ODW Team,
Prestige Towers,
99,Residency Road,
Banglore-56025,
INDIA
Tel-0-9916084285


------- Original Message -------
From : Sanjay kumar akasapu[mailto:saka...@miraclesoft.com]
Sent : 9/4/2007 5:58:49 AM


To : mirac...@googlegroups.com
Cc :
Subject : RE: Post -5:How to use the image generated by LOAD...COPY YES

Hi Kishore,


You can specify the path to which the backup can be taken by using the option.
>>-LOAD--+--------+--FROM----+-filename---+-+--OF--filetype----->
'-CLIENT-' +-pipename---+
+-device-----+
'-cursorname-'


+-COPY--+-YES--+-USE TSM--+--------------------------+--------+-+-+
| | '-OPEN--num-sess--SESSIONS-' | |
| | .-,----------------. | |
| | V | | |
| +-TO----device/directory-+---------------------+ |
| '-LOAD--lib-name--+--------------------------+-' |
| '-OPEN--num-sess--SESSIONS-'


If any concerns please reply to me.

Thanks & Regards
Sanjay kumar Akasapu,
Jr.Database Administrator,
Miracle Software Systems India(P)Ltd,
Mail:saka...@miraclesoft.com,
Mobile:
phone:248-233-31854.

------- Original Message -------

Siva Prasad

unread,
Sep 5, 2007, 5:16:22 AM9/5/07
to mirac...@googlegroups.com

Hi Kishore,

Steps:
1)db2 export to c:\employee.ixf of ixf messages c:\employee_msg.txt select * from miracle.employee
2)db2 terminate
3)db2 update db cfg for sample using logretain on
4)db2 update db cfg for sample using usereixt on
5)db2 connect to sample
6)db2 backup db to c:\
6)db2 load from c:\employee.ixf of ixf messages c:\employee_load_msg.txt insert into miracle.test
copy yes to c:\
7)db2 restore db sample to end of logs and complete
8)db2 connect to sample
9)db2 select * from miracle.test

Thanks & Regards
Siva prasad Sekharamahanti
DB2 DBA,Data Stage Consultant
Miracle Software Systems
WorkPhone: 0012482331854
Mobile: 9959672794
website: www.miraclesoft.com

------- Original Message -------
From : MallaKishore[mailto:kma...@miraclesoft.com]
Sent : 9/5/2007 1:08:23 AM

Siva Prasad

unread,
Sep 5, 2007, 5:34:36 AM9/5/07
to mirac...@googlegroups.com

Steps:
1)db2 export to c:\employee.ixf of ixf messages c:\employee_msg.txt select * from miracle.employee
2)db2 terminate
3)db2 update db cfg for sample using logretain on
4)db2 update db cfg for sample using usereixt on
5)db2 connect to sample
6)db2 backup db to c:\
6)db2 load from c:\employee.ixf of ixf messages c:\employee_load_msg.txt insert into miracle.test
copy yes to c:\
7)db2 restore db sample from c:\
8)db2 rolloforward db sample to end of logs and complete
9)db2 connect to sample
10)db2 select * from miracle.test

Thanks & Regards
Siva prasad Sekharamahanti
DB2 DBA,Data Stage Consultant
Miracle Software Systems
WorkPhone: 0012482331854
Mobile: 9959672794
website: www.miraclesoft.com

------- Original Message -------
From : Siva Prasad[mailto:msekhara...@miraclesoft.com]
Sent : 9/5/2007 5:16:22 AM

Reply all
Reply to author
Forward
0 new messages