Topic
18 replies Latest Post - ‏2012-12-12T22:08:11Z by u234jaslfj
dblwizard
dblwizard
46 Posts
ACCEPTED ANSWER

Pinned topic VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

‏2011-02-25T18:56:24Z |
Howdy,

I am trying to get Visual Studio 2010 and Entity Framework to point to a DB2 client. I have tried several different combinations of installs and none of them seem to work. I'm on a 32bit Xp system.

Using this page as a reference: http://www.ibm.com/developerworks/wikis/display/DB2/DB2+and+.NET+FAQs#DB2and.NETFAQs-WherecanIfindtheDB2.NETproviderandVSAddins%3F

I have installed "IBM Data Server Client" referenced on:https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=swg-idsc97. I have also installed the "IBM Database Add-Ins for Visual Studio" and in reading some other posts I downloaded and installed ibm_data_server_driver_package_win32_EN_v97.exe.

None of the installs error or anything but when I go into a project and try and add new "ADO.NET Entity Data Model" and it want's me to change the data provider I only have SQL Server and Oracle as options.

Can anybody help me on this one?

Thanks

David Logan
Updated on 2012-12-12T22:08:11Z at 2012-12-12T22:08:11Z by u234jaslfj
  • SystemAdmin
    SystemAdmin
    2826 Posts
    ACCEPTED ANSWER

    Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

    ‏2011-02-25T19:33:21Z  in response to dblwizard
    Hi David,

    the current support for VS 2010 is available only in beta form. Please see the instructions on how to set up the beta drivers and visual studio add-ins in the following forum post: http://www.ibm.com/developerworks/forums/thread.jspa?threadID=345634&tstart=0

    Regards,
    Alex
    • dblwizard
      dblwizard
      46 Posts
      ACCEPTED ANSWER

      Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

      ‏2011-02-25T22:56:28Z  in response to SystemAdmin
      Alex,

      I downloaded the following three files from the link:https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=swerpdb2-datadv10-3

      v9.7fp3a_nt32_client.exe
      IBM.NETVSAI4.0Beta.exe
      IBM.NETProviders4.0Beta-32bit.exe

      I installed them in that order but I still can not see any other "providers" in the Change Data Provider" I used the command prompt to run the batch files for the last two. Am I missing something?

      Thanks

      David
      • dblwizard
        dblwizard
        46 Posts
        ACCEPTED ANSWER

        Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

        ‏2011-02-28T15:38:08Z  in response to dblwizard
        Alex,

        I've rebooted since Friday and now I'm getting a couple of different error messages when I go into Visual studio and try adding a new data model.

        When I start Visual Studio 2010 I get:

        "The 'db2vstrt Package' package did not load correctly.

        The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'D:\Documents and Settings\...\Application Data\Microsoft\VisualStudtion\10.0\ActivityLog.xml'
        Then when I go into a project and try and add a new data model I get:

        "The 'IBM VS.NET SE Integration and Extensions Package' did not load correctly.

        The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'D:\Documents and Settings\...\Application Data\Microsoft\VisualStudtion\10.0\ActivityLog.xml'

        Continue to show this error message?"

        Let me know if you have any suggestions.

        Thanks

        dbl
        • saravind
          saravind
          20 Posts
          ACCEPTED ANSWER

          Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

          ‏2011-02-28T18:00:51Z  in response to dblwizard
          hi David,

          You mentioned that you installed Add-Ins and the provider in the following order.

          IBM.NETVSAI4.0Beta.exe
          IBM.NETProviders4.0Beta-32bit.exe

          It looks like you may have installed the Add-Ins before installing the provider (which is a pre-req for installing IBM Database Add-Ins for Visual Studio 2010). Hence, the Add-Ins may not have installed correctly.

          Can you uninstall the Add-Ins and reinstall them.

          To uninstall,

          1. Close all Visual Studio instances.

          2. Open a command prompt and change to the directory where you unzipped IBM.NETVSAI4.0Beta.zip.

          3. Run the add-ins uninstall batch script:

          uninstallVSAI4.0.bat <install_path>

          where <install_path> is the full path to the directory where you installed IBM Database Add-Ins for
          Visual Studio 2010 Beta.

          Examples:
          uninstallVSAI4.0.bat "C:\Program Files\IBM\IBM Database Add-Ins for Visual Studio 2010 Beta"

          You can reinstall the Add-Ins by double-clicking on setupVSAI4.0.bat.

          Thanks,
          Sangeeta
          • dblwizard
            dblwizard
            46 Posts
            ACCEPTED ANSWER

            Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

            ‏2011-03-01T18:32:50Z  in response to saravind
            OK,

            I've tried posting this several times and I keep getting "Disallowed content detected" but I have no idea what content I have here that is disallowed. I have removed a portion of the error message to see if that's the problem.

            I figured out part of the problem. When I ran the .bat files to copy the Add In beta and the Data Provider I didn't have "" around the directory so it installed things to C:\Program. Which when I rebooted the OS wanted to rename. So when I let it it broke things. I have uninstalled and reinstalled based on your directions and now and I have 2 options in the Change Provider screen:

            IBM DB2, IDS and U2 Servers
            IBM IDS Server

            Doesn't seem to matter which one I pick I still get the same error. In this new provider I don't see a place to specify the "Port Number". Anyway here is the error I'm getting:

            ERROR 08001 IBM SQL30081N A communication error has been detected. ... SQLSTATE=08001

            I'm still not sure if I have the correct provider as one time when I completed this install the only option was "Connection String" but now I have a tall box that has:

            1. Select or enter server name:
            2. Enter information to log onto server:
            3. Select or enter database name:

            Can you verify if I've gotten the correct provider installed and if so how to resolve this error?

            Thanks

            dbl
            • SystemAdmin
              SystemAdmin
              2826 Posts
              ACCEPTED ANSWER

              Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

              ‏2011-03-01T18:36:12Z  in response to dblwizard
              Hi,

              in order to specify the port you need to use the <host>:<port> format when specifying the host name.

              Regards,
              Alex
              • dblwizard
                dblwizard
                46 Posts
                ACCEPTED ANSWER

                Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                ‏2011-03-01T18:50:39Z  in response to SystemAdmin
                Howdy,

                ok that allowed me to create a connection but now when I try and generate a model from that connection I'm getting the error displayed in the attached document. I put it in the document because there seems to be something in the error messages that your processor doesn't like and considers bad content.

                Any thoughts on what to do next?

                Thanks

                dbl
                • SystemAdmin
                  SystemAdmin
                  2826 Posts
                  ACCEPTED ANSWER

                  Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                  ‏2011-03-01T19:55:49Z  in response to dblwizard
                  Hi,

                  which DB2 client package have you installed? Can you please run db2level from the client install dir's bin subdirectory and paste the output here.

                  Thanks,
                  Alex
                  • dblwizard
                    dblwizard
                    46 Posts
                    ACCEPTED ANSWER

                    Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                    ‏2011-03-01T20:22:12Z  in response to SystemAdmin
                    C:\Program Files\IBM\IBM DATA SERVER DRIVER\BIN>db2level
                    DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09073" with
                    level identifier "08040107".
                    Informational tokens are "DB2 v9.7.301.326", "s101006", "IP23213", and Fix Pack

                    "3a".
                    Product is installed at "C:\PROGRA~1\IBM\IBMDAT~1" with DB2 Copy Name
                    "DB2COPY1".
                    C:\Program Files\IBM\IBM DATA SERVER DRIVER\BIN>
                    • dblwizard
                      dblwizard
                      46 Posts
                      ACCEPTED ANSWER

                      Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                      ‏2011-03-01T21:00:39Z  in response to dblwizard
                      One other note. When I try and view the tables via the "Data Connection" it tells me "Column "TABSCHEMA" does not belong to table Tables."

                      Out beside the instance of the connection in server explorer it has DB2 09.01.0005 in braces.

                      Thanks

                      dbl
                      • SystemAdmin
                        SystemAdmin
                        2826 Posts
                        ACCEPTED ANSWER

                        Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                        ‏2011-03-01T21:41:15Z  in response to dblwizard
                        Something seems to have gone wrong with your installation. From your install path I see that you've installed Data Server Driver, however, the fact that db2level command reports instance name as "DB2" and copy name as "DB2COPY1" would suggest that a IBM Data Server Client is installed.
                        Do you have more then one DB2 client installed on your XP machine? Or had installed at some point previously?
                        • dblwizard
                          dblwizard
                          46 Posts
                          ACCEPTED ANSWER

                          Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                          ‏2011-03-02T15:44:08Z  in response to SystemAdmin
                          Yes there were previous versions on this system. But the "DATA SERVER DRIVER" path I took from the IBM.NETProviders4.0Beta-32bit readme.txt. I think it originally wanted to install to a "SQLLIB" folder.
                          • SystemAdmin
                            SystemAdmin
                            2826 Posts
                            ACCEPTED ANSWER

                            Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                            ‏2011-03-02T22:15:41Z  in response to dblwizard
                            From the server version you've posted before DB2 09.01.0005 I gather that your server is DB2 V9 on z/OS, correct? Also, given that the original install path was SQLLIB I guess you've installed a Data Server Client not Data Server Driver. So, let's try the following:

                            1) from the same bin directory run:
                            
                            db2swtch -d db2copy1
                            

                            just to make sure your beta install is picked up as the default one

                            2) now start DB2 Command Window ( run db2cmd from the same bin directory )
                            3) In the DB2 Command Window do the following:
                            - db2 catalog tcpip node <name> remote <hostname> server <port>
                            - db2 catalog database <dbname> as <alias> at node <name> authentication dcs
                            - db2rbind <alias> -l <logfile> -u <uid> -p <pwd>

                            Regards,
                            Alex
                            • dblwizard
                              dblwizard
                              46 Posts
                              ACCEPTED ANSWER

                              Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                              ‏2011-03-03T21:44:22Z  in response to SystemAdmin
                              Alex,

                              Ok I found some things out and got a lot farther this time. I'm new to this organization and didn't realize that they had a background process that "pushed" certain software down to these systems. Unbeknown-st to me an older version of the DB2 client was being "reinstalled" in the evenings and that was causing some of the problems I was having.

                              I have gotten all of those removed and the reinstalled everything again.

                              Now I don't get any errors but when I went through the process of adding a new "Entity Data Model" to my project it allowed me to select tables, views and stored procedures, but when it got done with the "import" the model is blank. Now if I select "Update Model from Database..." and it brings up the "Choose your database Objects" window it comes up with the "Add" tab and the following error message displayed inside the tab:

                              Error retrieving database information.
                              Error Message: 'An item with the same key has already been added'

                              Clicking on the "Refresh" or "Delete" tab does nothing and the only button enabled is "Cancel".

                              Do you still want me to provide the output from your previous post or do you have any other suggestions.

                              Thanks

                              dbl
                              • SystemAdmin
                                SystemAdmin
                                2826 Posts
                                ACCEPTED ANSWER

                                Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                                ‏2011-03-04T21:52:41Z  in response to dblwizard
                                Do you get any error or warning messages dumped to the VS output window when you loading the model the first time? Something about no primary key or unique index found?
                                • dblwizard
                                  dblwizard
                                  46 Posts
                                  ACCEPTED ANSWER

                                  Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

                                  ‏2011-03-08T20:20:42Z  in response to SystemAdmin
                                  Alex,

                                  No there is no information in the output window. I'm going to set this aside for a couple of days. Friday when i came in to try some more tests I got a message about "Provider not properly registered" or something like that. I reinstalled the provider and then the dialog to enter the connection information was totally different. This time the only option was to enter a "ConnectionString". I hadn't installed anything new on the box so I'm thinking there is still something going on behind the scenes that is causing me a conflict.

                                  Anyway I'm waiting for a new harddrive to arrive and then we are going to reimage this box. Once that happens i will install everything fresh and see what happens.

                                  Thanks

                                  dbl
  • dblwizard
    dblwizard
    46 Posts
    ACCEPTED ANSWER

    Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

    ‏2011-03-29T21:48:50Z  in response to dblwizard
    Howdy,

    I'm now back to working on this problem. Machine has been reimaged and I've installed the 3 packages listed above. Let me know if I should really post this in a new Thread.

    Now I get the list of entities and selected 3 of them. It went through the process but when it was finished I had the following error in the output window:

    Unable to generate the model because of the following exception: 'An error occurred while executing the command definition. See the inner exception for details.
    ERROR 57014 IBMDB2 SQL0905N Unsuccessful execution due to resource limit being exceeded. Resource name = "ASUTIME", limit = "000000000145" CPU seconds ("000006500000" service units) derived from "SYSIBM.DSNRLST01". SQLSTATE=57014

    From what I've been able to read this is probably a db setting that I will have to get one of the DBA's to change. But before I go to them I thought I would confirm that there isn't anything I do on this end to address this.

    Also now when I try and go back in and "rebuild" the interfaces it shows that it is "retrieving" the information but then comes back with:
    "Error retrieving database information.
    Error Message:'An item with the same key has already bbeen added.'"

    Any thoughts on this?

    Thanks

    dbl
    • u234jaslfj
      u234jaslfj
      2 Posts
      ACCEPTED ANSWER

      Re: VS 2010 and DB2 Data Provider Not showing in "Change Data Provider"

      ‏2012-12-12T22:08:11Z  in response to dblwizard
      For the resource time out issue, you can try adding a filter to your connection. I would try filtering it down to a single table for a test. For some reason the add in seems to pull all the tables your connection can view, work on building a data model, and then filters out the tables you don't have marked to include. Also, you may want to save the credentials on the connection. I have had problems with filter's applying when I didn't save the credentials.

      For your other issue try deleting the connection string from your config file.