Re: Why do I need to restart the SQL service?

From: Andrea Montanari (andrea.sqlDMO_at_virgilio.it)
Date: 01/25/05


Date: Tue, 25 Jan 2005 15:28:59 +0100

hi STom
STom wrote:
> 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

..
Error 5 typically means access denied to a resource
...
(SpnRegister) : Error 1355. is usually associated with AD connection
problems

regarding the 3rd error , you can check
http://support.microsoft.com/default.aspx?scid=kb;en-us;328306&Product=sql
to verify that no related connection problems are there...

service restart usually is required to accept changes such authentication
settings (SQL Server) and overall service settings (all services..)
a reboot is often indicated to perform all these tasks as long as properly
registering COM component such as SQL-DMO, distributed as long as MSDE...
regards

-- 
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm        http://italy.mvps.org
DbaMgr2k ver 0.10.0  -  DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply


Relevant Pages

  • Re: Webservices - the way to go...?
    ... about your lack of secure network connectivity your between a rock and a ... To summarize the posts so far: you have a winform app. ... using a webservices data layer to handle all the database interactions. ... Upgrade your database to SQL Server. ...
    (microsoft.public.dotnet.general)
  • Re: MSVC++ app type choice, form design questions
    ... > 1) MSVC Project definition requires that for an MFC app I choose ... MFC's built-in database support is really built around the document/ ... with the full version of SQL Server, but it's still pretty usable -- ...
    (microsoft.public.vc.mfc)
  • 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: sa password was inadvertently changed. With a kicker...
    ... Call the vendor of the new software product, and ask them what the> install script sets the SA password to when installing the product. ... Put the database files back where they should> be, ... >> I have a SQL Server 7 Standard edition server running in a ...
    (microsoft.public.sqlserver.security)
  • Re: How do i move an SQLDatabase to another location?
    ... database to a client location, install it and have it run using the ... It requires that the SQL Server service be ... client system for a single-user application or on a LAN/WAN share that's ... install it yourself during application setup. ...
    (microsoft.public.dotnet.framework.adonet)