Why do I need to restart the SQL service?

From: STom (stombiztalker_at_hotmail.com)
Date: 01/25/05


Date: Mon, 24 Jan 2005 21:57:35 -0500

I use Wise Installation utility to install MSDE 2000A. To install MSDE, we
give it a command line that sets the sa password. This seems to work ok.

At the end of the install, we run a batch file that starts the SQL Service
and the SQL Server agent (not sure if we need to do anything with the agent
at all).

At one point, we tried attaching our database during the install, but it
just didn't seem to take effect, so I placed that code within my app.

Basically, what I do within the app is:
1. I keep track of the first time that the app is run. Assuming this is the
first time the app is run, I
2. Check to see if the database exists. If the check fails, this means that
the database has not been attached, so I then run the code to attache the
database.
3. I restart the SQL Service. This means that if the service is running I
stop it, wait a number of seconds and then restart and wait for a
configurable number of seconds. I can watch through Services and see that
the service restarts.
4. I check to see if the database version needs to be updated. This means I
need to connect to the database. This is where the failure seems to begin.
If I look in the application event log I see (in this order):

First Error
The description for Event ID ( 19011 ) in Source ( MSSQL$SQLXA ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may be
able to use the /AUXSOURCE= flag to retrieve this description; see Help and
Support for details. The following information is part of the event:
ConnectionListen(Shared-Memory (LPC)) : Error 5.

Second Error
The description for Event ID ( 19011 ) in Source ( MSSQL$SQLXA ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may be
able to use the /AUXSOURCE= flag to retrieve this description; see Help and
Support for details. The following information is part of the event:
(SpnRegister) : Error 1355.

Third Error
SQL Server does not exist or access denied.

Fourth Error
NeedDBUpdate: An error occurred when trying to retrieve the database
version: SQL Server does not exist or access denied.

Now, if I go and check the SQL Service, I can see that the service is not
started. If I start the service and then attempt to run my app again, the
app runs.

I have also tried rebooting after the install of MSDE, but I have the same
problem.

I have tried restarting services at various places within the app, but it
appears that I need to first let it fail and then restart to get it to work.
I know that doesn't make any sense.

Can someone make any sense of these areas? I'm not sure I'm approaching this
in a logical test pattern.

Thanks

STom



Relevant Pages

  • Re: installation routines for networks
    ... The server part in this instance is just the database engine and the ... The app needs to be able to run on standalone pc's too, ... >> engineers who have to install it. ...
    (microsoft.public.win2000.networking)
  • Re: Why do I need to restart the SQL service?
    ... > I use Wise Installation utility to install MSDE 2000A. ... what I do within the app is: ... Check to see if the database exists. ... > SQL Server does not exist or access denied. ...
    (microsoft.public.sqlserver.msde)
  • Considering Linux PHP App Deployment, Part 2, The Database Configuration
    ... a PHP app as a kind of poll. ... I discussed the Install Wizard ... which options you prefer for the Database Configuration. ...
    (comp.lang.php)
  • Re: Choosing a Windows Database
    ... It'll be the "Express" edition of SQL Server. ... will install it once and each app will then only basically have the db file ... to be copied/installed along with your app. ... >> some kind of relational database. ...
    (microsoft.public.vb.database)
  • Re: Access db accessibility (permissions??)
    ... e.g. install it on a workstation and it will not run ... Supposedly the database isn't secure so it ... > When I deployed the app + database my users can't open the database (W2K ... > local administrator rights to their systems. ...
    (microsoft.public.access.security)

Loading