Hi All,

Yesterday I came across an issue on stopping SQL Service during installation. On installation we need to stop SQL Service, execute some scripts and start it again. Windows Installer fails to do so and hence I tried with operating system resources to do the job and it worked fine. We implemented in these two ways: -
1. Service Control table to start and stop service.
2. Custom Action to execute C:\windows\System32\taskkill.exe with command line parameter as "/IM sqlservr.exe /F".

How these two implementations and executions are technically different? Does they run under different authentication?

Jeeoo!
Santro
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
As with a similar query, I have NO idea why you would need to stop the service just to run scripts. I don't think SQL Server would have much market share if that was the case.

Also, killing the process is probably the best way to corrupt any databases which might be open at the time.
Answered 01/09/2009 by: VBScab
Red Belt

Please log in to comment
0
Basically we can ignore it at the time of installation. But during un-installation, We need to delete few files being deployed to SQL Server directory. SQL Service is holding that file on un-installation and gives error message stating that the files are in use and can't be deleted.
So, to perform a clean un-installation we have to stop the service and than remove respective files and start the service again.

Jeeoo!
Santro
Answered 01/09/2009 by: zipsantro
Purple Belt

Please log in to comment
0
It sounds like you need to DROP the database before uninstalling the files which comprise that database. That's the only reason I can think of that SQL Server would be holding the files open.
Answered 01/09/2009 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity