Re: Making a copy of a database
Posted in 1996
Reposting article removed by rogue canceller.
trubyn@aol.com wrote:
>
> Can anyone suggest a technique for copying an OnLine database to the
> same server?
>
> An archive attempts to restore to the dbspace - I don't know if this
> can be overridden.
>
> 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.
Is this correct? It certainly applies to dbexport/import. As far as I
can recall (without finding tfm to r) tbunload/load requires the same
disk configuration. I would have assumed, then that, it is going to do a
byte by byte copy into those disks.
> Thanks
>
> Neil Truby
> NJLG, London
As Nils says, you can dd one disk to another but that takes time. If the
database is active the results will be inconsistent. You would need to
have the server quiescent or block off user access for the duration.
Another possibility is that you could mirror the chunks, wait for the
mirror to get up to date and then take the mirror down and use the chunks
for your new space. For safety you might still wish to have no access
when you take the mirror down, particularly if more than one chunk is
involved but it will be shorter than the time needed to do a dd.
There are problems with either a dd or the method I outlined. The root
dbspace holds housekeeping information naming the chunks which the
instance holds. Your new instance (I'm assuming you don't want to
duplicate the database into the same instance) will need a record of its
own chunks. You would need to fake this house keeping information in
some way in order to persuade the instance that the copied disks were
what it had set up.
Ian