Installation issues

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for DB2
Post Reply
spyros_spy
Posts: 4
Joined: Mon 18 Nov 2019 12:31

Installation issues

Post by spyros_spy » Mon 18 Nov 2019 14:01

I installed the product and when I try to connect through Entity Developer I'm getting the error below:
Could not load file or assembly 'IBM.Data.DB2, Version=9.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208' or one of its dependencies. The system cannot find the file specified.

I installed IBM Data Server Driver Package and now I'm getting the error below:

ERROR [58005] [IBM] SQL0998N Error occurred during transaction or heuristic processing. Reason Code = "16". Subcode = "1". SQLSTATE=58005.

What do I have to do to make it work?

spyros_spy
Posts: 4
Joined: Mon 18 Nov 2019 12:31

Re: Installation issues

Post by spyros_spy » Tue 19 Nov 2019 11:31

Furthermore the error I get when I load Visual Studio Enterprise 2019 is the following:

The 'Devart.Data.DB2.Vs.DB2DataProviderPackage' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension.

ActivityLog.xml writes the following:

<entry>
<record>632</record>
<time>2019/11/19 11:26:15.643</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Devart.Data.DB2.Vs.DB2DataProviderPackage]</description>
<guid>{083DEC05-561E-4C73-AE3A-3304C3FB4E8E}</guid>
</entry>
<entry>
<record>633</record>
<time>2019/11/19 11:26:15.659</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [Devart.Data.DB2.Vs.DB2DataProviderPackage]Source: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;Devart.Data.DB2.Vs, Version=2.4.872.0, Culture=neutral, PublicKeyToken=09af7300eec23701&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;Devart.Data.DB2.Vs, Version=2.4.872.0, Culture=neutral, PublicKeyToken=09af7300eec23701&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;Devart.Data.DB2.Vs, Version=2.4.872.0, Culture=neutral, PublicKeyToken=09af7300eec23701&apos;&#x000D;&#x000A; at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A; at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A; at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&#x000D;&#x000A; at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark&amp; stackMark)&#x000D;&#x000A; at System.Activator.CreateInstance(String assemblyName, String typeName)&#x000D;&#x000A; at System.AppDomain.CreateInstance(String assemblyName, String typeName)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>
<guid>{083DEC05-561E-4C73-AE3A-3304C3FB4E8E}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo></errorinfo>
</entry>

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Installation issues

Post by Shalex » Wed 20 Nov 2019 11:26

'Could not load file or assembly 'IBM.Data.DB2, Version=9.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208' or one of its dependencies. The system cannot find the file specified.' I installed IBM Data Server Driver Package
That is the correct solution.
and now I'm getting the error below:
'SQL0998N Error occurred during transaction or heuristic processing. Reason Code = "16". Subcode = "1". SQLSTATE=58005'
Reason Code = "16" -> A failure occurred with the Microsoft Distributed Transaction Coordinator (MSDTC).
Subcode = "1" -> The database manager is unable to communicate with the MSDTC.

To fix the issue: navigate to Control Panel > Administrative Tools > Services and make sure that the "Distributed Transaction Coordinator" service is running.

JIC: by default dotConnect for DB2 sets "enlist=false;" in the connection string (we preserved this behavior for a backward compatibility) but IBM.Data.DB2 uses "enlist=true;". So please set explicitly "enlist=true;" in Devart.Data.DB2.DB2Connection.ConnectionString not to break the behavior of IBM.Data.DB2
The 'Devart.Data.DB2.Vs.DB2DataProviderPackage' package did not load correctly.
Please reinstall the product this way:
1) uninstall dotConnect for DB2 and other Devart ADO.NET products
2) make sure (via some file manager like https://x-diesel.com/) that there are no Devart.* and policy.*.Devart.* files/folders in the following locations:
* GAC 2.0 (\Windows\assembly\GAC_MSIL\)
* GAC 4.0 (\Windows\Microsoft.NET\assembly\GAC_MSIL\)
3) clear the directories:
* \Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Devart\
* \Program Files (x86)\Devart\
* \Program Files (x86)\Common Files\Devart\
* \Documents and Settings\All Users\Devart\
4) run installation of dotConnect for DB2 v2.4.872 via its right-click > Run as administrator

spyros_spy
Posts: 4
Joined: Mon 18 Nov 2019 12:31

Re: Installation issues

Post by spyros_spy » Tue 26 Nov 2019 10:10

Shalex wrote: Wed 20 Nov 2019 11:26
Thanks for your response. I did what you said and I'm still getting the same error on VS.

On Entity Developer I'm getting the following error now:

ERROR [08001] [IBM] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "xx.xx.xx.xx". Communication function detecting the error: "connect". Protocol specific error code(s): "10060", "*", "*". SQLSTATE=08001

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Installation issues

Post by Shalex » Thu 28 Nov 2019 15:25

Try the same connection string with IBM.Data.DB2.DB2Connection:

Code: Select all

var conn = new IBM.Data.DB2.DB2Connection();
conn.ConnectionString = "server=...;user id=...;password=...;database=...;enlist=true;";
conn.Open();
Does the issue persist in this case as well? If so, contact the IBM Support team for getting assistance.

JIC: https://www.ibm.com/developerworks/comm ... 0013972946

spyros_spy
Posts: 4
Joined: Mon 18 Nov 2019 12:31

Re: Installation issues

Post by spyros_spy » Fri 29 Nov 2019 09:59

Thank you for the response. I'll get back to you after testing it.

Post Reply