• 1 reply
  • Latest Post - ‏2013-06-28T18:40:52Z by Prashant Kulkarni
6 Posts

Pinned topic IIS Web Service & DB2

‏2013-06-26T10:36:08Z |


We are using a web service which will be used to fetch the details from DB2. We will be hosting it in a server and use the link in our applications to access the database.

We are using DB2 V9.5 Data Server Driver package for this. I have installed it in my machine and added it as a reference in my web service application and ran it in VS - it got hosted like http://** and i am able to connect to database to fetch the details.

Now, I tried publishing the same and hosting it locally in my machine's IIS and browse thro' the page I am not able to connect to the database. Instead  I am responded with the below error message.

" <?xml version="1.0" encoding="utf-8" ?>

  <stringxmlns="">Unable to connect-ERROR [42968] [IBM] SQL8002N An attempt to connect to a host failed due to a missing DB2 Connect product or invalid license. SQLSTATE=42968</string>"        
Not sure, what might be the issue reason.
Yesterday accidentally, my admin rights has been revoked. By then, i got the same issue even when i ran the web service from VS itself. Today i got it back and it is working fine from VS but not in IIS.

So, does admin rights has any role to play in accessing the DB2 license file and that is the reason for IIS hosted files not able to access the database?

Could you please help me in getting this issue solved? 


Thanks in Advance,




  • Prashant Kulkarni
    Prashant Kulkarni
    7 Posts

    Re: IIS Web Service & DB2

    I hope you are  using latest fixpack of v95 driver as some of errors such as SQL8002 are fixed in the  v95  fixpacks
    Also check the answers in resolving SQL8002in for  "DB2 Connect product or invalid license"problem. in the link 
    "How to update an Expired License for an Installed DB2® Product"
    we will also suggest  to use v97 or higher clients as V95 will be going out of service by Apr-2014
    if you are suspecting Admin rights problem then you can check if you have necessary privileges to license folder of installed ds driver where connect licenses users need to keep. I would expect db2trc traces will provide more insights for us to understand exact issues if above is not of help -- that likely needs PMR.