Applying SQL Server 2008 Database Compression to SAP systems which already ran on SQL Server 2000 RTM and SP1

Lately we had a strange incident when one of our customers for more than 10 years tried to apply SQL Server 2008 Database Compression against the SAP ERP test system. The history of the system is that it first got installed against SQL Server 7.0. The customer was extremely early moving to SQL Server 2000. They also moved very fast to SQL server 2005 and now are in the process of upgrading to SQL Server 2008. Over those years that system saw quite a few SAP release upgrades as well. One of the driving forces for the upgrade was SQL Server 2008 Database Compression. The system is multiple Terabytes in size, so the space savings could be significant and hence investments in storage could be reduced.

As one of their SAP Basis Administrators tried applying ROW Compression for all the tables in the test system, he ran into this failure on SQL Server side:

Msg 21, Level 22, State 1, Line 1
Warning: Fatal error 682 occurred at Feb  4 2009  5:47PM. Note the error and time, and contact your system administrator.

The error occurred while trying to compress the table MARC. So they tried to manually apply ROW compression on the table with this command:

ALTER TABLE tr3.MARC REBUILD WITH (MAXDOP=8, ONLINE=ON, DATA_COMPRESSION = ROW);

Again the same error. Looking deeper into the problem, it figured out that there seemed to be extreme large values in a minor number of rows in the columns GLGMG and VKGLG columns of table MARC. Columns which were not even in use by their SD functionality. The values in those columns were in the Billions (‘Milliarden’ in Germany). Completely unrealistic numbers. After correcting these numbers to the default value of 0.0 everything went fine.

But what was the problem? How did these numbers get into the system. It was Sven, the SAP Basis Administrator who tried to apply compression, who found OSS note #425946 describing exactly what the problem of the big numbers. The problem could have happened with SQL Server 2000 RTM and SP1. So far the effect of the issue only has been seen on table MARC in the two columns GLGMG and VKGLG. Hence not a worry at all for customers whose systems never ran on SQL Server 2000 RTM or SP1. For those people who want to apply Database Compression to SAP systems which did run on SQL Server 2000 RTM or SP1, we would recommend to check the values which are in those 2 columns of table MARC before going ahead with compression.

Thanks a lot to Sven Otromke for working with us and finding the OSS note.