<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SQL Server and index key size limit of 900 bytes in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/sql-server-and-index-key-size-limit-of-900-bytes/m-p/206166#M159296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just ran a fresh install of a process engine database of version 5.16.1 to a MS Sql Server (2012).&amp;nbsp; The create-engine script ran with the following warning…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;(1 row(s) affected)&lt;BR /&gt;&lt;BR /&gt;(1 row(s) affected)&lt;BR /&gt;&lt;BR /&gt;(1 row(s) affected)&lt;BR /&gt;Warning! The maximum key length is 900 bytes. The index 'ACT_UNIQ_PROCDEF' has maximum length of 1024 bytes. For some combination of large values, the insert/update operation will fail.&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;It appears the index in question is from this uniqueness constraint:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;alter table ACT_RE_PROCDEF&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add constraint ACT_UNIQ_PROCDEF&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unique (KEY_,VERSION_, TENANT_ID_);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The data types on the constraint are nvarchar(255), int, and nvarchar(255), for KEY_, VERSION_, and TENANT_ID_, respectively.&amp;nbsp; Their data storage adds up as follows:&amp;nbsp; 2*255 + 4 + 2*255 = 1024.&amp;nbsp; Oops!&amp;nbsp; So, it sounds like there will be trouble if a Tenant_ID more than 193 characters long is provided to a SQL Server database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am tempted to "fix" the script, but I have no idea what that might break.&amp;nbsp; I don't plan on using the tenant_id, or at least, with values that long anyway.&amp;nbsp; Something to consider if you see the same error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2014 21:10:31 GMT</pubDate>
    <dc:creator>gregdavisfromnj</dc:creator>
    <dc:date>2014-09-04T21:10:31Z</dc:date>
    <item>
      <title>SQL Server and index key size limit of 900 bytes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/sql-server-and-index-key-size-limit-of-900-bytes/m-p/206166#M159296</link>
      <description>I just ran a fresh install of a process engine database of version 5.16.1 to a MS Sql Server (2012).&amp;nbsp; The create-engine script ran with the following warning…(1 row(s) affected)(1 row(s) affected)(1 row(s) affected)Warning! The maximum key length is 900 bytes. The index 'ACT_UNIQ_PROCDEF' has maximu</description>
      <pubDate>Thu, 04 Sep 2014 21:10:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/sql-server-and-index-key-size-limit-of-900-bytes/m-p/206166#M159296</guid>
      <dc:creator>gregdavisfromnj</dc:creator>
      <dc:date>2014-09-04T21:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server and index key size limit of 900 bytes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/sql-server-and-index-key-size-limit-of-900-bytes/m-p/206167#M159297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for reporting this. However the chance that this becomes an issue is quite small, because tentant ids are often not that large.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 18:59:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/sql-server-and-index-key-size-limit-of-900-bytes/m-p/206167#M159297</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-09-08T18:59:32Z</dc:date>
    </item>
  </channel>
</rss>

