vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| got: DB2 v8.2 ESE WinXP in machine A Windows Server 2003 in machine B I have a db server on machine 'A' and I want to create a standby db on machine 'B' via log shipping. standby db on B was created with a backup online imagine and then restore it and rollforward it to end of logs but NOT complete so I can apply the logs from A. 1)I maded a full online backup that include logs *db2 => backup database bd online to c:\backups include logs Backup successful. The timestamp for this backup image is : 20050414113540 2)Copy the image to machine 'B' *C:\WINDOWS>net use z: \\192.168.0.83\c Se ha completado el comando correctamente. *C:\WINDOWS>XCOPY C:\BACKUPS\BD.0 Z:\BACKUPS\BD.0\*.* /S /E C:\BACKUPS\BD.0\DB2\NODE0000\CATN0000\20050414\113 540.001 1 archivos copiados 3)Restore the backup image on 'B' *db2 => RESTORE DATABASE BD FROM C:\BACKUPS TO C: INTO BD DB20000I The RESTORE DATABASE command completed successfully. 4)See if in state is the db *db2 => rollforward database bd query status Rollforward Status Input database alias = bd Number of nodes have returned status = 1 Node number = 0 Rollforward status = DB pending Next log file to be read = S0018130.LOG Log files processed = - Last committed transaction = 2004-10-28-08.38.49.000000 5)Perfert now, it is supose that I can send daily copies of the A's logs to B *C:\WINDOWS>XCOPY C:\DB2\NODE0000\SQL00003\SQLOGDIR\*.* z:\DB2\NODE0000\SQL00001\ SQLOGDIR\*.* /S /E C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018111.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018112.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018113.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018114.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018115.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018116.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018117.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018118.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018119.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018120.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018121.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018122.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018123.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018124.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018125.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018126.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018127.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018128.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018129.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018130.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018131.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018132.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018133.LOG 23 archivos copiados 6)Apply new logs to B *db2 => rollforward database bd to end of logs Rollforward Status Input database alias = bd Number of nodes have returned status = 1 Node number = 0 Rollforward status = DB working Next log file to be read = S0018132.LOG Log files processed = S0018130.LOG - S0018131.LOG Last committed transaction = 2005-04-14-11.33.27.000000 7)Maded some changes to the db on 'A' so copy again the logs to B *C:\WINDOWS>XCOPY C:\DB2\NODE0000\SQL00003\SQLOGDIR\*.* z:\DB2\NODE0000\SQL00001\ SQLOGDIR\*.* /S /E /Y C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018111.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018112.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018113.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018114.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018115.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018116.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018117.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018118.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018119.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018120.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018121.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018122.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018123.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018124.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018125.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018126.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018127.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018128.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018129.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018130.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018131.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018132.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018133.LOG C:\DB2\NODE0000\SQL00003\SQLOGDIR\S0018134.LOG 24 archivos copiados 8)Apply the logs on B db2 => rollforward database bd to end of logs Rollforward Status Input database alias = bd Number of nodes have returned status = 1 Node number = 0 Rollforward status = DB working Next log file to be read = S0018132.LOG Log files processed = S0018130.LOG - S0018131.LOG Last committed transaction = 2005-04-14-11.44.02.000000 DB20000I The ROLLFORWARD command completed successfully. 9)Aparentely everything when well,is this a correct way to do a standby? 10)Can I copy A's logs once the B is rollforward to complete? (back to pending state) 11)Where I can find stuff about DB2 configurations files? Because to find where the logs are and tablespace are is kind of magic!! Many Thanks |
| |||
| Juan, Are you aware of HADR? Espcially since I'm reasonably sure that its' part of the ESE licence. So you seem to be re-inventing the weheel here. http://publib.boulder.ibm.com/infoce...n/c0011267.htm Cheers Serge -- Serge Rielau DB2 SQL Compiler Development IBM Toronto Lab |
| |||
| Hi, > Are you aware of HADR? Espcially since I'm reasonably sure that its' > part of the ESE licence. So you seem to be re-inventing the weheel here. yep, it is, and it's working perfectly for me on two W2K3 boxes. But it needs identical systems and I don't know if Juan's setup with W2K3 and XP would work (and I'm close to sure that it's unsupported). Regards, Bernd |
| |||
| Bernd Giegerich wrote: > Hi, > >> Are you aware of HADR? Espcially since I'm reasonably sure that its' >> part of the ESE licence. So you seem to be re-inventing the weheel here. > > > yep, it is, and it's working perfectly for me on two W2K3 boxes. > > But it needs identical systems and I don't know if Juan's setup with > W2K3 and XP would work (and I'm close to sure that it's unsupported). > > Regards, > Bernd Didn't catch that in the original post. FWIW I wouldn't see why HADR woudl not work. One of the good things about HADR is that you can do upgrades on one system at a time. I'd expect no problems within the Windows family, but formal support is a different issue.... -- Serge Rielau DB2 SQL Compiler Development IBM Toronto Lab |
| |||
| Hi, > FWIW I wouldn't see why HADR woudl not work. I don't know, if DB2 checks for OS versions or such things during the HADR initialisation - I never tried to set it up with different operating systems on primary and standby... > One of the good things about HADR is that you can do > upgrades on one system at a time. I'd expect no problems within the > Windows family, but formal support is a different issue.... yep, even different patch levels are only supported for the short time of rolling upgrades, according to the documentation. Regards, Bernd |
| |||
| I mess up typing the db2 version. I got Workgroup unlimited Edition (WUE)and that one doesn't have HADR. I also read about HADR, and sound pretty good solution, but unfortunatelly the project doesn't have any budget. I know are many ways of upgrading logs to the standby, last thing I tryed was this: db2 => RESTORE DATABASE BD FROM C:\BACKUPS DB20000I The RESTORE DATABASE command completed successfully. --archive log for datbase BD on machine A db2 => ROLLFORWARD DB BD TO END OF LOGS Rollforward Status Input database alias = BD Number of nodes have returned status = 1 Node number = 0 Rollforward status = DB working Next log file to be read = S0018146.LOG Log files processed = - Last committed transaction = 2005-04-15-08.32.05.000000 DB20000I The ROLLFORWARD command completed successfully. --Made some change on db B and also call archive log command db2 => ROLLFORWARD DB BD TO END OF LOGS SQL1265N The archive log file "S0018147.LOG" is not associated with the current log sequence for database "BD" on node "0". Any sugestions or manuals to do a stuff like this? Thanks |
| |||
| HADR is available with your version of DB2 as an add-on license. That should be more economical than an upgrade to ESE. However, I did notice you said you have "no budget" so I understand this may not be an available option. Don't forget however that while you have "no budget" you may still spend more implementing a less manageable solution due to your time investment and other hidden costs. Here is one reference that may be helpful for planning and implementing a hand-rolled log shipping solution: http://www-106.ibm.com/developerwork...04mcinnis.html Btw, I found that with a Google query. It was the top hit with default search on "db2 log shipping disaster recovery". IBM has arranged for much DB2 documentation to be searchable via Google; don't forget to take advantage of this when you don't know where to look. There is also some discussion (but looks like it might be briefer than the above) in Chapter 5 of the DB2 Data Recovery and High Availability Guide and Reference. Since the V8.2 one was revised to focus more on HADR in this area, there is probably more on the hand-rolled approach in an earlier version, such as that for V8.1: ftp://ftp.software.ibm.com/ps/produc...r/db2hae80.pdf Regards, - Steve P. IBM DB2 UDB for LUW Development Portland, OR |