I'm trying to create an Entity Framework model from our DB2 database using Visual Studio 2012.
I have installed the DB2 Data Server Drivers for version 10.1 fp2, output from db2 level:
"DB2 v10.1.200.238", "s121127", "IP23389", "Fix Pack 2"
I have also installed the corresponding Visual Studio Add-ins for version 10.1 fp2.
When I use the EDM wizard to create an entity data model, there are two issues. When I setup the connection, I am able to specify filtering options so that I should only see the database and tables that I need. However, when I proceed to the next step, ALL schemas and tables are visible to select from, as if it is not using the filters I specified in the previous step.
This is what I believe causes the next problem.. if I select the tables that I want generated in the .EDMX model and click Finish, the generator eventually times out with the following error (after about 10-15 minutes of waiting).
"An error occurred while reading from the store provider's data reader. See the inner exception for details.
ERROR 57014 IBM DB2 SQL0905N Unsuccessful execution due to resource limit being exceeded. Resource name = "ASUTIME", limit = "000000000495" CPU seconds ("000006258000" service units) derived from "SYSIBM.DSNRLST01"
The result of the generation is an empty data model after this timeout error comes up. Again, I believe the issue is that we have hundreds of tables available, and because the filters I specified in the connection setup are not being applied during the generation of the .EDMX, it is causing it to take a very long time to generate and it eventually times out.
In case you need it... output from testconn40:
C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin>testconn40.exe database="xxx";server="xxx";uid="xxx";pwd="xxx"
Step 1: Printing version info
.NET Framework version: 4.0.30319.17929
DB2 .NET provider version: 18.104.22.168
DB2 .NET file version: 10.1.2.4
Capability bits: ALLDEFINED
Factory for invariant name IBM.Data.DB2 verified
Step 2: DB2DSDRIVER_CFG_PATH env var: unset
Validating db2dsdriver.cfg against db2dsdriver.xsd schema file
File C:\ProgramData\IBM\DB2\IBMDBCL1\cfg\db2dsdriver.cfg missing. Nothi
ng to validate
Step 3: Connecting using "database=xxx;server=xxx;uid=xxx;pwd=xxx"
Server type and version: OS/390 10.01.0005
Step 4: Selecting rows from SYSIBM.systables to validate existence of packages
SELECT * FROM SYSIBM.systables FETCH FIRST 5 rows only
Step 5: Calling GetSchema for tables to validate existence of schema functions
Pinned topic VS 2012 Entity Framework issues generating an ADO.Net Entity Data Model
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-30T22:08:49Z at 2013-01-30T22:08:49Z by SystemAdmin
ArchanaSoni 2700053MB427 Posts
Re: VS 2012 Entity Framework issues generating an ADO.Net Entity Data Model2013-01-15T12:46:19ZThis is the accepted answer. This is the accepted answer.Hi Evan,
For your first issue regarding filtering we would require further investigation to get it addressed. We would request you to approach IBM Support Team to expedite process.
Regarding your second issue for error "ERROR 57014 IBM DB2 SQL0905N Unsuccessful execution due to resource limit being exceeded." - We have created 700 tables but still couldn't reproduce it in our environment.
SystemAdmin 110000D4XK2826 Posts
Re: VS 2012 Entity Framework issues generating an ADO.Net Entity Data Model2013-01-30T22:08:49ZThis is the accepted answer. This is the accepted answer.
- ArchanaSoni 2700053MB4
The issue was present when ONLY visual studio 2012 was installed on the workstation. We uninstalled the Visual Studio Add-Ins, installed visual studio 2010 (so that now the workstation had both 2010 AND 2012 installed), and then reinstalled the add-in. For whatever reason this fixed the issue for us and the tool now successfully applies filters during generation of the entity model.
Also, we have over 3000 tables, so it is pretty clear why we need filtering to work in our evnironment.