TSQL limits indexes 900 bytes for clustered index and 1700 for non-clustered index. SysName is 256 bytes (NVarChar(128). Three part (Database, Schema, Object) fits in this limitation. Four Part names needed for lower level detail violate the clustered index limit. Examples: columns, index column, parameter, constraint column.
This occurs in the Database Table Column and Database Routine Parameter tables because the all the name fields are carried in the detail table.
The fix is to switch to surrogate keys with indexed views to enforce the natural key. This will be similar to the structure used for Library where each table will have a GUID for the primary index and a second GUID pointing to the parent (Table -> Schema ...). An Indexed view will have a clustered index on the primary index GUID with a non-clustered index with all the component of the natural key.
The application will continue to index on the natural key. This makes the GET and SET functions have the additional complexity as they need to translate the natural key into the internal key.
TSQL limits indexes 900 bytes for clustered index and 1700 for non-clustered index. SysName is 256 bytes (NVarChar(128). Three part (Database, Schema, Object) fits in this limitation. Four Part names needed for lower level detail violate the clustered index limit. Examples: columns, index column, parameter, constraint column.
This occurs in the Database Table Column and Database Routine Parameter tables because the all the name fields are carried in the detail table.
The fix is to switch to surrogate keys with indexed views to enforce the natural key. This will be similar to the structure used for Library where each table will have a GUID for the primary index and a second GUID pointing to the parent (Table -> Schema ...). An Indexed view will have a clustered index on the primary index GUID with a non-clustered index with all the component of the natural key.
The application will continue to index on the natural key. This makes the GET and SET functions have the additional complexity as they need to translate the natural key into the internal key.