Re: delete table
Posted in 1998
I think David is right - if you then run oncheck -pe I think you will still see
extents allocated to this table. Also, if you were to try and reorganise/move the
dbspace by dropping and reloading everything, you wouldn't be able to drop the
dbspace because it's not empty. This could be a job for tech support to clear the
entry.
regards
Pete Smith
david.ashby@workcover.nsw.gov.au wrote:
> All,
>
> I have played around with the system catalogs and encountered problems
> doing it. What I was trying to do was change the nextsize in systables
> with an update statement instead of using alter table. The update
> worked ok but later I started to get problems because the information
> stored at the ISAM level was different to the system catalogs.
>
> With the statements below I believe that you would remove the logical
> entry of the table from the system catalogs but the physical (at the
> ISAM level) entry will still be there. This could lead to problems. If
> you are going to try the suggestion below I would test it by following
> the suggestions on a test database and running onchecks to confirm the
> status of the database.
>
>
> Regards
>
>
> David Ashby
>
> ______________________________ Reply Separator _________________________________
>
> The case of table that cannot be drop:
> *** WARNING THIS PROCEDURE IS THE LAST RESORT ********
> 1) Logged in as informix or the owner of the database
> 2) Get the tabid of the table that is to be dropped.
> 3) delete these tabid in the system tables using query language.
> ex. the tabid of the table that cannot be drop is 258.
> run the sql in dbaccess.
> delete from systables where tabid = 258;
> delete from syscolumns where tabid = 258;
> delete from sysindexes where tabid = 258;
> delete from systabauth where tabid = 258;
> delete from syscolauth where tabid = 258;
> delete from sysviews where tabid = 258;
> delete from syssynonyms where tabid = 258;
> delete from syssyntable where tabid = 258;
> delete from sysconstraints where tabid = 258;
> delete from sysdefaults where tabid = 258;
> delete from syscoldepend where tabid = 258;
> delete from sysblobs where tabid = 258;
> delete from sysopclstr where tabid = 258;
> delete from systriggers where tabid = 258;
> delete from sysdistrib where tabid = 258;
> delete from sysfragments where tabid = 258;>
> YOU MUST BE LOGGED IN AS "informix" .
>
> **** INFORMIX- The best RDBMS