Every time Adaptive Server is stopped and restarted, recovery is performed automatically on each database. Automatic recovery is discussed in detail in Chapter 27, “Developing a Backup and Recovery Plan.”
After recovery is complete, the new sort order and character set definitions are loaded.
If you have changed the sort order, Adaptive Server switches to single-user mode to allow the necessary updates to system tables and to prevent other users from using the server. Each system table with a character-based index is automatically checked to see if any indexes have been corrupted by the sort order change. Character-based indexes in system tables are automatically rebuilt, if necessary, using the new sort order definition.
After the system indexes are rebuilt, character-based user indexes are marked “suspect” in the sysindexes system table, without being checked. User tables with suspect indexes are marked “read-only” in sysobjects to prevent updates to these tables and use of the “suspect” indexes until they have been checked and, if necessary, rebuilt.
Next, the new sort order information replaces the old information in the area of the disk that holds configuration information. Adaptive Server then shuts down so that it starts for the next session with a complete and accurate set of system information.