Re: Restoring a dataspace
Posted in 2009
Warning: Shameless, self-promoting plug below. ];-)
On 2009-12-17 3:16 AM, HFS wrote:
> Hi,
>
> I have two identical database installations in two identical machines.
> Is it possible restore one dbspace from one machine to another with
> ontape? I'd like to load a database to this dbspace in one machine and
> then move it over to another machine afterwards.
>
> Thank you for any help
> HFS
HFS,
Martin has already given you a basic response but it begs the question:
How do you easily find out what database objects reside in that specific
dbspace?
If your version is < 10.0, use partitions.sh -D <your dbspace>
If your version is >= 10.0, use fragments.sh -D <your dbspace>
This will show you all table fragments and indexes in the specified
DBSpace and give you a clue about the required space, excluding blob
information. (Note to self: Include and option for BLOB information in
there already!)
Both of these are in the IIUG software repository. One of these
decades, I may actually get around to updating the documentation of the
package and consolidating them into one .shar file.
One thing these utilities may reveal: There may be table fragments in
this dbspace that are only part of a larger [partitioned] table. In
that case, you will see why it is not safe to simple copy a dbspace,
even if it were doable the way you wanted to.
In any case, you can see (from the output of these scripts) which tables
you need to unload to replicate on your target system.
BTW, the comments at the beginning of these scripts do warn you of a
previous requirement: FOr both scripts to run, you need:
- beautify-unl.sh
For partitions.sh. you need:
- partition-list.sh
For fragments.sh, you need:
- fragment-list.sh
<EOSP> (End of shameless plug)