Why do I need to restart the SQL service?
From: STom (stombiztalker_at_hotmail.com)
Date: 01/25/05
- Next message: Sylvain Lafontaine: "Re: Connect to MSDE file on ISP Server"
- Previous message: Paul Proefrock: "Connect to MSDE file on ISP Server"
- Next in thread: Andrea Montanari: "Re: Why do I need to restart the SQL service?"
- Reply: Andrea Montanari: "Re: Why do I need to restart the SQL service?"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Sylvain Lafontaine: "Re: Connect to MSDE file on ISP Server"
- Previous message: Paul Proefrock: "Connect to MSDE file on ISP Server"
- Next in thread: Andrea Montanari: "Re: Why do I need to restart the SQL service?"
- Reply: Andrea Montanari: "Re: Why do I need to restart the SQL service?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|