Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Hi, all
Is a script like this good enough to transfer, say 3GB of data (9
columns of ints and some chars) in a "reasonable" amount of time, or is
there a more efficient way to do this? (And if so, how much more
efficient?)
Thanks again!
Duff
>
> Here is a nice copy table script:
>
> #! /usr/bin/ksh
>
> if [[$# -eq 0]]; then
> echo "Usage: copytable <database> <oldtabname> <newtabname>
<Y/N>
> database=$1
> oldname=$2
> newname=$3
> data=$4
>
> dbschema -d $database -t oldname | sed \\ "s/$oldname/$newname/" | \\
> dbaccess database ->
> if [[$data == "y" || $data == "Y"]]; then
> dbaccess database - <<EOF!
> BEGIN WORK;
> insert into $newname
> select * from $oldname;> COMMIT WORK;
> EOF!
>
> ################### end of script #########################
>
> Keep in mind that because Informix delivers lots of neat tools like
dbschema> you can usually create anything you feel is missing.
>
> Art S. Kagel
>
Sent via Deja.com http://www.deja.com/
Before you buy.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.