How to drop database?
Posted in 1999
Topics: General Discussion
After stupid update systables I can't open database. When I'm try to open or drop this database is error -312 Cannot update system catalog (systables), ISAM is -100 duplicate value... This database is empty and not so important, but how can I drop it? Thanks for help. Regards Jarek B.
Jarek B. wrote:
>
> After stupid update systables I can't open database. When I'm try to open or
> drop this database is error -312 Cannot update system catalog (systables),
> ISAM is -100 duplicate value...
> This database is empty and not so important, but how can I drop it?
> Thanks for help.
> Regards
> Jarek B.
No way unless you undo your "stupid update". ( Very easy,
create a new empty database, create an additional table that
looks exactly like the systables-table ( call it 'hello'). Get the
"partnum" value for the new table and note it down. Find
the partnum of the "corrupted systables-table". Set the
partnum entry of the "hello" table in systables to the
value you found in the select before and undo your statement.
Afterwards, undo the update of systables in the new database
and drop the dummy database.
create database dummydb;
create table hello (
tabname char(18),
owner char(8),
partnum integer,
...
);
select partnum from systables where tabname = "hello";
database sysmaster;
select partnum from sysmaster:sysdatabases wheredbsname = "corrupted database";
-- update the systables entry of the new database
database dummydb;
update systables set partnum = FOUNDPARTNUMOFPREVIOUSSELECT
where tabname = "hello";
-- NOW UNDO YOUR STUPID UPDATE ON TABLE "hello"
update systables set partnum = CORRECTPARTNUMOFHELLO;close database;
drop database dummydb;
)
I think, a better alernative is to contact the Informix Technical
Support. They will do it for you.
Best regards,
Stefan Weideneder