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

Relocate DB2 databases

Hi,

I have two databases in DB2 v8.2 (Windows 2003 Server platform) and right
now both databases are on my c-drive.

Unfortunately space on this drive is becoming low and I want to relocate the
databases to my d-drive.

You can change properties of an instance (default database path), but this
applies to new databases.

Can somebody explain to me in detail how to get my databases and logging
files to the d-drive (same db2 folder) please? I am trying to find this info
all over the place, but I cannot find the exact info.

Already I tried to uncatalog one of the databases, copied folder c:\db2 and
its subfolders to the d-drive, but when I issue the command catalog database
X on d: I get an error that there was no informatie or something in the
config file and I cannot get the database back online.

Your help is very much appreciated.

Kind regards,

Frank

PS I know in MS SQL server you just have to detach the database, move the
files (data and log) to the new location and then attach the database, but
it seems DB2 is very different.
Mar 14 '06 #1
3 2771
Ian
Frank wrote:
Can somebody explain to me in detail how to get my databases and logging
files to the d-drive (same db2 folder) please? I am trying to find this info
all over the place, but I cannot find the exact info.


There are two ways to do it in DB2:

1) backup database and use a redirected restore to tell DB2 to restore
the data on the D: drive

http://publib.boulder.ibm.com/infoce...n/c0006249.htm
2) Use the db2relocatedb command after moving the files manually.

http://publib.boulder.ibm.com/infoce...e/r0004500.htm


Note, to move your logfiles, you need to set the NEWLOGPATH database
config parameter. The next time DB2 starts, it will use the new path
for your log files.

Mar 14 '06 #2
Frank wrote:
Hi,

I have two databases in DB2 v8.2 (Windows 2003 Server platform) and
right now both databases are on my c-drive.

Unfortunately space on this drive is becoming low and I want to
relocate the databases to my d-drive.

You can change properties of an instance (default database path), but
this applies to new databases.

Can somebody explain to me in detail how to get my databases and
logging files to the d-drive (same db2 folder) please? I am trying to
find this info all over the place, but I cannot find the exact info.

Already I tried to uncatalog one of the databases, copied folder
c:\db2 and its subfolders to the d-drive, but when I issue the
command catalog database X on d: I get an error that there was no
informatie or something in the config file and I cannot get the
database back online.


Generally speaking, I get the impression DB2 considers its database
files sacrosanct (it doesn't appreciate the files being tampered with
by anything other than its own tools :-)

I'm really not sure about this, but it's probably worth a shot:

1. Take a back up of the database (BACKUP DB dbname)
2. Drop the database (DROP DB dbname)
3. Create a new database (with the same name as the old one) on your D:
drive (CREATE DB dbname ... ON D ...)
4. Restore the backup into the new database (RESTORE DB dbname ... INTO
....)
HTH,

Dave.
--

Mar 14 '06 #3
In article <44***********************@news.euronet.nl>,
fr************@hotmail.com says...
Hi,

I have two databases in DB2 v8.2 (Windows 2003 Server platform) and right
now both databases are on my c-drive.

Unfortunately space on this drive is becoming low and I want to relocate the
databases to my d-drive.


You can backup the database, drop it and restore it on the new drive
with the command:
db2 "restore <dbname> to 'd:\'"

This is the easiest way if your db isn't very large, otherwise it's
better to use the db2relocatedb. Check the online documentation at
http://tinyurl.com/mmgvt

Mar 14 '06 #4

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

Similar topics

0
by: Cara | last post by:
LAST CALL FOR VOTES (of 2) unmoderated group comp.databases.etl Newsgroups line: comp.databases.etl Extraction, transformation, loading issues. Votes must be received by 23:59:59 UTC, 12 Dec...
0
by: Cara Altman | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.etl This is a formal Request For Discussion (RFD) for the creation of a world-wide unmoderated Usenet newsgroup...
0
by: nick | last post by:
In the following link, the screen has a lot of refresh (iframe keep relocate its position ) when the mouse hover around the popup menu. But IE doesn't have the problem. ...
3
by: mike.cutts | last post by:
Hi, I have a website which, when search results are returned to engines, displays a site description of "Relocate" instead of the correct TITLE tag. I'm not sure why it's doing this so any help...
3
by: Amit | last post by:
Hi when I try to run LIST ACTIVE DATABASES AT DBPARTITIONNUM <partnum> or LIST ACTIVE DATABASES GLOBAL, I always get an error message. Does anyone know why? I'm on v8 fp 5 output : db2 => list...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
6
by: Andy | last post by:
Someone posted this official proposal to create comp.databases.postgresql.general again. He wrote his own charter. As far as I know, he did not consult any of the postgresql groups first. There...
1
by: Frank | last post by:
Hi, thanks already for your info in a previous post Ian, Dave and Gert. What I understood from your answers (and believe me when I tell you I know nothing about DB2) the best and easied way to...
6
by: Alfred | last post by:
If you're a PHP fan like I am, I have a word of advice. Don't live where I have relocated near Myrtle Beach, South Carolina, USA. It's probably the most backward place on the planet, where IT...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...

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.