Subject | Restoring a database |
---|---|
Author | Guilherme G G |
Post date | 2006-03-19T17:57:33Z |
I want to do this from my aplication
1: once the client clicks the restore button the program disconnects the
database (and hopefully all connected clients)
2: restore the database using REPLACE switch
3 Bing the database back online
The problem is that the command "gfix -shut -force 0 -user SYSDBA -password masterkey mydb.fdb" does shut down the database, but the database can't be rewritten if other clients are still connected, its odd for me, cause I expected that a database that is "shut down" to have no connected clients, so in this scenario I cant rewrite the database (it prompts an error saying "could not drop database X, database might be in use" but if I close all client applications, then I can make my restore, which is also odd since I am disconnecting clients from a disconnected database!
It seems to me that that a shutdown database still retains connections, I need a way to purge all connected clients from the database to release the lock on the file so the database can be rewritten
Can I achieve this programmatically?
Or i am a crazy man that just wrote half a page of BS?
[Non-text portions of this message have been removed]
1: once the client clicks the restore button the program disconnects the
database (and hopefully all connected clients)
2: restore the database using REPLACE switch
3 Bing the database back online
The problem is that the command "gfix -shut -force 0 -user SYSDBA -password masterkey mydb.fdb" does shut down the database, but the database can't be rewritten if other clients are still connected, its odd for me, cause I expected that a database that is "shut down" to have no connected clients, so in this scenario I cant rewrite the database (it prompts an error saying "could not drop database X, database might be in use" but if I close all client applications, then I can make my restore, which is also odd since I am disconnecting clients from a disconnected database!
It seems to me that that a shutdown database still retains connections, I need a way to purge all connected clients from the database to release the lock on the file so the database can be rewritten
Can I achieve this programmatically?
Or i am a crazy man that just wrote half a page of BS?
[Non-text portions of this message have been removed]