SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7

需要注册GAC,修改注册表

IBM官方方案:

http://www-01.ibm.com/support/docview.wss?uid=swg21618434

Technote (troubleshooting)

Problem(Abstract)

This technote contains recommendations and guidance to address problems encountered during installation of the IBM Data Server Driver Package (ds driver) on Microsoft Windows 8 and Windows Server 2012 systems.

Resolving the problem

IBM Data Server Driver 
Guidelines for known issues on Windows 8 and Windows Server 2012 

This technote provides recommendations and guidance to address the problems encountered during installation of the IBM Data Server Driver Package (also referred to as ‘ds driver’) on Microsoft Windows 8 and Microsoft Windows Server 2012 systems. It is also applicable for the below products:
· IBM Data Server Client
· IBM Data Server Runtime Client
· Any IBM DB2 LUW Server Package

These instructions are for the installation of the Data Server Driver. If installing other client packages, use the appropriate installation path and install copy name for that package.

Installing Data Server Driver on Windows 8 or Windows Server 2012

Step 1) 
Ensure the .NET Framework 3.5 is installed on the machine before installing the IBM Data Server Driver package. To install .NET Framework 3.5, the Specify settings for optional component installation and component repair option should be enabled, located under;

     Computer Configuration > Administrative Templates > System

For details, refer: http://msdn.microsoft.com/en-us/library/windows/hardware/hh975396.aspx
You can now proceed to Step3.

Step 2) 
If .NET Framework 3.5 is not installed in Windows 8 or Windows Server 2012 machine, then during installation of the IBM DB2 ds driver it might show pop-up error messages such as indicated in Figure1. It is recommended that you follow the above instructions to install .NET Framework 3.5 before installing IBM DB2 ds driver. Also, if IBM DB2 ds driver is installed prior to installation of the .NET Framework 3.5, it is recommended to uninstall IBM DB2 ds driver, install the .NET Framework 3.5 and then re-install the IBM DB2 ds driver product.

Figure1: Pop-up installation error prompting for MS .NET FW 3.5

Step 3) 
You shall now be able to proceed with the IBM Data Server Driver installation.

1. Following are the additional steps to be performed after installation of the IBM DB2 ds driver on Windows 8/Windows Server 2012. This is especially to ensure proper functioning of the IBM DB2.NET provider on Windows 8/Windows Server 2012.

2. To ensure proper registration of the DB2 .NET assemblies to the GAC (Global Assembly Cache), there is a need to execute the following commands using the Gacutil (Global Assembly Cache Tool) at the command prompt with Administrative privileges. Gacutil is part of the Windows SDK (which can be installed from: http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx#Related ) and also comes bundled with Visual Studio. If you have Visual Studio installed, it is recommended to use the Visual Studio Command Prompt for the below commands:

64-bit Windows platform 
run the following commands:
gacutil /i “<ds driver installation Path>\bin\netf20\IBM.Data.DB2.dll”
gacutil /i “<ds driver installation Path>\bin\netf20_32\IBM.Data.DB2.dll”
gacutil /i “<ds driver installation Path>\bin\netf40\IBM.Data.DB2.dll”
gacutil /i “<ds driver installation Path>\bin\netf40_32\IBM.Data.DB2.dll”
gacutil /i “<ds driver installation Path>\bin\netf20\IBM.Data.Informix.dll”
gacutil /i “<ds driver installation Path>\bin\netf20_32\IBM.Data.Informix.dll”
gacutil /i “<ds driver installation Path>\bin\netf40\IBM.Data.Informix.dll”
gacutil /i “<ds driver installation Path>\bin\netf40_32\IBM.Data.Informix.dll”
gacutil /i “<ds driver installation Path>\bin\netf20\IBM.Data.DB2.Entity.dll”
gacutil /i “<ds driver installation Path>\bin\netf20_32\IBM.Data.DB2.Entity.dll”
gacutil /i “<ds driver installation Path>\bin\netf40\IBM.Data.DB2.Entity.dll”
gacutil /i “<ds driver installation Path>\bin\netf40_32\IBM.Data.DB2.Entity.dll”

32-bit Windows 8 
run the following commands:
gacutil /i “<ds driver installation Path>\bin\netf20\IBM.Data.DB2.dll”
gacutil /i “<ds driver installation Path>\bin\netf40\IBM.Data.DB2.dll”
gacutil /i “<ds driver installation Path>\bin\netf20\IBM.Data.Informix.dll”
gacutil /i “<ds driver installation Path>\bin\netf40\IBM.Data.Informix.dll”
gacutil /i “<ds driver installation Path>\bin\netf20\IBM.Data.DB2.Entity.dll”
gacutil /i “<ds driver installation Path>\bin\netf40\IBM.Data.DB2.Entity.dll”

Place holder <ds driver installation Path> refers to the ds driver installation Path. It should be replaced with the actual path of ds driver installation while executing above commands. 
Example for ds driver path:

     C:\Program Files\IBM\IBM DATA SERVER DRIVER

3. Additionally the following registry key values need to be verified and added if not already present. 
Run 'regedit' command.

Figure 2: Launch ‘regedit’ 

The string values for <version>.DEF.2 and <version>.DEF.4 in the below mentioned registry paths needs to be verified.

HKEY_LOCAL_MACHINE\SOFTWARE\IBM\DB2\InstalledCopies
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\IBM\DB2\InstalledCopies (this is not applicable for 32-bit Windows 8)

After successful installation of ds driver, above mentioned two paths will have two registry entries each. This includes ‘(Default)’ and ‘defaultClientInterfaceCopy’ and the Data value as the ds driver's copy name. By default ds driver's copy name is expected to be IBMDBCL1. Two more registry entries/keys, <version>.DEF.2 and <version>.DEF.4, should be present in each of the above mentioned two paths. To add registry entries right click in the right portion of the window, select New=>String Value. Eg: in the case of IBM ds driver V10.1 FP1 installation, the entries would need to be 10.1.1.DEF.2 and 10.1.1.DEF.4. Also in the case of v9.7 FP6 the version needs to be 9.7.6.DEF.2 and 9.7.6.DEF.4. Right click on the just created String value and select Modify to enter the same value that was present for defaultClientInterfaceCopy (in this case IBMDBCL1). Refer to Figure3 on the required registry structure and values.

Figure 3: Set registry values for DEF.2 and DEF.4 entry

SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7(问题补充)的更多相关文章

  1. 启用SQLite的Data Provider 运行WECOMPANYSITE时遇到ERROR CREATING CONTEXT 'SPRING.ROOT': ERROR THROWN BY A DEPENDENCY OF OBJECT 'SYSTEM.DATA.SQLITE'

    从网上下载的源码WeCompanySite,运行时报错 Error creating context 'spring.root': Error thrown by a dependency of ob ...

  2. error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

    error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System. ...

  3. SQL2008安装时,“provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接) (.Net SqlClient Data Provider)” 错误的解决方案

    错误提示: 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误.未找到或无法访问服务器.请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接. (provide ...

  4. 异常:error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

    error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System. ...

  5. CodeSimth - .Net Framework Data Provider 可能没有安装。解决方法

    今天想使用CodeSimth生成一个sqlite数据库的模板.当添加添加数据库的时候发现: .Net Framework Data Provider 可能没有安装. 下面找到官方的文档说明: SQLi ...

  6. 超时时间已到。在操作完成之前超时时间已过或服务器未响应。 (.Net SqlClient Data Provider)

    超时时间已到.在操作完成之前超时时间已过或服务器未响应. (.Net SqlClient Data Provider) 在做一个小东西的时候出现了这个问题,就是使用VS调试几次项目后,使用SQL Se ...

  7. error CS0007: Unexpected common language runtime initialization error -- '没有注册类别 '

    Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]"Inst ...

  8. CodeSimth - .Net Framework Data Provider 可能没有安装。解决方法[转载 ]

    原文:http://www.cnblogs.com/chenrui7/p/3592082.html 今天想使用CodeSimth生成一个sqlite数据库的模板.当添加添加数据库的时候发现: .Net ...

  9. Oracle Data Provider for .NET的使用(托管与非托管(一))

    目录 简单的概述 简单的使用 非托管系统要求 托管驱动系统要求 其它的注意事项 ODP.NET版本说明 安装ODP.NET 安装非托管驱动 非托管驱动绿色配置 简单的概述 ODP.NET的含义是 Or ...

随机推荐

  1. p4 是否能自动merge

      总结: 1)如果在copy merge(-at)/auto merge(-am)后修改source branch,则可以自动被copy merge: 2)如果在manual merge后修改sou ...

  2. 支持事件穿透?使用pointer-events样式

    使用绝对定位元素,让元素A完全盖住元素B时,如何通过元素A来响应元素B的事件呢? 上图可以用下面的SVG代码来实现: <svg width="200" height=&quo ...

  3. Qt之Dialog\widget\ mainwindow的区别和布局管理器 & 分裂器的区别

    1.Dialog\widget\ mainwindow的区别 注意mainwindow和widget的区别,mainwindow都工具栏和菜单栏 Dialog and mainwinodws 都是继承 ...

  4. 仿Material UI框架的动画特效

    Material UI是一款功能非常强大,界面却十分清新简洁的CSS框架,Material UI利用了Google的Material Design 全新设计语言,并且让每一个UI组件都变得非常独立,因 ...

  5. 老生常谈JavaScript闭包

    闭包就是指一个有权访问另外一个函数作用域中的变量的函数.--<JavaScript高级程序第三版> 本人对于闭包初次的认识就来自<高三>,首先仅仅通过“有权”’两个字我们便可以 ...

  6. 【Android】Eclipse Memory Analyzer 进行堆内存溢出分析

    MAT 不是一个万能工具,它并不能处理所有类型的堆存储文件.     不同厂家的 JVM 所生成的堆转储文件在数据存储格式以及数据存储内容上有很多区别,但是比较主流的厂家和格式,例如 Sun, HP, ...

  7. 25款顶级的jQuery表格插件

    jQuery 表格插件可以让你创建各种各样的表格布局,表格布局是报纸和杂志中最常见的布局,现在的网站中也很常见,在这篇文章中,我向大家推荐25个jQuery 的表格插件,你可以任意控制表格的行和列,用 ...

  8. django with mysql (part-1)

    step01: django-admin.py startproject dj01 step02: cd dj01 tree step03: python manage.py runserver Th ...

  9. Sql Server 调用DLL

    背景 在处理数据或者分析数据时,我们常常需要加入一定的逻辑,该些处理逻辑有些sql是可以支持,有些逻辑SQL则无能为力,在这种情况下,大多数人都会编写相关的程序来处理成自己想要的数据,但每次处理相同逻 ...

  10. Linux中ctrl-c, ctrl-z, ctrl-d 区别

    在Linux中: ctrl-c: ( kill foreground process )   发送 SIGINT 信号给前台进程组中的所有进程,强制终止程序的执行: ctrl-z: ( suspend ...