473,480 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DB2 data locked away forever?

Hi there,

I have build a J2EE web application that uses DB2 UDB for Windows
(2000) to store it's data.

This application had been up-and-running for over 2 years but needed
to be relocated on another machine.

So, after making a back-up of the C:\DB2 directory (which we thought
would contain all our precious data!) the disk was thoroughly cleaned
and the server was given to someone else.

The problem we are facing now is that I cannot access that data
anymore ?!

I have DB2 UDB (7.2) on my laptop and just renamed the existing DB2
directory and replaced it with the saved one.

The control center recognizes that the database exists (because when I
try accessing a non-existing database name I get another error) but
when I want to access the data the error is: SQL1036C An I/O error
occurred while accessing the database. SQLSTATE=58030

Here are my questions:

-I think this could be a version problem, how can I retrieve the
version from the database if I cannot connect to it? I hope it stores
this info.

-Are there any tools that can help me recover the data, it is really
very, very important to get it back!

The version I use on my laptop is: DB2 Universal database, Enterprise
Edition Version 7.2 fixpack 12.

The version of DB2 as it existed previously on the server is not
exactly known but not very much older or newer than this one. (7.x
probably)

Please help!
Leslie
Amsterdam, Holland
Nov 12 '05 #1
4 3149
Leslie Noth wrote:
So, after making a back-up of the C:\DB2 directory (which we thought
would contain all our precious data!) the disk was thoroughly cleaned
and the server was given to someone else.

The problem we are facing now is that I cannot access that data
anymore ?!

I have DB2 UDB (7.2) on my laptop and just renamed the existing DB2
directory and replaced it with the saved one.


Bad idea. Is there any reason you did not use DB2 Backup and Restore method -
this is only supported one?

What happens if you:

1. Drop all existing databaases on your laptop. so this command will tell you
that system database directory is empty:

db2 list db directory
2. Restore from the backup of C:\DB2 subdirectories.

3. Issue:

db2 list database directory on C

If this command actually outputs database name of the database you are
interested in, then:

4. db2 catalog db <databasenamehere> on C

and try to connect to it. The only purpose of the connection should be to verify
that you can do this. You should then to proceed with exporting all data in IXF
format - to verify that you can access all rows correctly. If succeeded - drop
this database, ctreate a new empty one and reimport all data from .IXF files.

Needless to say - backup and restore on file system level of DB2 objects is not
supported.

Jan M. Nelken

Nov 12 '05 #2
Jan wrote:

What happens if you:

This is the output from the list db directory on C before any drop
commands.

Local Database Directory on C

Number of entries in the directory = 7

Database 1 entry:

Database alias = ABC_DEF
Database name = ABC_DEF
Database directory = SQL00006
Database release level = 9.00
Comment =
Directory entry type = Home
Catalog node number = 0
Node number = 0

Database 2 entry:

etc.

I can catalog the databases but I cannot drop them, same error:

SQL1039C An I/O error occurred while accessing the database
directory.
SQLSTATE=58031

Needless to say that connecting doesn't work either.

I don't understand what's happening, if one of the seven databases
would be corrupt I could understand it but none of them work.
I'm sure that most of the databases didn't even have a connection to
them at the time of the back-up.

Do you have any more suggestions...

Leslie
Nov 12 '05 #3
12***@vizzavi.nl (Leslie Noth) wrote in message back-up.

Do you have any more suggestions...

Leslie


Since no one replied I decided to give it one more try myself.

After reading about DB2 on Unix and file permissions, I checked the
DB2 directory.
It appeared that some DB2 files were read-only, which would explain
the I/O error.

So, after making them all readable I was able the access the database
again.

The data was not corrupted and the application is now running smoothly
on a new server.

Regards,
Leslie
Nov 12 '05 #4
Leslie Noth wrote:
After reading about DB2 on Unix and file permissions, I checked the DB2 directory.
It appeared that some DB2 files were read-only, which would explain the I/O error.

So, after making them all readable I was able the access the database again.

The data was not corrupted and the application is now running smoothly
on a new server.


I would rather issue (after stopping instance - as root - db2iupdt.

This will ensure proper permission for the instance files. On Unix some of the
files have to have s bit on.
Jan M. Nelken
Nov 12 '05 #5

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

Similar topics

2
1753
by: Francisco | last post by:
I have this problem: I have a database with information about games, and users are able to vote for them. Everytime a user votes for a game I store the unique game name into a session variable (an...
10
5753
by: Zap | last post by:
Widespread opinion is that public data members are evil, because if you have to change the way the data is stored in your class you have to break the code accessing it, etc. After reading this...
1
2116
by: M Wells | last post by:
Hi All, Further to my previous long-winded question about a situation in which we appear to be mysteriously losing data from our mssql2k server. We discovered an update statement, in the...
29
5765
by: pb648174 | last post by:
I have a very long transaction that runs on the same database that other users need to use for existing data. I don't care if they see data from the transaction before it is done and am only using...
2
2239
by: Glenn Venzke | last post by:
I'm trying to put together a web form that lists all current session information. The session info is stored in SQL server database (ASPState) and I'm trying to retreive and display using a...
34
10763
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing that resulted in data in temp tables, I would have...
19
2214
by: **Developer** | last post by:
When I get the image from the file the file remains locked so the Delete fails with a "used by another process" So I tried using a clone and disposing the obtained image. But that didn't fix...
2
4933
by: Monroeski | last post by:
I'm not a new user to Access, but I have been away from it for a while, so I'm making a lot of new user mistakes. I have a continuous form set up which displays performance measures for different...
18
10179
by: =?Utf-8?B?VGhlU2lsdmVySGFtbWVy?= | last post by:
Because C# has no native SSH class, I am using SharpSSH. Sometimes, for reasons I do not know, a Connect call will totally lock up the thread and never return. I am sure it has something to do...
0
6912
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
7052
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,...
0
6981
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...
0
5348
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,...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3000
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...
0
1304
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 ...
1
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
188
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...

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.