Subject Re: [firebird-support] Stored procedures vs. indexes
Author Martijn Tonies
Hello Pen,

>>> You are correct - when I shutdown the server after index deletion, the
>>> error disappears. Now I wonder - can I somehow invalidate the metadata
>>> cache using SQL, or possibly using API itself? My servers are not always
>>> easily accessible for shutdown and restart.
>>>
>>
>> Detaching all current sessions (for that database) should do the trick,
>> this
>> will unload the database on the server and therefor clear the metadata
>> cache.
>>
> That seems not to be the case - my update script is run by one
> application, and the procedure is executed by another application. As
> far as I know, at the moment of the update there is just one connection
> to the server, the one that performs the update. Other connections start
> only after the update connection ends (with a delay of at least a few
> seconds).

Hmm, strange, as disconnecting all sessions should unload the database,
unless it's busy with some kind of "sweep" or something, I'm not sure what
it does then.

It would be nice if you could check somehow, if you're the only one.

>> It's always a bad idea to do metadata changes while applications are
>> still
>> running.
>>
> Indeed. That's why I don't do it.

Or at least -trying- not to do it ;-)

In that case, I don't see another way then shutting down the Firebird
service.
Given that Firebird 1.5 and up can use multi-instancing, you could use a
single
instance for your database.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com