473,395 Members | 1,689 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,395 software developers and data experts.

problem with a restore maybe ...

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
13 7247
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
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
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
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
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
> 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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Keith Work | last post by:
I'm stuck on a thorny problem here. Maybe someone can help (sorry for the long explanation): Oulook 2k. I have 2 tables (tblConversion and tblTemplate) in a database that I'm using to convert...
3
by: Anavim | last post by:
Hi, I have a really wired behaviour in my asp.net application. Little background, I have a base pages which contains about 17 images laying around (create a circle) and this page contains a...
6
by: Ray Cassick \(Home\) | last post by:
I have a set of properties in my assembly that look like this: ''' <overloads> ''' Allows the caller to have get or set access to an item in the collection. ''' </overloads> ''' <summary> '''...
1
by: tom.eeraerts | last post by:
Hello, I have a problem migrating an application from v5r2 to v5r3. The problem is with the prepared statements. To see what the problem is, i extracted a small piece of code and debugged the...
2
by: jenp | last post by:
Hiya :) I've checked to make sure that ASP is enabled on my Windows 2003, IIS 6.0 server, and it is. In fact, the main page of my site comes up just fine. Any OTHER .asp pages on the site,...
0
by: André | last post by:
Hi, I try to insert a graphic (bitmap) to the first file. No problem any more with that. But the graphic generated in the second file (graf2.aspx) must receive values from the the first file. I...
2
by: dc | last post by:
I have a baffling connection problem from my C# console app to a sql server express database. The console application opens the sql database using the following code:- vDataSource = "server =...
0
by: aashiss03 | last post by:
hi everyone I m restorimg a database , during which i m facing the peoblem Here is the details description the problem. RESTORE DATABASE NSWD FROM "C:\db2_backups" TAKEN AT...
22
by: DL | last post by:
Hi, What I wanted to do is to call a function from a newly created element. But it stumbled me. Here's the line that references the newly created element and I used the alert function for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.