hannesN / rmbench

Automatically exported from code.google.com/p/rmbench
0 stars 1 forks source link

importing model with UDTs creates broken model #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. create of find a database with user-defined types (e.g., AdventureWorks 
sample database that comes with SQL Server 2008), and indexes that reference 
the UDT columns
2. import database metadata
3. import metadata into RMBench model

the model seems ok, but will throw a NullPointerException when saved to a file. 
Reason is, that the UDT columns are not imported and thus the index column 
references are invalid (null)

Original issue reported on code.google.com by sell.ber...@gmail.com on 5 Jun 2011 at 12:26

GoogleCodeExporter commented 9 years ago
the problem is related to user privileges, and thus may be product-dependent. 
Since UDTs are registered under the dbo role in SQL Server, the user performing 
the meatdata import needs to have db_owner role membership to be able to access 
the column metadata. If he doesnt, the columns are simply not returned from the 
jdbcMetaData#getColumns resultset.

This needs to go into the FAQ

Original comment by sell.ber...@gmail.com on 5 Jun 2011 at 4:18