PDA

View Full Version : Install MSDE and DB(SQLScript)



bannanrw
08-06-2004, 01:42 PM
I have an InstallScript project that installs MSDE. I have modified OnSQLServerInitialize to not call SQLServerSelectLogin and to just proceed to the next dialog. MSDE installs correctly. The problem I have is that the MSDE service has not started.The next feature installs and it has SQLScript that attempts to create a database in the newly installed instance of MSDE. It fails because the Databse Server is not running.

Is there a way to start the service before running the script?

Any other strategies would be helpful.

LewisQ
08-06-2004, 02:53 PM
It is easy to start the service. You can find code for that at InstallSite.

However, one thing we found about MSDE, is that sometimes you need to actually reboot to get it started.

We haven't had time to investigate it any further why that happens so we just force a reboot.

The reboot is acceptable for us because, other than our users reghost their workstations there is no need to further deal with setting up MSDE. That may not be the case for you...

bannanrw
08-06-2004, 02:59 PM
How do you force a reboot right after the MSDE feature is installed. Also, how does the installer know that the feature has been installed when you reboot.

Will the next feature selected automatically be installed on reboot?

skim35
08-06-2004, 05:31 PM
I found that when you reintall the system that already has MSDE installed, the system will shut down the MSDE service before installing the new instance. After the copy process, it does not restart the service again, leaving you with unable to run SQL problem.

You have two options, you can try bring up server using COM DMO interface after the copy process. The other method is to place your SQL run statement (use command line utility osql.exe) in RunOnce registry hive and ask user to reboot the system.