Copy a database
Posted in 2000
Topics: Migration, Import/Export & Data Conversion
Hi from the newbie,
I found lots of options and commands in the giant documentation coming with
IIF. I did not find anything to make a copy of a database.
I can do this through "dbexport" / "dbimport" but this is heavy and requires
to go to "single user" mode for the whole server this includes - THIS I
DON'T WANT.
Is there a way to make a deep copy (structures + data + procedures + ...) of
a running database to another one ?
TIA
Gilles Lenfant
Hi Gilles,
Run dbschema, create with this sql a new database.
Make unloads from all tables and load them in the new database.
Takes a while with a big tables with big indexes, so maybe remove the "create
index"-lines from the dbschem-sql and create the indexes later after loading the
tables.
Alex
Gilles Lenfant wrote:
> Hi from the newbie,
>
> I found lots of options and commands in the giant documentation coming with
> IIF. I did not find anything to make a copy of a database.
> I can do this through "dbexport" / "dbimport" but this is heavy and requires
> to go to "single user" mode for the whole server this includes - THIS I
> DON'T WANT.
> Is there a way to make a deep copy (structures + data + procedures + ...) of
> a running database to another one ?
>
> TIA
>
> Gilles Lenfant
I created a utility that will export the database in the none exclusive
mode. The trick here is to read the systables database to select all
tables from your database to create an unload command of each table and
set the isolation to dirty read before unloading this.
If you want this utility, please e-mail me.
In article <8tun52$7uc$1@reader1.imaginet.fr>,
"Gilles Lenfant" <glenfant@equod.com.nospam> wrote:
> Hi from the newbie,
>
> I found lots of options and commands in the giant documentation
coming with
> IIF. I did not find anything to make a copy of a database.
> I can do this through "dbexport" / "dbimport" but this is heavy and
requires
> to go to "single user" mode for the whole server this includes - THIS
I
> DON'T WANT.
> Is there a way to make a deep copy (structures + data + procedures
+ ...) of
> a running database to another one ?
>
> TIA
>
> Gilles Lenfant
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Gilles Lenfant wrote:
> Hi from the newbie,
>
> I found lots of options and commands in the giant documentation coming with
> IIF. I did not find anything to make a copy of a database.
> I can do this through "dbexport" / "dbimport" but this is heavy and requires
> to go to "single user" mode for the whole server this includes - THIS I
> DON'T WANT.
> Is there a way to make a deep copy (structures + data + procedures + ...) of
> a running database to another one ?
>
> TIA
>
> Gilles Lenfant
Hi,
I posted something last week about something similar. I have to copy a 300Gb
database from a server to another. Here are some way to do that quick :
1) do a dbschema from the old database ,unload data (with dbexport, HPloader
(perhaps the best), unload/load), and recreate everything into the other
database.
2) this solution needs you have exactly the same hardware/devices to recreate
the database : stop everything, backup you database, restore it to the new
server
3) the unsecure one : stop everything, and do some kind of "dd" between
devices. This one does not seems to be supported by informix.
4 the one I'll use today for our database : You also need to have exactly the
same hardware. warm backup your server, start HDR (data replication), restore
your database to the new server and start it as a "HDR slave". The new server
will be synchronized to the old one. Once done, stop everything and restart the
new server without HDR. This solution have been tested by Informix and is
supported. This will enable me to have only 2 or 3 hours (maybe less) of
downtime.
I'll come back to you as soon as it's done.
Cheers,
--
_______________________________________________
Sebastien THOMAS none networks
System Engineer freesbee
geo:153, rue Saint-Denis, 75002 Paris, France
vox:+33 1 45 08 23 10 - fax:+33 1 45 08 25 29
mailto:sebastien.thomas@none.net
How does you and others (Art's MYEXPORT for example) utility handle referential
constraints?
If isolation is dirty read than you utility will read "detail" rows without
"master" one.
Nebojsa
On Fri, 03 Nov 2000 20:09:35 GMT, Norman Erickson Lugtu <elugtu@my-deja.com>
wrote:
>I created a utility that will export the database in the none exclusive
>mode. The trick here is to read the systables database to select all
>tables from your database to create an unload command of each table and
>set the isolation to dirty read before unloading this.
>
>
>If you want this utility, please e-mail me.
>
>In article <8tun52$7uc$1@reader1.imaginet.fr>,
> "Gilles Lenfant" <glenfant@equod.com.nospam> wrote:
>> Hi from the newbie,
>>
>> I found lots of options and commands in the giant documentation
>coming with
>> IIF. I did not find anything to make a copy of a database.
>> I can do this through "dbexport" / "dbimport" but this is heavy and
>requires
>> to go to "single user" mode for the whole server this includes - THIS
>I
>> DON'T WANT.
>> Is there a way to make a deep copy (structures + data + procedures
>+ ...) of
>> a running database to another one ?
>>
>> TIA
>>
>> Gilles Lenfant
>>
>>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Nebojsa Sevo wrote:
>
> How does you and others (Art's MYEXPORT for example) utility handle referential
> constraints?
> If isolation is dirty read than you utility will read "detail" rows without
> "master" one.
True you MAY have to reorder the tables in the schema file to hash this one
out. I have it on my list to enhance myschema to make the requisite
analysis to output the tables in optimal order for a successful load.
Art S. Kagel
> Nebojsa
>
> On Fri, 03 Nov 2000 20:09:35 GMT, Norman Erickson Lugtu <elugtu@my-deja.com>
> wrote:
>
> >I created a utility that will export the database in the none exclusive
> >mode. The trick here is to read the systables database to select all
> >tables from your database to create an unload command of each table and
> >set the isolation to dirty read before unloading this.
> >
> >
> >If you want this utility, please e-mail me.
> >
> >In article <8tun52$7uc$1@reader1.imaginet.fr>,
> > "Gilles Lenfant" <glenfant@equod.com.nospam> wrote:
> >> Hi from the newbie,
> >>
> >> I found lots of options and commands in the giant documentation
> >coming with
> >> IIF. I did not find anything to make a copy of a database.
> >> I can do this through "dbexport" / "dbimport" but this is heavy and
> >requires
> >> to go to "single user" mode for the whole server this includes - THIS
> >I
> >> DON'T WANT.
> >> Is there a way to make a deep copy (structures + data + procedures
> >+ ...) of
> >> a running database to another one ?
> >>
> >> TIA
> >>
> >> Gilles Lenfant
> >>
> >>
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Before you buy.