Re: Making a copy of a database
Posted in 1996
Nils Myklebust wrote:
>
> <trubyn@aol.com> wrote:
>
> :A tbunload/tbload is OK, but the copy database will have been re-blocked
> :and defragmented, and therefore not an exact physical copy of the
> :original.
>
> ... how exact do you want it to be. It seems like you want the same
> data to be in the same place with fragmented extents and everything.
> Again by setting up another instance of your server with exactly the
> same physical disk layout you *might* be able to use dd to copy the
> data from one to the other. I wouldn't rely on it for anything but
> testing out something, and wouldn't want to run anything production
> oriented on the instance that has been using such copied data.
>
After creating all the tables, you can do a direct copy from
table/database to table/database. For example, dbaccess to the second
database (the second database can be on the same instance, on different
instance, or even on different server), , and then execute the following
command for each table (it is easy to put all the sql statements in a
file).
insert into table1
select * from database1@instance1:table1;
Assuming you have two instances and the first instance have
INFORMIXSERVER=instance1.
Is this what you want?
Chao