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

Recovering Database from files [DB2 Express-C]

P: n/a
Hello

My server has crushed, and all i could recover was database dirs/files.
Can i somehow recover the database from these?
It's like:
db2inst1/NODE0000/...

If yes, can somebody get me thru this step by step?

I have CentOS installed on the server. DB2 Server is up and running.

TIA.

--
Best regards.. or not..
Piotr Baranowski
Owiec Hardcore'u z Generacji-D
Zenobius Hermenegildorf Xavierus 'Korpuskularny'
Nov 22 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Piotr 'Zenobius' Baranowski wrote:
Hello

My server has crushed, and all i could recover was database dirs/files.
Can i somehow recover the database from these?
It's like:
db2inst1/NODE0000/...

If yes, can somebody get me thru this step by step?

I have CentOS installed on the server. DB2 Server is up and running.
What happens when you try to connect to the database?
DB2 should go through crash recovery on its own.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Nov 23 '07 #2

P: n/a
>Hello
>>
My server has crushed, and all i could recover was database dirs/files.
Can i somehow recover the database from these?
It's like:
db2inst1/NODE0000/...

If yes, can somebody get me thru this step by step?

I have CentOS installed on the server. DB2 Server is up and running.
What happens when you try to connect to the database?
DB2 should go through crash recovery on its own.
So i just copy the data to new db2inst1 folder?
The server has crashed completely, and there is new system installation.

--
Pozdrawiam bądź nie.. [ GG# 997057 ]
Piotr Baranowski
Owiec Hardcore'u z Generacji-D
Zenobius Hermenegildorf Xavierus 'Korpuskularny'
Nov 23 '07 #3

P: n/a
Piotr 'Zenobius' Baranowski wrote:
So i just copy the data to new db2inst1 folder?
The server has crashed completely, and there is new system installation.
Absolutely not!
What do you mean with crashed completely? Did you have a hard drive
crash? What you should do is: Bring the server back on line. Let DB2
recover. Do a backup. Then restore the backup image on the new server.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Nov 24 '07 #4

P: n/a
>So i just copy the data to new db2inst1 folder?
>The server has crashed completely, and there is new system installation.
Absolutely not!
What do you mean with crashed completely? Did you have a hard drive
crash? What you should do is: Bring the server back on line. Let DB2
recover. Do a backup. Then restore the backup image on the new server.
Yep. Only thing that i was able to get back is database files.
It's my home devel serwer, so i didn't have a full backup.
But it's still important to me to get back this data.
I have only files from instance dir.
Server has new disk and new OS installed.

So this is a little bit more complicated ;-)
And i don't know what to do/how to do it ;-)

--
Best regards.. or not..
Piotr Baranowski
Owiec Hardcore'u z Generacji-D
Zenobius Hermenegildorf Xavierus 'Korpuskularny'
Nov 24 '07 #5

P: n/a
Piotr 'Zenobius' Baranowski wrote:
>>So i just copy the data to new db2inst1 folder?
The server has crashed completely, and there is new system installation.
Absolutely not!
What do you mean with crashed completely? Did you have a hard drive
crash? What you should do is: Bring the server back on line. Let DB2
recover. Do a backup. Then restore the backup image on the new server.

Yep. Only thing that i was able to get back is database files.
It's my home devel serwer, so i didn't have a full backup.
But it's still important to me to get back this data.
I have only files from instance dir.
Server has new disk and new OS installed.

So this is a little bit more complicated ;-)
And i don't know what to do/how to do it ;-)
Hmmm.. I propose you post this in the DB2 Express C forum.
I know it's not as easy as simply copying the database files.
Let's see what the moderators have to say...
(I assume you don't have a support contract)

Cheers
Serge


--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Nov 24 '07 #6

P: n/a
On Nov 24, 12:48 pm, Piotr 'Zenobius' Baranowski
<zenob...@noskasujto.zeno.plwrote:
So i just copy the data to new db2inst1 folder?
The server has crashed completely, and there is new system installation.
Absolutely not!
What do you mean with crashed completely? Did you have a hard drive
crash? What you should do is: Bring the server back on line. Let DB2
recover. Do a backup. Then restore the backup image on the new server.

Yep. Only thing that i was able to get back is database files.
It's my home devel serwer, so i didn't have a full backup.
But it's still important to me to get back this data.
I have only files from instance dir.
Server has new disk and new OS installed.

So this is a little bit more complicated ;-)
And i don't know what to do/how to do it ;-)

--
Best regards.. or not..
Piotr Baranowski
Owiec Hardcore'u z Generacji-D
Zenobius Hermenegildorf Xavierus 'Korpuskularny'
Very odd. I posted a response a couple of days ago but I can't seem
to find it, nor does it look like you've seen it.

When you say you have the files from the instance directory, do you
have *all* of the files associated with the database? This includes
the log files, all tablespace containers, etc?

If you do have all of these files then you could try the following:

- Create an instance with the same name on the new server (it looks
like your instance is "db2inst1").
- Place all of the database files on the new server in exactly the
same location as they were on the original server.
- Catalog the database
- Try connecting to the database

To catalog the database, execute the following command:

db2 catalog database <dbnameon <dbpath>

where <dbpathis the location of the "db2inst1/NODE0000" directory
that you mentioned. For instance, if this was /home/db2inst1/db2inst1/
NODE0000 then your database path is /home/db2inst1. If the path was /
somedir/db2inst1/NODE0000 then your database path is /somedir.

Hope this helps.
Kelly
Nov 25 '07 #7

P: n/a
ks******@ca.ibm.com wrote:
Very odd. I posted a response a couple of days ago but I can't seem
to find it, nor does it look like you've seen it.
This one made it. :-)

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Nov 26 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.