Now I use Delphi7, TIBBackupservice to backup my database before update it,
and TIBRestoreservice to restore that database if getting errors while
updating.
I always get error when restore the database if it is connected.
My problem is I can't define if the database is been connecting or not.
Have u ever met this case?
--
Thanh Truc.
Hi Truc,
The IBBackupService has a boolean property 'IsServiceRunning'.
It might be that your backup has not finished before you try to restore it.
--
Robin.
"He who treats the database as a flat-file repository of data is doomed
to burn in Hell. It's true, I asked." - Dratz
1. I backup database, and certainly it's okey.
2. After that, I start update that database (example: add some procedures or
triggers), get errors, so I want to restore my database.
3. Certainly I have to disconnect all connections to my database (some other
applications connect to it) before do restoring.
But how can I find all of those connections to disconnect?
It's exact my problem!
Thanks for all.
--
Thanh Truc.
"But how can I find all of those connections to disconnect?"
--> I only want to know if there 's any connection to my database before I
do restoring, not all of them.
Thanks.
--
Thanh Truc.
IBDatabaseInfo should give you the connected users. You can shutdown the server
with one of the admin components (don't remember which off the top of my head).
> --> I only want to know if there 's any connection to my database before I
> do restoring, not all of them.
>
> Thanks.
>
> --
>
> Thanh Truc.
>
>
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts, build
a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act
alone, solve equations, analyze a new problem, pitch manure, program a computer,
cook a tasty meal, fight efficiently, die gallantly. Specialization is for
insects. (RAH)
To disconnect all attachements use:
UPDATE TMP$ATTACHMENTS SET TMP$STATE = 'SHUTDOWN'
--
Bill Todd (TeamB)
--
Thanh Truc.
Thanks.
--
Thanh Truc.
You can use that statement in any tool that lets you execute SQL
statements against your InterBase database including IBConsole, isql,
any third party tool that lets you execute SQL or a program you have
written that uses the InterBase Express or dbExpress components.
--
Bill Todd (TeamB)
--
Thanh Truc.