473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

standby db on windows

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
Nov 12 '05 #1
7 2649
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
Nov 12 '05 #2
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
Nov 12 '05 #3
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
Nov 12 '05 #4
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
Nov 12 '05 #5
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
Nov 12 '05 #6

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

Nov 12 '05 #7
Thanks Steve, I'll write the stuff to have a better idea, and then try
to make them work!

If I have any problem, I'll post again.

Regards

Juan
Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Cherrish Vaidiyan | last post by:
hello, Thanx for the suggestions on my Listener query. Now i am performing a simple work.. STANDBY DATABASE creation. I have followed the instraction from Oracle 9i Release 1 documentation...
0
by: Cherrish Vaidiyan | last post by:
sir, The following are the steps that i followed in setting up standby database on Red hat Linux 9. i am using Oracle 9i. i have followed the steps in this site : ...
5
by: Phyxius | last post by:
I just had a new computer built. My previous computer was also a custom and I was using Windows XP home. I purchased a new XP Home edition from Microsoft and installed it into the new computer-not...
6
by: shorti | last post by:
db2 8.1 fix pack 12 on AIX 5.3 This is a newly configured HADR machine. The HADR was up and running. I was 'playing' around some on the standby and did a db2 deactivate and things sort of went...
2
by: paul | last post by:
Hi, I have two databases in hadr, this morning i issued a "takeover ... by force" because the normal takeover didn't worked. Now i have two standard databases, and if i try to put the old primary...
4
by: Mark A | last post by:
I would like to make a split mirror copy of a HADR standby database. Please note that I do not want to create a standby with a split mirror of the primary, but I want to make a split mirror of the...
6
by: JT | last post by:
Hi, I've realized that my good fortune of not having my computer go into standby mode was the result of my application accessing a file on a shared network drive. Not going into standby is a...
7
by: Volkan Senguel | last post by:
Hi i'm searching a solution to avoid that the user can go in the standby mode while a app is runing. i have searched and readed a lot in the web and have not found a working solution... for the...
0
by: questionit | last post by:
Hi My Windows XP does not go on complete standby even though it has been set to go to standby in Power Options. Only the HDD goes on to standby and the monitor but the rest of the peripherals...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.