MDAC-Troubles

MDAC-Troubles

Troubles mit "zerschossenen" MDAC-Installationen

Falls auf einem bestimmten Computer der Datenbankzugriff über ADO oder generell über die MDAC-Components mit völlig absurden Fehlermeldungen fehlschlägt, könnte es sein, daß Sie das Opfer eines MDAC-Versions-Salates geworden sind.

In einigen Fällen hilft eine Reinstallation weiter, in anderen Fällen nicht. Dann ist guter Rat teuer ...
oder es hilft vielleicht dieser Lösungsweg weiter.

Die Symptome

Die Ursache

Don Willits, ein Mitarbeiter der Microsoft Data Access Group, gesteht in dem Dokument [PDF] Redistributing Microsoft Data Access Components vom Juli 1998 ein, daß ...

The Msadc11.cab file that originally shipped with all five releases of MDAC 1.5 did not properly take advantage of file versioning.

Therefore, clients with older RDS client components would not download the newer components in Msadc11.cab. [...] The only way to install them is by using Internet Explorer 4.01, the MDAC stand-alone Setup, or the MDAC redistribution.

Installiert man also einen IE vor 4.01 oder (was wohl häufiger auftritt) ein beliebiges Programm, welches einer dieser MDAC 1.5 installiert, zerschießt man sich damit unbemerkt auch seine intakte MDAC 2.x - Installation.

Die Lösung

Üblicherweise hilft es, den betreffenden Computer auf eine höhere MDAC-Version upzugraden. Leider ist diese Möglichkeit nicht immer gegeben, beispielsweise kann bereits die aktuellste Version installiert sein.

Nach dem ich bei einer Windows-XP-Installation auf das genannte Problem gestoßen bin, habe ich den folgenden Lösungsweg in der Gruppe microsoft.public.data.ado veröffentlicht und seitdem diverse Reaktionen darauf erhalten.

Feedback #1
However, at this point, I do not think I would feel comfortable asking my customer to go through those steps. The solution has a bunch of warnings that it is not supported, and may be dangerous, and my customer is not that computer savvy - he probably would not even be able to complete all those steps.

Is there ANY Microsoft-recommended technique for fixing a broken install of MDAC? Or, do they just assume that that will never happen?

Nein, und genau das ist der Punkt dabei. Es gibt bis heute keinen offiziellen Weg um diesen Versionssalat mit Hilfe einer Reinstallation der bestehenden Version zu beheben. Natürlich ist es eine Notlösung, aber eine funktionierende.

Der Grund für den Disclaimer ist ganz einfach der, daß der Eingriff keine offiziell supportete Lösung ist. Natürlich kann ich keine Verantwortung dafür übernehmen, was der Anwender mit seiner Installation veranstaltet. Ich kann lediglich mitteilen, was erfahrungsgemäß mehrfach funktioniert hat und auf mögliche Risiken hinweisen.

Aber es gab natürlich auch reichlich positives Feedback:

Feedback #2
After receiving the 'specified procedure could not be found' error when trying to open an ADODB connection, I tried the procedures outlined in the [...] article indicated below.
This fixed all of my problems - for anyone looking around the web trying to solve MDAC ADO problems.

Thanks a bunch to Jens!

Details und Code

Newsgroups: microsoft.public.data.ado 
Von: "Jens Geyer" 
Datum: Fri, 20 Jun 2003 15:34:54 +0200 
Lokal: Fr 20 Jun. 2003 09:34  
Betreff: Repair a corrupted MDAC 2.71 installation - the Solution Probably you run into the problem, that your MDAC installation on Windows XP 
becomes corrupted and cannot be repaired using the official ways as 
reinstalling the Windows XP SP 1 or so. 

Here I describe the method, how we got the problem with the "mixed version" 
MDAC installation solved on one of our customer's computer. If you are 
interested in further details of the problem, please refer to the 
appropriate threads in microsoft.public.data.ado. 

DISCLAIMER: PLEASE BE AWARE THAT THE STEPS DESCRIBED HERE ARE NOT AN 
OFFICIALLY DOCUMENTED WAY HOW TO REPAIR A CORRUPTED MDAC INSTALLATION. 
ALWAYS TRY IT FIRST ON ONE MACHINE, BEFORE YOU TRY IT ON OTHER MACHINES. THE 
AUTHOR OF THIS POSTING / MAIL DOES NOT GUARANTEE FOR ANYTHING, EITHER 
EXPRESSED OR IMPLIED. IF YOU DECIDE TO USE THE METHODS DESCRIBED BELOW, YOU 
DO IT AT YOUR OWN RISK! 

The folder names of most system folders are dependent on your system 
language, in this case the OS was an italian version of Windows XP. So the 
folder names may vary in your case. All the batch files mentioned you'll find at the 
end of the posting. 

Last but not least: many thanks to Val Mazur for his help on this topic! 


*** instructions ****************************** 


Extract MDAC_TYP.EXE using this command line: 


  mdac_typ  /C  /T:c:\temp\mdacinst 


This causes the MDAC package only to be extracted to the specified folder, 
nothing more. 


Open this folder. There is a file MSADXPAC.CAB which you please extract 
using WinZip or another archive tool into a new, empty folder. Then copy the 
attached batch file "MAKEDIRS.BAT" into the same folder and double-click it 
to start. Probably you will be informed about that two OLE DB files are 
missing, but don't care. 


When the batch has been finished, there are now three sub-folders ADO, 
MSDACD and OLEDB created. Please copy these three created folders now into 
the target folder C:\file communi\system. If windows asks "Directory exists! 
Overwrite?" or "Overwrite existing file?" always say "Yes". 


Now place the other batch REGFILES.BAT in the folder C:\file communi\system 
and double-click it to start. This batch will now add the copied files 
properly to the registry, which can take a little time (depending on your 
computer speed), so be patient. 


When the second batch has been finished, then try to run the progam again. 


Best regards 


*** MAKEDIRS.BAT ************************************ 


@echo off 


md ADO 
copy /b  MSADER15.DLL  ADO\*.* 
copy /b  MSADO15.DLL   ADO\*.* 
copy /b  MSADO20.TLB   ADO\*.* 
copy /b  MSADO21.TLB   ADO\*.* 
copy /b  MSADOMD.DLL   ADO\*.* 
copy /b  MSADOR15.DLL  ADO\*.* 
copy /b  MSADOX.DLL    ADO\*.* 
copy /b  MSADRH15.DLL  ADO\*.* 
copy /b  MSJRO.DLL     ADO\*.* 


md MSADC 
copy /b  MSADCE.DLL    MSADC\*.* 
copy /b  MSADCER.DLL   MSADC\*.* 
copy /b  MSADCF.DLL    MSADC\*.* 
copy /b  MSADCFR.DLL   MSADC\*.* 
copy /b  MSADCO.DLL    MSADC\*.* 
copy /b  MSADCOR.DLL   MSADC\*.* 
copy /b  MSADCS.DLL    MSADC\*.* 
copy /b  MSADDS.DLL    MSADC\*.* 
copy /b  MSADDSR.DLL   MSADC\*.* 
copy /b  MSDAPRSR.DLL  MSADC\*.* 
copy /b  MSDAPRST.DLL  MSADC\*.* 
copy /b  MSDAREM.DLL   MSADC\*.* 
copy /b  MSDAREMR.DLL  MSADC\*.* 
copy /b  MSDFMAP.DLL   MSADC\*.* 


cmd /c md "OLE DB" 
cmd /c copy /b  MSDADC.DLL    "OLE DB\*.*" 
cmd /c copy /b  MSDAENUM.DLL  "OLE DB\*.*" 
cmd /c copy /b  MSDAER.DLL    "OLE DB\*.*" 
cmd /c copy /b  MSDAORA.DLL   "OLE DB\*.*" 
cmd /c copy /b  MSDAOSP.DLL   "OLE DB\*.*" 
cmd /c copy /b  MSDAPS.DLL    "OLE DB\*.*" 
cmd /c copy /b  MSDASC.DLL    "OLE DB\*.*" 
cmd /c copy /b  MSDASQL.DLL   "OLE DB\*.*" 
cmd /c copy /b  MSDASQLR.DLL  "OLE DB\*.*" 
cmd /c copy /b  MSDATL2.DLL   "OLE DB\*.*" 
cmd /c copy /b  MSDATT.DLL    "OLE DB\*.*" 
cmd /c copy /b  MSDAURL.DLL   "OLE DB\*.*" 
cmd /c copy /b  MSXACTPS.DLL  "OLE DB\*.*" 
cmd /c copy /b  OLEDB32.DLL   "OLE DB\*.*" 
cmd /c copy /b  OLEDB32R.DLL  "OLE DB\*.*" 
cmd /c copy /b  OLEDB32X.DLL  "OLE DB\*.*" 


echo. 
echo Finished !! 
:eof 


*** REGFILES.BAT ****************************** 


@echo off 
echo. 
echo Unregistering files ... 


regsvr32 /u /s ADO\msado15.dll 
regsvr32 /u /s ADO\msador15.dll 
regsvr32 /u /s ADO\msadrh15.dll 
regsvr32 /u /s ADO\msadomd.dll 
regsvr32 /u /s ADO\msadox.dll 
regsvr32 /u /s ADO\msjro.dll 
regsvr32 /u /s MSADC\msadce.dll 
regsvr32 /u /s MSADC\msadcf.dll 
regsvr32 /u /s MSADC\msadco.dll 
regsvr32 /u /s MSADC\msadds.dll 
regsvr32 /u /s MSADC\msdaprst.dll 
regsvr32 /u /s MSADC\msdarem.dll 
regsvr32 /u /s MSADC\msdfmap.dll 
regsvr32 /u /s "OLE DB\oledb32.dll" 
regsvr32 /u /s "OLE DB\msxactps.dll" 
regsvr32 /u /s "OLE DB\msdaenum.dll" 
regsvr32 /u /s "OLE DB\msdaurl.dll" 
regsvr32 /u /s "OLE DB\msdatt.dll" 
regsvr32 /u /s "OLE DB\msdasql.dll" 
regsvr32 /u /s "OLE DB\msdaosp.dll" 
regsvr32 /u /s "OLE DB\msdaora.dll" 
regsvr32 /u /s "OLE DB\msdaps.dll" 


echo ... done 
echo. 
echo Now re-registering files ... 


regsvr32 /s ADO\msado15.dll 
regsvr32 /s ADO\msador15.dll 
regsvr32 /s ADO\msadrh15.dll 
regsvr32 /s ADO\msadomd.dll 
regsvr32 /s ADO\msadox.dll 
regsvr32 /s ADO\msjro.dll 
regsvr32 /s MSADC\msadce.dll 
regsvr32 /s MSADC\msadcf.dll 
regsvr32 /s MSADC\msadco.dll 
regsvr32 /s MSADC\msadds.dll 
regsvr32 /s MSADC\msdaprst.dll 
regsvr32 /s MSADC\msdarem.dll 
regsvr32 /s MSADC\msdfmap.dll 
regsvr32 /s "OLE DB\oledb32.dll" 
regsvr32 /s "OLE DB\msxactps.dll" 
regsvr32 /s "OLE DB\msdaenum.dll" 
regsvr32 /s "OLE DB\msdaurl.dll" 
regsvr32 /s "OLE DB\msdatt.dll" 
regsvr32 /s "OLE DB\msdasql.dll" 
regsvr32 /s "OLE DB\msdaosp.dll" 
regsvr32 /s "OLE DB\msdaora.dll" 
regsvr32 /s "OLE DB\msdaps.dll" 


echo ... done 
:eof 


*** END ************************************************