473,804 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restoring from one drive to another

I'm trying to restore backups from one DB2 server to another with the
backup / restore commands, and it works fine if DB2 is installed on
the same drive, D:, however on some machines it's installed on C: and
the database becomes locked when I try to rollforward. I think it's
because the tablespaces defined on the D: machine aren't present on
the C: machine, how do I get around this?
Nov 12 '05 #1
2 3199
Joseph McCarthy wrote:
I'm trying to restore backups from one DB2 server to another with the
backup / restore commands, and it works fine if DB2 is installed on
the same drive, D:, however on some machines it's installed on C: and
the database becomes locked when I try to rollforward. I think it's
because the tablespaces defined on the D: machine aren't present on
the C: machine, how do I get around this?


Joseph,

You want to do a "redirected restore".

The basic process is -

RESTORE DATABASE dbname ... REDIRECT;

SET TABLESPACE CONTAINERS FOR tablespace-id USING new-definition;

RESTORE DATABASE dbname CONTINUE;

Note that it is the tablespace ID, not the tablespace name, which must be
specified for each redefinition. You get this from the LIST TABLESPACE
command. I use a Perl script to generate the skeleton commands needed : it
queries the source database for the information it needs to build the
commands. It runs on various flavours of UNIX and I don't see any reason
why it also wouldn't work on Windows. If you drop me an email I can share
it with you.

HTH

Phil Nelson
Nov 12 '05 #2
Joseph McCarthy wrote:
I'm trying to restore backups from one DB2 server to another with the
backup / restore commands, and it works fine if DB2 is installed on
the same drive, D:, however on some machines it's installed on C: and
the database becomes locked when I try to rollforward. I think it's
because the tablespaces defined on the D: machine aren't present on
the C: machine, how do I get around this?


Joseph,

You want to do a "redirected restore".

The basic process is -

RESTORE DATABASE dbname ... REDIRECT;

SET TABLESPACE CONTAINERS FOR tablespace-id USING new-definition;

RESTORE DATABASE dbname CONTINUE;

Note that it is the tablespace ID, not the tablespace name, which must be
specified for each redefinition. You get this from the LIST TABLESPACE
command. I use a Perl script to generate the skeleton commands needed : it
queries the source database for the information it needs to build the
commands. It runs on various flavours of UNIX and I don't see any reason
why it also wouldn't work on Windows. If you drop me an email I can share
it with you.

HTH

Phil Nelson
Nov 12 '05 #3

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

Similar topics

4
5458
by: Jacob H | last post by:
Hello list... I'm developing an adventure game in Python (which of course is lots of fun). One of the features is the ability to save games and restore the saves later. I'm using the pickle module to implement this. Capturing current program state and neatly replacing it later is proving to be trickier than I first imagined, so I'm here to ask for a little direction from wiser minds than mine! When my program initializes, each game...
2
2372
by: Yair Sageev | last post by:
Greetings. I was running PHP Nuke on a Win2k box using Apache2Triad. Fortunately I backed up the drive using windows backup prior to the hard drive failure. Now I have installed Apache2Triad on another machine and wish to reimport the mySQL database that PHP Nuke relies upon. If anyone can tell me how to do this I would be very grateful. Thanks in advance.
1
1657
by: spec_server | last post by:
Can you restore the master database, running on windows server 2000, sql server 2000 from a backup that was taken from c:\ to another server restoring to d:\? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
0
349
by: Joseph McCarthy | last post by:
I'm trying to restore backups from one DB2 server to another with the backup / restore commands, and it works fine if DB2 is installed on the same drive, D:, however on some machines it's installed on C: and the database becomes locked when I try to rollforward. I think it's because the tablespaces defined on the D: machine aren't present on the C: machine, how do I get around this?
9
8420
by: db2inst2 | last post by:
Hi all, I am in a situation to restore a DB just from the Files (No Backup Image) I have got all the files of NODE0000 directory. Platform WIN 2000 pro And db2 8.1 fp 2 Is it possible to restore the DB. How do i do it?
2
3131
by: p175 | last post by:
Hi folks, I've tried reading just about every post I can on raid stiping / extent size etc and I'm just getting myself more confused than ever. Here's my situation. On a Windows Server 2000 standard edition system with only 1gb ram using UDB 8.2.3 Enterprise, I have an existing database that uses two raid arrays striped with 8kb. Presently the tablespaces have a default extent of 24, default prefetch of 48 .
3
2751
by: rdemyan via AccessMonster.com | last post by:
I'm thinking about providing a relatively easy method for users to restore the front end from a backup. The purpose is to allow for restoring if the front end becomes corrupt. Here are some particulars about my app 1) The front end is distributed as a .mde file. 2) Front end uses workgroup security 3) A separate logon form is used to actually launch the front end. 4) My app includes a backup front end form, that backups the front end...
5
6568
by: Troels Arvin | last post by:
Hello, Every so often, I'm asked to help people recover data from tables that were either dropped or where to much data was DELETEed. The complications related to restoring data are a problem. The SAS users are laughing because they can (to a certain extend) easily go back to an earlier SAS table by simply starting dsm. Of course, a flat file table is different than a relational table; but still, the trouble related to restoring DB2...
1
1852
by: Greg Nash | last post by:
DB2 9.1.3 on Windows. If I take a backup from a system where all DB2 data is on drive D: and try to restore or "create from backup", onto drive E: of another system, I find: - System managed tablespaces can be redirected ok - Database managed tablespaces cannot be redirected, but insist on using drive D:. If drive D: doesn't exist, or is a CD, the restore fails. Is this to be expected?
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10569
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
10325
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
9140
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5519
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
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
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
3
2990
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.