Original

You are currently reviewing an older revision of this page.
Go to current version

This section is not meant to be an exhaustive listing of every possible difference but a discussion of the more common issues and how to address them.

The most common differences encountered are replay provider errors.  A replay provider error indicates that when the provider replayed a SQL statement SQL Server returned an error.  In some cases this will indicate a difference that must be fixed.  For example, if the syntax of a command has changed in a new release, some statements may fail.  It is unusual to see these errors if you ran SQL Server Upgrade Advisor because it generally finds syntax changes.  In most cases fixing this type of error is a simple matter of updating your source code to comply with the new syntax,but in some cases the command may have been removed altogether or it may reference system objects that have been changed or removed.  In these situations you may have to come up with an alternate way to accomplish what the old command did or remove it from your source code altogether.  Changing the compatibility level of the database to the previous version will often fix these differences but this should be considered a short term solution.

Another type of replay provider error is caused by environmental differences between the two replay instances.  For example, the command may fail in the Denali environment because the user the command ran as on the replay capture machine does not exist on the Denali server.  This kind or error shows up in the difference viewer as a provider error so you must look at the error message to tell the difference between environmental errors and errors that result from version differences.  In most cases you just need to fix the login to make these work.  When the replay provider runs, it does an Execute As to run the command as the user who ran the command during the playback capture.  In some cases, the user running the playback does not have permissions to impersonate the user or Windows does not allow impersonation.

Another difference occurs when a command fails on both the capture and the playback but the errors generated are different.  This happens commonly because the SQL Server team continually reviews error messages to ensure they are as clear and descriptive as possible.  If the same error number is returned in both replays but the message is different, it is usually safe to ignore the difference.  Very few developers write logic that depends on the text of an error message and if they do, it should be changed to compare error numbers.  A difference that needs to be fixed is one where the error number changes between versions.  This is a rare occurrence but the SQL Server team may have decided to split a single error into multiple errors to make it more obvious what caused the error.  In this case, the error number returned will be different and the code will have to be changed to accommodate the new error number.  If your application will run only on Denali after the upgrade then you can change the application to look for the new error number.  If you need to support both the previous level and Denali you will need to modify the code to accept either error number and handle it correctly.