Subject | Re: [firebird-support] Problem altering a column |
---|---|
Author | Thomas Steinmaurer |
Post date | 2011-08-09T10:56:58Z |
> Hi, we have a problem updating metadata (running sql update in java code via JDBC but it appears to be an engine issue). We need to run a metadata update for 100's of sites and the following problem appears to occur for all databases we have used in testing.I guess IBExpert has some kind of dependency showing for a particular
> We have a table 'Person' in which there is a 'LastName' varchar(30) column that we need to lengthen to varchar(100).
> However when we run:
> ALTER TABLE PERSON ALTER COLUMN LASTNAME TYPE varchar(100)
> we get the error:
> Error: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544351. unsuccessful metadata update
> Column LASTNAME from table PERSON is referenced in RDB$1230
>
> We have searched the database high& low for RDB$1230, mainly via IBExpert (because I know no better way) and cannot see it anywhere. RDB$1230 seems to be in some hidden shadow page(?) in the database or something?? One thing that made me wonder was that earlier we were getting a constraint violation because the LastName column is being used in a view, so before changing the column we drop all views. So I revisited that and after dropping the views we call commit, and even disconnect and reconnect to the database, so the view should in no way(?) be affecting the ability to change the LastName column?
>
> One thing that does fix the ability to update the database is if we do a backup and restore first, then all the update code works fine. (So seems RDB$1230 is 'flushed' out of the system.) But in reality this is not a practical option because of the sheer number of clients we have and the fact that most of them won't even know what a database engine is (and cannot be expected to do a backup/restore).
> I can't see that we have a database corruption issue because the problem occurs for each database we try.
>
> Our clients are mostly on 1.5.x and we are working on migrating them all to 2.5.x... but in the short term we need to apply the above change. Any ideas how to figure out what this rogue RDB$1230 element is and how to resolve or work around it programmatically? BTW, it isn't always RDB$1230 - the number varies - but the error is always on the LastName column as above.
table? This way you might be able to find out what object depends on the
table/column.
Of course, you could also query RDB$DEPENDENCIES.
HTH.
--
With regards,
Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/
Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!