Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!hp4nl!rivm!llojd From: llojd@rivm.UUCP (Jan Diesel) Newsgroups: comp.databases Subject: Re: Duplicating Informix SQL Database Keywords: Informix SQL SCO Xenix Message-ID: <1469@rivm05.UUCP> Date: 25 Sep 89 12:24:08 GMT References:Reply-To: llojd@rivm05.UUCP (Jan Diesel) Organization: RIVM, Bilthoven, The Netherlands Lines: 34 In article emuleomo@yes.rutgers.edu (Emuleomo) writes: > >Can anybody please tell me how I can *completely* duplicate an entire >Informix Sql database.??? > >I tried copying the contents of the ".dbs" directory to another directory >and the changing DBPATH so that I pick up the copy. That seemed to work >fine, until I DROPPED the copy, and LO and BEHOLD, it dropped some tables >in the original database!. However, the entire 'copy' database was dropped >as expected! > >Any help will be GREATLY appreciated! > >Thanx > >--Emuleomo O.O. (emuleomo@yes.rutgers.edu) >-- >** Writing error-free code MUST be magic! Why else is it sooo difficult to do? I suppose a 'drop database' recursively deletes the database directory, however there may be some tables residing on some other places. For those tables Informix sets the 'dirpath' column in the 'systables' table. There are some commands on tables that also set this dirpath column (I don't know exactly which ones but you should consider 'alter table', 'rename table' etc.) When copying a database-directory to some other location (-: not so neat actually :-) you do have to change the 'dirpath' columns. I guess the removed tables had their 'dirpath' set which means that, even in your copied database you used the original tables and *NOT* the copies in the new .dbs directory. Well, back to the backups :-) Jan.