Subject | Re: [firebird-support] Installation |
---|---|
Author | Dan Wilson |
Post date | 2004-01-29T02:45:39Z |
>I am doing up an installation script for linux and windows to be used ininstsvc is not the root of your problem here. It has no way of knowing when the service is actually completely up and idle, it simply knows when the OS says it has "started" the service. The OS also has no way of knowing when the firebird server is completely ready for operation: indeed, I have read information on this list that leads me to believe that the server itself doesn't really "know" when it is ready for use.
>an InstallAnywhere installation. The problem I am facing is that I
>sometimes receive a error message after installing and starting the
>service, when attempting to create a database. The message is:
>Use CONNECT or CREATE DATABASE to specify a database
>Statement failed, SQLCODE = -904
>unavailable database
>I tried adding the -b option to the instsvc start command which worked
>if I had some file actions between starting the service and attempting
>the create database command (a big enough delay). I need a way to force
>instsvc start to not return until it has started the database service or
>a way of telling the create to wait until the service has started. I can
>not rely on the service taking x amount of time to start.
So, I believe you have two choices: either wait "long enough" for the service to be up and ready (10 seconds? 30 seconds?), or be prepared to catch the error, wait a few seconds, and try again until you succeed or you feel you have tried long enough, and something must be wrong. The latter method is certainly the more robust of the two solutions.
Perhaps someone else on here who knows more than I, and that is almost everyone here, will have another alternative for you.
Regards,
Dan.
P.S. When starting a new message to the list, please do not hijack someone else's thread. Start a fresh email, with your own subject line, and email the message to firebird-support@yahoogroups.com, don't just hit reply to a handy message. Kindly use reply only when actually replying to another message. Some people use thread-aware email programs, which can cause your message to be misfiled.