Subject Re: [Firebird-Java] Database Schema refresh only after Connection restart
Author Roman Rokytskyy
> I've encountered an unexpected behavior in Jaybird -- that it won't
> refresh the database schema until the database connection is restarted.
> I was trying to debug a trigger and made numerous changes to the
> trigger and other stored procedures using IB_SQL and nothing seemed to
> work. Specifically, I added columns in an update statement -- the
> existing columns updated data just fine but nothing from the added
> columns. After restarting the database connection, it all worked as
> coded. So, is there a setting to force a refresh/synchronization of the
> database schema in the Jaybird client?

The issue is that when you change the metadata, the changes will be
visible only in the next transaction in case of SuperServer, or until
you restart the connection in case of ClassicServer. Latter is caused by
the metadata cache that is initialized on the start of the server process.

> Also, possibly a related issue, I haven't been sending commits after my
> stored procedure calls -- so far it's storing the data but I wonder if
> it might be a lurking problem. If I'm not ending transactions then the
> database schema would have to be preserved until the current
> transaction/s get committed -- I presume, anyway. Should I be
> attempting explicit commits or does Jaybird handle transaction commits
> automatically?

See William's post.

Roman