473,898 Members | 4,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2810
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************ ***********@new s.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
1654
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 2003. This vote is being conducted by a neutral third party. Questions about the proposed group should be directed to the proponent.
0
2303
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 comp.databases.etl. This is not a Call for Votes (CFV); you cannot vote at this time. Procedural details are below.
0
2177
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. http://greywolfdesign.com/tmp/projects/sylvan%20way/ProjSylvan.htm The flashing doesn't occur after I remove the iframe in the html code. Any clue?
3
4620
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 would be appreciated. For info, you will be able to see the problem by searching for www.wiseowlsolutions.com on AltaVista.com Thanks,
3
7768
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 active databases at dbpartitionnum 1; SQL0104N An unexpected token "1" was found following "<identifier>". Expected tokens may include: "GLOBAL". SQLSTATE=42601 db2 => list active databases at GLOBAL;
1
3357
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. ... www.soft30.com/download-1-11975.htm - 31k - Cached - Similar pages MDBSecure 1.0.8.0 - Soft30.com Utility which makes it easy to create secure MS Access Databases, ... MS Access 2000/2003 format. 30 day money back guarantee, 30 day trial. ...
6
2909
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 may be an upcoming vote on this, so please stay informed and read news.newgroups.announce for updates. Also see message <2uu44nF2eodc0U1@uni-berlin.de> for an example of the proponent's temperament.
1
1685
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 move the databases is to backup both databases, stop the database server (db2stop force), move (or should I copy?) the entire folder c:\db2 to the d-drive and start the database server (db2start). Then goto the DB2 command line processor and...
6
1480
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 workers are not respected, are highly underpaid, and gigs are few and far between. I used to work in Raleigh, NC (the Research Triangle area) USA and IT and programmer jobs were plentiful. Then, all of a sudden, my wife had this desperate need to...
0
11265
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10859
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10487
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7191
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5882
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4708
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 we have to send another system
2
4297
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3308
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.