Tuesday, September 24, 2013

Dealing With the 8k SQL Server Row Limits in Microsoft Dynamics CRM

Once or twice I have run into a CRM implementation in the course of my work that runs afoul of SQL Server's 8k row limit.  SQL Server has always had a limitation to how big a row in a table can be and SQL Server DB admins and database designers have long had to deal with.  For many applications you have options by using specific datatypes and other constructs to be able to work around these limits, but for CRM you do not have any control over the schema directly, and any kind of manual change would definitely be unsupported.

You can tell if you run afoul with this issue, it will throw a MSSQLSERVER ERROR 576.

There are things you can consider when though when designing your CRM entity structure that will help you get around these issues.   You can also apply many of these same principals in re-design after the fact to help get the problem back under control.

Here they are:

1. Look for entities that could be broken out into 1-M relationships

Maybe you don't need all of those fields in the same entity.  Look for entities that can be broken out into their own entities within the system.  This will alleviate the number of rows and over all  length of the table.

2. Shorten your columns

Don't use a bunch of space if you don't need to for fields.  Give your self enough room, but not so much room that you will never possibly use it all.

3. Look to see if there are fields you don't need

If there are fields in your source system that you know you never use, don't migrate them to the new system.  also if you find that there are unneeded columns in your Dynamics CRM system already, delete them.

4.  Look to see if there is any other logical way to break up your entity into multiple entities.

Maybe you don't have clear cut 1-M relationships all in the same table but maybe you are modeling something that is really more of a 1-1 relationship in your entity design.  Maybe you combined these at first for simplicity's sake, but breaking these out could also help if you are running up against this limitation.

Conclusion

Again, this is not a really terribly common issue in CRM implementations, or it hasn't been in my experiencem but if you run into this you will know that there are ways to work around this.

I also know this list probably isn't exhaustive, so feel free to add more things in the comments.

-

3 comments:

  1. OK so it could be interesting to see what's going to happen in CRM 2013 when extension base and base get merged together - has the 8K limits been updated or worked around somehow... (;-)

    ReplyDelete
    Replies
    1. Nope, still and issue, and it will be more complex with the tables coming together. These steps above are only to help manage.

      Delete
  2. I came to this blog and it helped me to add few new points to my knowledge. Actually, I am trying to learn new thing wherever I find. Impressive written blog and valuable information shared here.
    HPE MSA1040 Dual Controller

    ReplyDelete