Topic
  • 5 replies
  • Latest Post - ‏2013-08-30T09:43:28Z by Arvind_Gupta
ikoiko.nb
ikoiko.nb
4 Posts

Pinned topic db2 connect problem?

‏2012-03-27T22:59:29Z |
I wasn't sure what to put in the subject line for this one. I have a ASP .NET Visual Studio application that works fine on my desktop and on the web server for all programs but one. That program is very different from the others and creates a crystal report that uses Dataset classes (.xsd) with dataadapters and calls db2 stored procedures. This process works fine on my computer but when we move it to the server it abends with "ERROR 42968 IBM SQL8002N An attempt to connect to a host failed due to a missing DB2 Connect product or invalid license. SQLSTATE=42968".

On my computer I am running VS2008, ASP. Net 4.0, DB2 PE 9.7. The server has ASP .Net 4.0, DB2 Connect 9.1. Is this problem being caused by the different DB2 versions? And if so, why do the other 50 or so programs have no problems accessing DB2?

Visual Studio generates the XML that is used to access the database. Using debug and looking at the Stack Trace, it appears that the abend is triggered when the dataadapter is attempting to "Fill" the table. The db source XML statement generated by Visual Studio is below. For some reason I feel like the DB2 software on the server doesn't like something in this statement (although I could be way off base).

<DbSource ConnectionRef="MVSPConnectionString" DbObjectName="LMISDB00.HARDCARD" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">

This is the Stack Trace:

[DB2Exception (0x80004005): ERROR 42968 http://IBM] SQL8002N An attempt to connect to a host failed due to a missing DB2 Connect product or invalid license. SQLSTATE=42968
IBM.Data.DB2.g.a(String A_0, IsolationLevel A_1, Int32 A_2, DB2Connection A_3, Int32& A_4, Int32& A_5) +2050
IBM.Data.DB2.DB2ConnPool.a(DB2Connection A_0, String A_1, a& A_2, Object& A_3) +2513
IBM.Data.DB2.DB2Connection.Open() +565
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +31
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112
System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +115
hardcardTableAdapters.HARDCARDTableAdapter.Fill(HARDCARDDataTable dataTable, Nullable`1 PRMTID) +232
Permits_BuildingPermit.ConfigureCrystalReports() +461
Permits_BuildingPermit.btnSubmit_Click(Object sender, EventArgs e) +232
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

We have spent hours and hours and hours trying to figure out where the problem lies. Sure could use some help!!!
Updated on 2012-03-29T09:07:27Z at 2012-03-29T09:07:27Z by Arvind_Gupta
  • Arvind_Gupta
    Arvind_Gupta
    58 Posts

    Re: db2 connect problem?

    ‏2012-03-28T12:15:08Z  
    Check the reply posted here:
    http://www.ibm.com/developerworks/forums/thread.jspa?threadID=311406&tstart=0

    Also, this link should be helpful:
    http://www.ibm.com/developerworks/wikis/display/DB2/DB2+and+.NET+FAQs#DB2and.NETFAQs-WhatisDB2Connect%3F
  • ikoiko.nb
    ikoiko.nb
    4 Posts

    Re: db2 connect problem?

    ‏2012-03-28T15:30:14Z  
    Check the reply posted here:
    http://www.ibm.com/developerworks/forums/thread.jspa?threadID=311406&tstart=0

    Also, this link should be helpful:
    http://www.ibm.com/developerworks/wikis/display/DB2/DB2+and+.NET+FAQs#DB2and.NETFAQs-WhatisDB2Connect%3F
    Thank you for your reply. DB2 connect is installed on both my computer and the server.
  • Arvind_Gupta
    Arvind_Gupta
    58 Posts

    Re: db2 connect problem?

    ‏2012-03-29T09:07:27Z  
    One thing you may want to check and ensure that your crystal report creates connection to database thru DB2 Connect.
  • dealkk80
    dealkk80
    1 Post

    Re: db2 connect problem?

    ‏2013-08-28T23:55:47Z  

    have you figure it out? I got same issue and it make no sense.

    I can debug my application on my desktop and it work fine in visual studio. Once i published to same computer (my desktop) and host in in iis, it will failed to connect to db2 with error below. I also try to published to another server and got same issue.

    "ERROR 42968 IBM SQL8002N An attempt to connect to a host failed due to a missing DB2 Connect product or invalid license. SQLSTATE=42968". 

     

  • Arvind_Gupta
    Arvind_Gupta
    58 Posts

    Re: db2 connect problem?

    ‏2013-08-30T09:43:28Z  
    • dealkk80
    • ‏2013-08-28T23:55:47Z

    have you figure it out? I got same issue and it make no sense.

    I can debug my application on my desktop and it work fine in visual studio. Once i published to same computer (my desktop) and host in in iis, it will failed to connect to db2 with error below. I also try to published to another server and got same issue.

    "ERROR 42968 IBM SQL8002N An attempt to connect to a host failed due to a missing DB2 Connect product or invalid license. SQLSTATE=42968". 

     

    Hi,

    Please verify that your IIS user id (IIS APPPOOL\DefaultAppPool) has read access to the license directory and the license files contained in there.
    Also you make sure you add IIS user id (IIS APPPOOL\DefaultAppPool) to group DB2USERS and IIS_USRS.

    Thanks,

    Arvind