Subject | RE: [firebird-support] Checking whether a database restore is running as a client |
---|---|
Author | Kevin Day Programming |
Post date | 2005-05-27T01:54:23Z |
Hi Robert,
script or such like you can attempt to "shutdown" the database or "bring it
offline" which brings it into "single" user mode, allowing only SYSDBA
(someone can correct me if I'm wrong) to connect. You do this at run time
using the services api. I do this quite easily with fibplus. I think IBX
has service components also. When you do this you can specify that this
fails when other users are connected to the database. If it fails, you know
that others are connected. if not, do the operation you need to do and then
bring the database back online, again with services api. If you don't need
to do this from within an application, you can do the shutdown (bring db
offline) and bring it back up using one of the third party utilities such as
IBExpert. Once a database is shutdown, any other user who tries to connect
will get an error and will be unable to do so until you bring the database
back online.
Regards,
Kevin.
>The other thing is how can you check if anyone is connected to theIf the reason for this is so that you can perform a process like a ddl
>server?
script or such like you can attempt to "shutdown" the database or "bring it
offline" which brings it into "single" user mode, allowing only SYSDBA
(someone can correct me if I'm wrong) to connect. You do this at run time
using the services api. I do this quite easily with fibplus. I think IBX
has service components also. When you do this you can specify that this
fails when other users are connected to the database. If it fails, you know
that others are connected. if not, do the operation you need to do and then
bring the database back online, again with services api. If you don't need
to do this from within an application, you can do the shutdown (bring db
offline) and bring it back up using one of the third party utilities such as
IBExpert. Once a database is shutdown, any other user who tries to connect
will get an error and will be unable to do so until you bring the database
back online.
Regards,
Kevin.