Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] MS SQL Server 2005 index maximum sizeexceededduring Project Conversion to ProtegeDB

Jonathan Carter jonathan.carter at e-asolutions.com
Mon Jan 21 11:08:05 PST 2008


I've been looking into this some more and although I'm not impressed by
Microsoft's approach, here, I don't think that there's any alternative but
to handle SQL Server 2005 as a special case in the createIndices() method of
DatabaseFrameDb.java
 
I've looked into whether the Microsoft JDBC driver ought to handle this
automatically, but I'm not sure that having the driver handle of this
automatically (e.g. if creating an index on a varchar then use the INCLUDE
statement) could be reliably implemented in the driver to satisfy everyone's
requirements. It really needs the local domain knowledge of the application
to make the right decision about what to do.

I'd rather it didn't, but as far as I can tell, to support MS SQL Server
2005 requires a special case in the Protege code for creating the indices. 
Is this forum the right place to make a change/fix request?
 
Thanks 
 
Regards
 
Jonathan
__________________________________________
Jonathan Carter - Head of Technical Architecture
Enterprise Architecture Solutions Ltd
__________________________________________

Assess your EA maturity at:
www.enterprise-architecture.com/EAvaluator
__________________________________________


 


  _____  

From: protege-discussion-bounces at lists.stanford.edu
[mailto:protege-discussion-bounces at lists.stanford.edu] On Behalf Of Rafael
Ferreira
Sent: 18 January 2008 19:43
To: User support for Core Protege and the Protege-Frames editor
Subject: Re: [protege-discussion] MS SQL Server 2005 index maximum
sizeexceededduring Project Conversion to ProtegeDB


thanks a lot Jonathan, I had the same problem


2008/1/17, Jonathan Carter <jonathan.carter at e-asolutions.com>: 

I've just realised that where I said nvarchar(400), my SQL Server 2005
database has actually created the 'short_value' column as an nvarchar(800).
I'm not sure if this is the Micrsoft JDBC driver (version 1.2) or the
database that's used such a column type. But you can see how quickly the
index key would get beyond 900 bytes (SQL Server sums the columns used in
the index to establish the required key length). 
 
Jonathan
 

  _____  

From: protege-discussion-bounces at lists.stanford.edu
<mailto:protege-discussion-bounces at lists.stanford.edu>
[mailto:protege-discussion-bounces at lists.stanford.edu] On Behalf Of Jonathan
Carter 
Sent: 17 January 2008 17:01
To: protege-discussion at lists.stanford.edu
Subject: [protege-discussion] MS SQL Server 2005 index maximum size
exceededduring Project Conversion to ProtegeDB

 
Hi everyone,
 
I've just tried to convert my project to the Protege Database (File->Convert
Project to Format...) to use a Microsoft SQL Server2005 database. I'm using
Microsoft's JDBC driver v1.2 but am getting the following exception at the
end of the conversion. 
 
"    Exception class com.microsoft.sqlserver.jdbc.SQLServerException.
Message: Operation failed. The index entry of length 1288 bytes for the
index 'repositorylive_I2' exceeds the maximum length of 900 bytes." 
All of my project data is loaded into the table but it fails to create Index
2. 
 
This project works fine with MySQL but unfortunately, I need to use
SQLServer2005.
 
There's nothing I can do in SQLServer2005 to remove/raise the limit for the
index size. The solution Microsoft suggest is "in SQL Server 2005, you can
include nonkey columns in a nonclustered index to avoid the maximum index
size of 900 bytes." Unfortunately, all the keys/indices etc are created by
the Project Conversion code in Protege. Reading more from Microsoft, they
discuss using an include statement, using the example of indexing on a
nvarchar(400) column (which is what the 'short_value' column in the Protege
DB is created as) as follows: 
 
Using the CREATE INDEX statement with an INCLUDE clause to include the
nvarchar column without blowing the index size limit. e.g. 
 
CREATE INDEX IX_Document_Title
ON Production.Document (Title, Revision)
INCLUDE (Filename)
 
where Filename is a nvarchar(400) column.
 
I'm not at all sure about how you would do this using JDBC commands, though.
 
Has anyone seen this before - I believe the limit also existed on previous
versions of SQL Server - have any other suggestions? 
 
Thanks for your help
 
Jonathan
 
 
__________________________________________ 
Jonathan Carter - Head of Technical Architecture 
Enterprise Architecture Solutions Ltd
__________________________________________

Assess your EA maturity at:
www.enterprise-architecture.com/EAvaluator
__________________________________________
 

_______________________________________________
protege-discussion mailing list
protege-discussion at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-discussion
<https://mailman.stanford.edu/mailman/listinfo/protege-discussion> 

Instructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20080121/adf955c2/attachment.html>


More information about the protege-discussion mailing list