I am running SQL Server 2008 Upgrade Advisor tool on a SQL Server 2000 DB, and the final report shows an error:

Database Server,"PreUpgrade",
"After upgrade, new reserved keywords cannot be used as identifiers",
"Upgrade Advisor detected an idetifier with name Merge",
"Source Type: Database","Database: Domus","Object Name: crosstab","Object Type: P ",
"Key Word: pivot"

The message is a bit ambiguos for me.... Using the following script, I have searched the keyword 'pivot' and 'Merge' in all tables, however there are no results.

Should I ignore this error?

  • 2
    The error message already calls out that you have the keyword pivot in stored procedure crosstab. Just view the source for that procedure and search for pivot. The script you referenced searches for data in tables, not object definitions.
    – Dan Guzman
    Jun 6, 2019 at 11:47
  • 1
    The script you pointed at is looking for strings in columns, which is just user data and wouldn't cause a problem for any upgrade advisor. You need to look at the definition of that procedure, e.g. USE Domus; SELECT OBJECT_DEFINITION(OBJECT_ID(N'dbo.crosstab')); Jun 6, 2019 at 13:52

1 Answer 1

-- Search for "Merge" identifier in all objects
DECLARE @IdentifierToSearch NVARCHAR(128) = 'Merge';

-- Search in tables
WHERE COLUMN_NAME = @IdentifierToSearch;

-- Search in views, functions, procedures, and triggers
SELECT OBJECT_NAME(object_id) AS ObjectName, definition
FROM sys.sql_modules
WHERE definition LIKE '%' + @IdentifierToSearch + '%';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.