Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSDE setup fails

Status
Not open for further replies.

gerib

Programmer
Joined
May 19, 2003
Messages
6
Location
AT
Hi folks,

I need to install the MSDE during a setup of one of our apps.

The online help of SQL server 2000 suggests to use CreateProcess() and WaitForSingleObject() for this and supplies a sample code, too. No prob. This is an easy task. I do this all the time when I have to run something synchronously.

So I do the following in the VB6 setup routine:

...

RC = CreateProcess(vbNullString, "D:\MSDE\setup.exe /settings IC-SBE-MSDE.INI /l D:\MSDE\IC-SBE-MSDE.log /qb /wait", 0, 0, True, NORMAL_PRIORITY_CLASS, 0, Directory, StartupInfo, ProcessInfo)

[or in another attempt]

RC = CreateProcess(vbNullString, "D:\MSDE\setup.exe /settings IC-SBE-MSDE.INI /l D:\MSDE\IC-SBE-MSDE.log /qb /wait", 0, 0, 0, 0, 0, vbNullString, StartupInfo, ProcessInfo)

...

RC = WaitForSingleObject(ProcessInfo.hProcess, INFINITE)

...


The MSDE-Setup starts, the progress bar goes to "Time remaining: [varying from 20 to 15] seconds" ... and stucks there :-(

The processes setup.exe, setupre.exe and sqlredis.exe can be seen in the Task Manager with no CPU activity.


The last line in D:\MSDE\IC-SBE-MSDE.log shows:
...
Executing "C:\Programme\Microsoft SQL Server\80\Tools\Binn\sqlredis.exe /q:a"


Pressing 'Cancel' in the Setup dialog lowers the button but nothing else happens. If I 'shoot down' sqlredis.exe in TaskMgr the setup comes up with "Installation of the MDAC package failed" and ends with return code 1603.


The corresponing lines in D:\MSDE\IC-SBE-MSDE.log are:
...
Starting custom action InstallSqlRedis
Executing "C:\Programme\Microsoft SQL Server\80\Tools\Binn\sqlredis.exe /q:a"
Installation of the Microsoft Data Access Components package failed.
Action ended 21:08:25: InstallFinalize. Return value 3.
...

---------------------------------------------------------

And to bring a little fun into it: It works with the VB6 Shell command. But this runs the setup asynchronously...

I tried this with SQL2KDeskSP3.exe on Win2K Prof/SP3.

As far as I'm concerned I do everything that is suggested in the docs / sample codes.

Does anybody have any ideas?

Thank you in advance for any assistance.

Geri
 
Got it!

Have to use:

Do
RC = MsgWaitForMultipleObjects(1, ProcessInfo.hProcess, 0, ProgEndTimeout * 1000, (QS_POSTMESSAGE Or QS_SENDMESSAGE))
If RC = WAIT_FAILED Then Err.Raise 1
DoEvents
Loop While RC <> WAIT_OBJECT_0

...instead of WaitForSingleObject(...)


But, now something else appears:

&quot;Setup failed to configure the server. Refer to the server error logs and setup error logs for more information.&quot;

OK, I referred...

server error log shows 2 Warnings:
...
2003-05-21 21:45:59.42 server Using dynamic lock allocation. [500] Lock Blocks, [1000] Lock Owner Blocks.
2003-05-21 21:45:59.86 spid3 Warning ******************
2003-05-21 21:45:59.86 spid3 SQL Server started in single user mode. Updates allowed to system catalogs.
...
2003-05-21 21:46:03.37 spid3 SQL global counter collection task is created.
2003-05-21 21:46:03.42 spid3 Warning: override, autoexec procedures skipped.
2003-05-21 21:46:12.32 spid3 SQL Server is terminating due to 'stop' request from Service Control Manager.
...

However, not very helpful ( at least to me ).


setup error log shows:
...
Starting custom action ConfigServer
Executing &quot;C:\Programme\Microsoft SQL Server\80\Tools\Binn\cnfgsvr.exe -V 1 -M 1 -U sa -I &quot;MSSQLSERVER&quot; -Q &quot;Latin1_General_CI_AS&quot;&quot;
Setup failed to configure the server. Refer to the server error logs and setup error logs for more information.
Action ended 21:48:08: InstallFinalize. Return value 3.
...

AND?!? Do I have to patch setup.exe now to supply the proper arguments? Or is it another case of &quot;Welcome to the world of Windows!&quot;? :-)
 
addendum:

'ProgEndTimeout * 1000' above can be replaced by 'INFINITE'
 
Got it, again!

( Hehe, not with me, guys! ;-) )

INSTANCENAME ist NOT an OPTIONAL parameter in the ini_file!

Shame on doc writers and/or coders!

 
CORRECTION:

INSTANCENAME is optional!

But, if an error occurs during MSDE setup and the setup rollback is performed after confirming the error message,
the instance sub-folders of C:\Program Files\Microsoft SQL Server\ ...

MSSQL ... for a default instance
MSSQL$[instance_name] ... for a named instance

...are NOT removed!

And if you then start the MSDE setup again with the same instance name ( or a default instance ) the 'failed to config server' error occurs.

Deleting the instance folder yourself is the solution.
 
Still shame on doc writers and/or coders! :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top