473,883 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HADR and failed tablespace creation

DB2 V8.2 FP10 on Windows

I tested the following HADR scenario:
- a new tablespace on a new filesytem is created on the primary System
- the replay on standby fails because of lacking permissions
- the tablespace is backed up on the primary system
- tables are created in the new tablespace and data is inserted (and a
couple of logs are archived)

- Takeover is done by the standby
- the new tablespace is not available (as expected)
- HADR is stopped and the tablespace is restored from the latest backup
- a rollforward to end of logs is started and it succeeded to my
surprise

I would have expected that it complains about missing log files (the
ones which have been archived by the former primary - the standby
system is not able to see the primary's archive destination)
it seems that all the necessary log files for the rollforward are still
local to the new primary system

My question now is:
Will the standby hold all logs following a transaction he could not
replay or am I just lucky that the logs
have still been there ?

Any comments ?
TIA
Joachim

Apr 11 '06 #1
4 4656
Recently I had created a PMR with the following complaint, I think it's
about the same as your case :

- after doing a load on a HADR database and if the load file is not
available on the standby server the tablespace becomes in the 'restore
pending' state. The only thing you can do now is a) a full database restore
or b) a tablespace restore. First, only a. was supported and advised. But
after giving my procedure I received the following message :

<begin>
ACTION PLAN: We finished the review of customers procedure to do
tablespace restore within his HADR environment.
---
on (primary)

db2 backup database hadrtest tablespace "(TEST)" online include logs

on (standby)

ftp file from <primary> to <standby>
db2 deactivate database hadrtest
db2 stop hadr on db hadrtest
db2 restore database hadrtest tablespace "(test)"
db2 start hadr on db hadrtest as standby
db2 takeover hadr on db hadrtest
db2 rollforward database hadrtest to end of logs tablespace "(test)"
online
---

These are the remarks to the above mentioned procedure used by customer:

- the steps outlined are correct
- essentially it is a standalone restore which is why it is working and we
should not have any issues.
- the key over here is the stop hadr which is req and you are no longer in
an HADR env.
- the trick is to make the system move into a standard mode away from a
prim / sec mode
- after doing tablespace restore you are fine to start hadr again.

So this is a supported procedure to do tablespace restore in hadr
environment without the need to do complete rebuild of hadr.

<end of message>

If you are using the userexit program. You should copy these files manually
to the standby server. (be carefull with that). Also place them in the
mirrorlogpath or another directory which can be used by the rollforward
statement.

Kind regards,
Paul

"Joachim Klassen" <Jo*******@emai l.com> wrote in message
news:11******** **************@ j33g2000cwa.goo glegroups.com.. .
DB2 V8.2 FP10 on Windows

I tested the following HADR scenario:
- a new tablespace on a new filesytem is created on the primary System
- the replay on standby fails because of lacking permissions
- the tablespace is backed up on the primary system
- tables are created in the new tablespace and data is inserted (and a
couple of logs are archived)

- Takeover is done by the standby
- the new tablespace is not available (as expected)
- HADR is stopped and the tablespace is restored from the latest backup
- a rollforward to end of logs is started and it succeeded to my
surprise

I would have expected that it complains about missing log files (the
ones which have been archived by the former primary - the standby
system is not able to see the primary's archive destination)
it seems that all the necessary log files for the rollforward are still
local to the new primary system

My question now is:
Will the standby hold all logs following a transaction he could not
replay or am I just lucky that the logs
have still been there ?

Any comments ?
TIA
Joachim

Apr 12 '06 #2

More or less good luck.

The standby may recycle log files a bit slower than the primary, but in
general it will not hold onto log files over time (if it did, that
could cause a space problem in the active log path). Because
performing a ROLLFORWARD at the secondary site some time after a
failover makes it Primary should be an anticipated recovery scenario,
it is important that the secondary site has some means to get at any
log files archived at the primary site.

Regards,
-Steve P.
--
Steve Pearson, IBM DB2 UDB for LUW Development, IBM Software Group
DB2 "Portland" Team, IBM Beaverton Lab, Beaverton, OR, USA

Apr 12 '06 #3
"Paul Peters" <p.************ ************@op endotsp.dotcom> wrote in message
news:44******** *************** @news.xs4all.nl ...
Recently I had created a PMR with the following complaint, I think it's
about the same as your case :

- after doing a load on a HADR database and if the load file is not
available on the standby server the tablespace becomes in the 'restore
pending' state. The only thing you can do now is a) a full database
restore or b) a tablespace restore. First, only a. was supported and
advised. But after giving my procedure I received the following message :

<begin>
ACTION PLAN: We finished the review of customers procedure to do
tablespace restore within his HADR environment.
---
on (primary)

db2 backup database hadrtest tablespace "(TEST)" online include logs

on (standby)

ftp file from <primary> to <standby>
db2 deactivate database hadrtest
db2 stop hadr on db hadrtest
db2 restore database hadrtest tablespace "(test)"
db2 start hadr on db hadrtest as standby
db2 takeover hadr on db hadrtest
db2 rollforward database hadrtest to end of logs tablespace "(test)"
online
---

These are the remarks to the above mentioned procedure used by customer:

- the steps outlined are correct
- essentially it is a standalone restore which is why it is working and we
should not have any issues.
- the key over here is the stop hadr which is req and you are no longer
in an HADR env.
- the trick is to make the system move into a standard mode away from a
prim / sec mode
- after doing tablespace restore you are fine to start hadr again.

So this is a supported procedure to do tablespace restore in hadr
environment without the need to do complete rebuild of hadr.

<end of message>

If you are using the userexit program. You should copy these files
manually to the standby server. (be carefull with that). Also place them
in the mirrorlogpath or another directory which can be used by the
rollforward statement.

Kind regards,
Paul


I assume that this is not a problem with an import? I have done some imports
(with the input file on only the primary server), and have not noticed a
problem.
Apr 12 '06 #4
> I assume that this is not a problem with an import? I have done some
imports (with the input file on only the primary server), and have not
noticed a problem.


No this is not a problem with an import, because data which is inserted with
an import will go through the logfiles. No this problem can occur if you're
doing things like

db2 load from file.ixf of ixf insert into db2inst1.test copy yes to
/dbbackup/load/TEST/NODE0000

You can have problems with HADR if there are network connections problems.
If they resolve the log files are earlier back than the mounting to the
/dbbackup directory. Thus the load will fail because the mounting does not
exist. It's a pitty that there is no load files shipping in db2 between the
primary and the secundary server.

Apr 13 '06 #5

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

Similar topics

1
3109
by: Bruce M | last post by:
Is there a way to run the db2-generated HADR-create script outside of DB2CC beyond the obvious? My DB2CC generates the HADR script and then abends because of a java error meaning I can't finish my HADR creation. In looking at the script it isn't necessarily obvious which commands should run on the primary server and which should be run on the standby server.
4
1891
by: bwmiller16 | last post by:
Folks - Again, a three-peat: RH AS3, UDB 8.1.7 on one pair of x-series, 8.1.8 on 2 i86 test boxes... We were just about to put all we had into production and now we're unable to get HADR to work consistently; we get congested-status even though we have a giggy-net that's very fast (we are able to SSH copy between our production servers at about 30mb/second, encrypted).
7
10674
by: Mark A | last post by:
If server 01 running HADR in the primary role crashes, and the DBA does a HADR takeover by force on the 02 server to switch roles, then the 02 server is now the primary. What happens when the Server 01 is brought back up? It still thinks it is the primary because that was its role when it crashed and it does not know about the takeover by force command that was issued. Does the 01 server check the 02 server to see what role they are in...
7
5071
by: Marc | last post by:
Hi, I'm working with a customer that is trying to find a solution to provide geographical redundancy. Our application is currently using IBM DB2 v8.2. I have a couple of questions with regards to HADR: 1. DB2 HADR (Can it be used to support geographical redundancy in a nested fashion (ie. Synchronous HADR at a site, and ASYNCRONOUS between sites using the same instances/databases). If so how would we set it up?
16
21839
by: gumby | last post by:
I'm having trouble getting HADR to work with the sample databases on two HS20 xSeries blades, Red Hat ES4 up3, DB2 8.2.4, getting the following error. SQL1768N Unable to start HADR. Reason code = "7" - The primary database failed to establish a connection to its standby database within the HADR timeout interval. What things should I check besides the remote host and remote service parameters on the standby database, which seem to be...
8
23495
by: Challenge | last post by:
Hi, I got error, SQL1768N Unable to start HADR. Reason code = "7", when I tried to start hadr primary database. Here are the hadr configuration of my primary db: HADR database role = STANDARD HADR local host name (HADR_LOCAL_HOST) = testserver HADR local service name (HADR_LOCAL_SVC) = 56000 HADR remote host name (HADR_REMOTE_HOST) = testserver
6
22034
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 down hill from there. Though the Standby machine seemed to know it was a standby it would not connect to the primary. I could not even do a db2 get snapshot to view the hadr status on the machine. I was wanting to do a few HADR tests before I...
6
3481
by: shorti | last post by:
I have two questions about HADR recovery. I am running db2 v8 fp12. 1) If the primary suddenly crashes would you always want to switch the standby to the primary by force...or would there be times when you would want to make it a standard? (and why) 2) Let us say the primary suddenly crashes (someone pulled the power cable) and you switch the standby to primary by force. Then you bring the primary back up and issue a START as...
3
2859
by: Pat | last post by:
Hi - We're trying to set up an HADR pair on two databases on instances with different names on separate servers. The databases were defined as follows: CREATE DATABASE database1 ON '/db2home/instanceA'; CREATE DATABASE database2 ON '/db2home/instanceB';
0
9778
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11112
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10833
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10405
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5784
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4602
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3228
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.