I'm using IBExpert to operate my databases. I have an old table with two fields:
- code (char 3) PK + INDEX
- name (varchar 30)
The new table should be
- code (integer) PK + INDEX
- name (varchar 30)
The data in the code column consist of only numbers even if it was a char type.
Is it possible to change the type of the code column? If yes how? I assume that I need to drop the primary key and delete or deactivate the index, but IBExpert won't let me do it and gives me this error when I try to drop the PK: object INDEX is in use
The error object INDEX is in use means exactly that: the object is in use, for example in the query plan of a prepared statement. To be able to modify it, you'll need to ensure nothing is holding an existence lock on that object, and the simplest way to do that is to shutdown the database using gfix, make your changes and set your database online again.