Reserved word errors, Missing, truncated, or corrupted source text, Quoted identifier errors – Sybase ADAPTIVE 15.0.2 User Manual
Page 127

CHAPTER 7 Troubleshooting
Installation Guide
111
Reserved word errors
If
dbcc upgrade_object
finds a reserved word used as an object name in a
compiled object, it returns an error, and that object is not upgraded. To fix the
error, either manually change the object name or use quotes around the object
name, and issue the command
set quoted identifiers on
. Then drop and re-create
the compiled object.
For example, suppose you load a database dump from Adaptive Server 11.5
into Adaptive Server 15.0 and the dump contains a stored procedure that uses
the word “lock.” When you run
dbcc upgrade_object
on that stored procedure,
the command returns an error because, although “lock” was not reserved in
version 11.5, it became a reserved word in version 11.9.2. With this advance
notice, you can change the stored procedure and any related tables before they
are used in a production environment.
Missing, truncated, or corrupted source text
If the source text in
syscomments
was deleted, truncated, or otherwise
corrupted,
dbcc upgrade_object
may report syntax errors. If the source text was
not hidden, you can use
sp_helptext
to verify the completeness of the source
text. If truncation or other corruption has occurred, drop and re-create the
compiled object.
Quoted identifier errors
dbcc upgrade_object
returns a quoted identifier error if:
•
The compiled object was created in a pre-11.9.2 version with quoted
identifiers active (
set quoted identifiers on
).
•
Quoted identifiers are not active (
set quoted identifiers off
) in the current
session.
To avoid this error, activate quoted identifiers before running
dbcc
upgrade_object
. When quoted identifiers are active, you must use single quotes
instead of double quotes around quoted
dbcc upgrade_object
keywords.
If quoted identifier errors occur, use the
set
command to activate
quoted
identifiers
, and then run
dbcc upgrade_object
to upgrade the object.