dbexport
Posted in 2003
Topics: Storage & Space Management, Migration, Import/Export & Data Conversion
Hello all,
Recently I wanted to move a database from one dbspace to another.
I used dbexport to the file system, with -ss to preserve extents. Then with
dbimport I used -d and specified the new dbspace.
I now know that this doesn't work without an edit first. As the created
schema contains instructions to create indexes in the original dbspace.
In other words, namedb was in dbs1. When I use dbimport -d dbs2 the
database is created in dbs2, but the indexes are created in dbs1 - because
that's what the schema says.
This is not a problem to me, now that I know I simply edit the schema prior
to running the import. I just wondered if this was well known, and whether
there's an alternative solution.
I also realize that there's nothing actually "wrong" with having the indexes
in a different dbspace. With our set up though I wanted the Production
database as the sole resident of a dbspace.
Regards,
Malcolm Garbett
Unless I'm missing the point, why not do a dbexport
without -ss. Then just
dbimport -d newdbspace
--
Bye now,
Obnoxio
"C'est pas parce qu'on n'a rien à dire qu'il faut fermer sa gueule"
- Coluche
>From: "Malcolm Gar...." <malcolm.g@newall.co.uk>
>To: ids@iiug.org
>Subject: dbexport [685] Date: Thu, 13 Mar 2003 05:36:34 -0500 (EST)
>
>Hello all,
>
>Recently I wanted to move a database from one dbspace to another.
>
>I used dbexport to the file system, with -ss to preserve extents. Then
>with
>dbimport I used -d and specified the new dbspace.
>
>I now know that this doesn't work without an edit first. As the created
>schema contains instructions to create indexes in the original dbspace.
>
>In other words, namedb was in dbs1. When I use dbimport -d dbs2 the
>database is created in dbs2, but the indexes are created in dbs1 - because
>that's what the schema says.
>
>This is not a problem to me, now that I know I simply edit the schema prior
>to running the import. I just wondered if this was well known, and whether
>there's an alternative solution.
>
>I also realize that there's nothing actually "wrong" with having the
>indexes
>in a different dbspace. With our set up though I wanted the Production
>database as the sole resident of a dbspace.
>
>Regards,
>Malcolm Garbett
_________________________________________________________________
Worried what your kids see online? Protect them better with MSN 8
http://join.msn.com/?page=features/parental&pgmarket=en-gb&XAPID=186&DI=1059
Hi
Malcolm,
If you wanted to have the extent sizes and change the dbspace the indexes
are going into, there is no other way than changing the database.sql
(schema) file in the dbexport (*.exp) directory after you do an export with
-ss option.
You could do a shell script and use 'sed' to do a global substitution on the
sql file. This will change everything that goes into 'dbs1' into 'dbs2'.
for eg: sed 's/) in dbs1/) in dbs2/' x.sql >y.sql
Take a backup copy of the SQL before you do this and compare/diff the SQL
files before importing. :-)
Good luck,
Prashant
-----Original Message-----
From: Malcolm Gar.... [mailto:malcolm.g@newall.co.uk]
Sent: Thursday, 13 March 2003 9:37 PM
To: ids@iiug.org
Subject: dbexport [685]
Hello all,
Recently I wanted to move a database from one dbspace to another.
I used dbexport to the file system, with -ss to preserve extents. Then with
dbimport I used -d and specified the new dbspace.
I now know that this doesn't work without an edit first. As the created
schema contains instructions to create indexes in the original dbspace.
In other words, namedb was in dbs1. When I use dbimport -d dbs2 the
database is created in dbs2, but the indexes are created in dbs1 - because
that's what the schema says.
This is not a problem to me, now that I know I simply edit the schema prior
to running the import. I just wondered if this was well known, and whether
there's an alternative solution.
I also realize that there's nothing actually "wrong" with having the indexes
in a different dbspace. With our set up though I wanted the Production
database as the sole resident of a dbspace.
Regards,
Malcolm Garbett
**********************************************************************
CAUTION: This message may contain confidential information intended only for
the use of the addressee named above. If you are not the intended recipient of
this message, any use or disclosure of this message is prohibited. If you
received this message in error please notify Mail Administrators immediately.
You must obtain all necessary intellectual property clearances before doing
anything other than displaying this message on your monitor. There is no
intellectual property licence. Any views expressed in this message are those
of the individual sender and may not necessarily reflect the views of
Woolworths Ltd.
**********************************************************************