Subject Re: create/drop database problem
Author sc_odo
Thanks helen,
I already expected something like this to be the problem. Didn't know
there is a firebird-php group.

Best regards

Ralf
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 10:23 AM 10/02/2006, you wrote:
> >Hello, I have a problem creating/dropping databases using isql.
> >OS Suse 9.1
> >FB SS 1.5.3
> >Situation: I have a PHP script that should create a database and
> >insert some tables, in case of failure it should drop the database.
> >Tables are created using SQL in a normal connection.
> >the command used to create and drop the database is
> >isql -i /path/db.sql
> >When the server first starts the database is created. Now say the
> >something goes wrong inserting the tables, dropping the database
> >already fails with following error message:
> >-901 or -902 -object <database> is in use.
> >
> >This problem even remains if I wait another 1 hour before I retry to
> >drop the database. I could only solve this restarting the firebird
> >server. I think there is no need to notice that there are no other
> >client applications connected to the database when trying to drop it.
> >
> >Can anybody help me to solve this?
>
> Well, a DDL script is nothing but a batch of SQL requests. It's not
> a program. So if you have a problem with a request, such as create
> table, you will need to take care of committing or rolling back the
> transaction. The engine isn't going to let you drop the database if
> there is a pending transaction waiting for attention.
>
> Ask on the firebird-php for help with your php script to monitor and
> respond to exceptions being returned duing execution of an isql
> command. Someone is sure to have done this already...
>
> ./heLen
>