If the query remapping phase fails while you are upgrading your Adaptive Server, the query trees for your stored procedures are out of date and you have to remap them. You know the remapping phase has failed if the following message is written to the upgrade log:
Terminating remapping of query trees due to error_number errors in database database_name.
You encounter Error 2835 (“The
procedure tree is old. Use the sp_remap procedure to remap
all the procedures in this database.”
)
if you try to run a stored procedure whose query tree is out of date.
This section explains how to remap all objects in a database. These objects include stored procedures, triggers, rules, defaults, and views.
If you want to remap a single object use the sp_remap command, as documented in “sp_remap” in the Reference Manual.
Remapping is a two-step procedure:
Run remap_all_script, which is listed below, in a Transact-SQL session and save the output in a file, remapall.out, by issuing this command at your operating system prompt:
% isql -Usa -P < remap_all_script > remapall.out
The file remapall.out contains all objects that need to be remapped.
Run this command at your operating system prompt:
% isql -Usa -P < remapall.out