By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,287 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,287 IT Pros & Developers. It's quick & easy.

problem with a restore maybe ...

P: n/a
Hi ,

I'm wondering what's going on with a restore I'm trying to do .

My DB2 version is a 7.2 on a Linux RH ES 2.1 .

I've copy a recent backup that was on NAS for a test on my machine .

I then restore the backup without creating a database with the simple
command line "db2 restore backup DBNAME".

For information , I put myself on the folder (directory) that contains
the backup .

The restore went quite well at first but 30 mn later it was kind of ...
stuck .

I did a 'ps aux | grep DBNAME' and I've noticed the process was stuck
(S for SLEEP).

So I killed it (sorry I was kind of barbaric with this one) with a
'kill -9' .

The process was as you can imagine , snipped .

I try later to do a restore but the following message keep coming
:"SQL1042C An unexpected system error occurred. SQLSTATE=58004" .

I thought first that the backup was corrupted (It happens often with
the logfile in Oracle) so I deleted it and unzip it again .

But the problem keep coming .

Question : Any idea what's going on ?

Thx in Advance .

Andy the beginner in DB2 .

ps1: there is no database on this platform . (I didn't create a single
database)
ps2: My backup is like that
DBNAME.0.db2inst1.NODE0000.CATN0000.20050531020000 .001

Nov 12 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
Did you check Db2diag.log ?
Do you have necessary system resources ? Can you find the time you
think it's hang , and track it from db2diag.log
and see if any error persisting at that time.
By the way , you sure you executed the command , "db2 restore backup
DBNAME" ? , the syntax doesn't look good

Nov 12 '05 #2

P: n/a
Hi,

I'm wondering what's going on with a restore I'm trying to do .
My DB2 version is a 7.2 on a Linux RH ES 2.1 .
I don't know if I really can help you, cause I had similiar problems
only with 8.1.7 on Win32. But maybe it could help at least if you are
dealing with the IBM support.
I've copy a recent backup that was on NAS for a test on my machine .
I copied a backup image from one 8.1.7/w2k3 system to another and
restored it there. I didn't do anything cruel during the restoer, and
even rolled forward the restoerd db without an error (it was an online
backup I restored from).
I then restore the backup without creating a database with the
simple command line "db2 restore backup DBNAME".
Looks strange to me. 8.x syntax wood be "db2 restore DATABASE dbname".
Sure you did it the way you described?

I try later to do a restore but the following message keep coming
:"SQL1042C An unexpected system error occurred. SQLSTATE=58004" .


That's exactly what I got after the whole restore process as I tried a
simple "CONNECT TO XXXXX" (keep in mind: For me it was 8.1.7 on W2K3).

After some investigation we learned, that it was a problem with the acl
on the file system, set by DB2 by itself during the restore. That was
fixed (for 8.x) with FP8. Maybe your interrupted restore left behind
some wrong set access flags on the tablespace containers? Tried to clean
out the table spaces created during your first restore?

Regards,
Bernd
Nov 12 '05 #3

P: n/a
Hi everyone ,

Thanks for your insight .

It's been quite helpful .

Current situation : My restore is on the way . It's the same thing than
yesterday mean it seems to be asleep.

This time , I won't snipe it.

For that restore to happen , I had to create an another database DBNAME
and restore it with the following command line :

restore db DBNAME from /opt/db2inst1/bck031/savdatabase taken at
20050531020000 redirect;

Not sure what the result will be but will see .

Regards,
Andy the beginner in DB2

ps: a few link that provided me some help .

http://www-106.ibm.com/developerwork...nxw07=DBclones

http://divbyzero.com/PHP/view-source...ate-tables.sql
Andy K a écrit :
Hi ,

I'm wondering what's going on with a restore I'm trying to do .

My DB2 version is a 7.2 on a Linux RH ES 2.1 .

I've copy a recent backup that was on NAS for a test on my machine .

I then restore the backup without creating a database with the simple
command line "db2 restore backup DBNAME".

For information , I put myself on the folder (directory) that contains
the backup .

The restore went quite well at first but 30 mn later it was kind of ...
stuck .

I did a 'ps aux | grep DBNAME' and I've noticed the process was stuck
(S for SLEEP).

So I killed it (sorry I was kind of barbaric with this one) with a
'kill -9' .

The process was as you can imagine , snipped .

I try later to do a restore but the following message keep coming
:"SQL1042C An unexpected system error occurred. SQLSTATE=58004" .

I thought first that the backup was corrupted (It happens often with
the logfile in Oracle) so I deleted it and unzip it again .

But the problem keep coming .

Question : Any idea what's going on ?

Thx in Advance .

Andy the beginner in DB2 .

ps1: there is no database on this platform . (I didn't create a single
database)
ps2: My backup is like that
DBNAME.0.db2inst1.NODE0000.CATN0000.20050531020000 .001


Nov 12 '05 #4

P: n/a
One more question :

I forgot , My backup is online .

So is there any difference between an online backup and offline backup
?

Thanks for the answer .

Andy the beginner in DB2.

Andy K a écrit :
Hi ,

I'm wondering what's going on with a restore I'm trying to do .

My DB2 version is a 7.2 on a Linux RH ES 2.1 .

I've copy a recent backup that was on NAS for a test on my machine .

I then restore the backup without creating a database with the simple
command line "db2 restore backup DBNAME".

For information , I put myself on the folder (directory) that contains
the backup .

The restore went quite well at first but 30 mn later it was kind of ...
stuck .

I did a 'ps aux | grep DBNAME' and I've noticed the process was stuck
(S for SLEEP).

So I killed it (sorry I was kind of barbaric with this one) with a
'kill -9' .

The process was as you can imagine , snipped .

I try later to do a restore but the following message keep coming
:"SQL1042C An unexpected system error occurred. SQLSTATE=58004" .

I thought first that the backup was corrupted (It happens often with
the logfile in Oracle) so I deleted it and unzip it again .

But the problem keep coming .

Question : Any idea what's going on ?

Thx in Advance .

Andy the beginner in DB2 .

ps1: there is no database on this platform . (I didn't create a single
database)
ps2: My backup is like that
DBNAME.0.db2inst1.NODE0000.CATN0000.20050531020000 .001


Nov 12 '05 #5

P: n/a
Andy K wrote:
One more question :

I forgot , My backup is online .

So is there any difference between an online backup and offline backup
?

Thanks for the answer .

Andy the beginner in DB2.

Andy K a écrit :


Well cenrtainly there's a difference,
but concerning backup restore;
for an online restore to succeed, after the restore you'll need to
rollforward to a point in time, it's mandatory.

But still, performing a simple restore db <dbname> should just work,
after the restore it will tell you the database is rollforward pending
mode. You don't have to notify db2 that you're restoring an online or
offline backup though.

-R-
Nov 12 '05 #6

P: n/a
> restore db DBNAME from /opt/db2inst1/bck031/savdatabase taken at
20050531020000 redirect;

You are using the redirect option, are you going to change tablespace
location/size?
Nov 12 '05 #7

P: n/a
Yes there is.
For the online backup image that you have, when you restore it, the db will
restore and be in roll forward pending.
You MUST roll it forward to at least the timestamp of the END of your online
backup.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Andy K" <ak****@yahoo.com> a écrit dans le message de news:
11**********************@g14g2000cwa.googlegroups. com...
One more question :

I forgot , My backup is online .

So is there any difference between an online backup and offline backup
?

Thanks for the answer .

Andy the beginner in DB2.

Andy K a écrit :
Hi ,

I'm wondering what's going on with a restore I'm trying to do .

My DB2 version is a 7.2 on a Linux RH ES 2.1 .

I've copy a recent backup that was on NAS for a test on my machine .

I then restore the backup without creating a database with the simple
command line "db2 restore backup DBNAME".

For information , I put myself on the folder (directory) that contains
the backup .

The restore went quite well at first but 30 mn later it was kind of ...
stuck .

I did a 'ps aux | grep DBNAME' and I've noticed the process was stuck
(S for SLEEP).

So I killed it (sorry I was kind of barbaric with this one) with a
'kill -9' .

The process was as you can imagine , snipped .

I try later to do a restore but the following message keep coming
:"SQL1042C An unexpected system error occurred. SQLSTATE=58004" .

I thought first that the backup was corrupted (It happens often with
the logfile in Oracle) so I deleted it and unzip it again .

But the problem keep coming .

Question : Any idea what's going on ?

Thx in Advance .

Andy the beginner in DB2 .

ps1: there is no database on this platform . (I didn't create a single
database)
ps2: My backup is like that
DBNAME.0.db2inst1.NODE0000.CATN0000.20050531020000 .001


Nov 12 '05 #8

P: n/a
Hi Everyone ,

Little update :

Has been 2 long days and this db2 restoration is killing me.

The restore doesn't work at all . it is still stuck after the beginning
.. I've been doing a lot of things including a redirect , a online with
a specific tablespace ...

At the end , the outcome is the same . My restoration is stuck .

Question : It just pop up out of my mind but could it be possible that
because I didn't create the right tablespace (mean the one that
contains the object tables , index and so on) that the restore won't
work .

In essence , what the restore is doing ? mean does it recreate all the
tablespace ? if not where are stored the object (which tablespace) ?

Thanks In Advance ,
Andy the beginner in DB2

Nov 12 '05 #9

P: n/a
Andy K wrote:
In essence , what the restore is doing ? mean does it recreate all the
tablespace ? if not where are stored the object (which tablespace) ?


If DB2 is missing an object for restoration, it *should* return an error
stating it cannot continue. I use SMS containers, and when it cannot
find the specific dir, it tells me so, so I can create it.

Can it be that the backup is corrupt?
Did you transfer it through a samba share or something?
With some settings a samba server will convert between cr and crlf.
(though it is a binary file).

-R-
Nov 12 '05 #10

P: n/a
Hi Jurgen ,

No it was trough a ftp connection to a NAS . I use the FTP command line
to transfer the backup ...

My worst fear is that the backup is corrupted mean before the transfer
which mean I have no backup since ... I don't when (I wasn't in charge
of the DB before) .

Hope not !

Regards,
Andy the beginner in DB2

Nov 12 '05 #11

P: n/a
You can akways check the following:
Mount your image ina a path that is like:
D:\sometarget\dbname.0\instname\node0000\catn0000\ YYMMDD\
Go to that path
execute: db2ckbkp -h
Choose the options that will allow you to check the intergrity of the image.
The answer will tell you at least if the integrity of the image is OK.
If not, there is nothing to be done and the db will most likely have to be
recreated.
If ok, you still need the logs to take you to end of backup timestamp.
As you say you do not have them, call IBM they may be able to help you get
the db back but they will guarantee that the integrity is not going to be OK
as you have no logs to ensure that.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Andy K" <ak****@yahoo.com> a écrit dans le message de news:
11**********************@z14g2000cwz.googlegroups. com...
Hi Jurgen ,

No it was trough a ftp connection to a NAS . I use the FTP command line
to transfer the backup ...

My worst fear is that the backup is corrupted mean before the transfer
which mean I have no backup since ... I don't when (I wasn't in charge
of the DB before) .

Hope not !

Regards,
Andy the beginner in DB2


Nov 12 '05 #12

P: n/a
Hi Pierre ,

My backup looks like clean at least not corrupted . I talked to some of
my colleagues and they were saying that maybe it was the machine which
was undersized .

The total size of the backup is near 2 Go .

My machine has 512 Mo of ram with one processor P3 at 1400 Mhz (old
machine compaq dl-360 G2).

Anyway it could be possible because after the start of the restore ,
there is no error message . the db2diag.log doesn't contain any trace
of restore .

Here is a sample of db2diag.log

2005-06-09-09.13.03.532921 Instance:db2inst1 Node:000
PID:2501(db2agent (DBNAME)) Appid:*LOCAL.db2inst1.050609071303
database_utilities sqludcrtq Probe:10 Database:DBNAME

DiagData
04f8 ffff 0100 0000 .øÿÿ....

2005-06-09-09.13.03.626430 Instance:db2inst1 Node:000
PID:2501(db2agent (DBNAME)) Appid:*LOCAL.db2inst1.050609071303
database_utilities sqludcrtq Probe:10 Database:DBNAME

04f8 ffff 0100 0000 .øÿÿ....

As you can see , there is no trace of problem ... (As far as I can see)
..

So what do you think ?

Regards,
Andy the beginner in DB2 .

Nov 12 '05 #13

P: n/a
Hi ,

I found out what my problem was ...

Undersize systems parameters stuck the restore process .

I desinstall the whole db2 kernel , put those parameters on my
/etc/sysctl.conf

kernel.core_uses_pid = 1
kernel.shmmax=2147483648
kernel.sem=250 32000 100 128
fs.file-max=65536
kernel.shmmax=2147483648
kernel.msgmni=1024

reboot and resinstall the db2 kernel .

And the restore was functionning .

Regards,
Andy the beginner in DB2


Andy K a écrit :
Hi ,

I'm wondering what's going on with a restore I'm trying to do .

My DB2 version is a 7.2 on a Linux RH ES 2.1 .

I've copy a recent backup that was on NAS for a test on my machine .

I then restore the backup without creating a database with the simple
command line "db2 restore backup DBNAME".

For information , I put myself on the folder (directory) that contains
the backup .

The restore went quite well at first but 30 mn later it was kind of ...
stuck .

I did a 'ps aux | grep DBNAME' and I've noticed the process was stuck
(S for SLEEP).

So I killed it (sorry I was kind of barbaric with this one) with a
'kill -9' .

The process was as you can imagine , snipped .

I try later to do a restore but the following message keep coming
:"SQL1042C An unexpected system error occurred. SQLSTATE=58004" .

I thought first that the backup was corrupted (It happens often with
the logfile in Oracle) so I deleted it and unzip it again .

But the problem keep coming .

Question : Any idea what's going on ?

Thx in Advance .

Andy the beginner in DB2 .

ps1: there is no database on this platform . (I didn't create a single
database)
ps2: My backup is like that
DBNAME.0.db2inst1.NODE0000.CATN0000.20050531020000 .001


Nov 12 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.