Each time you restart Adaptive Server—for example, after a power failure, an operating system failure, or the use of the shutdown command—it automatically performs a set of recovery procedures on each database.
The recovery mechanism compares each database to its transaction log. If the log record for a particular change is more recent than the data page, the recovery mechanism reapplies the change from the transaction log. If a transaction was ongoing at the time of the failure, the recovery mechanism reverses all changes that were made by the transaction.
When you start Adaptive Server, it performs database recovery in this order:
Recovers master
Recovers sybsystemprocs
Recovers model
Creates tempdb (by copying model)
Recovers sybsystemdb
Recovers sybsecurity
Recovers user databases, in order by sysdatabases.dbid, or according to the order specified by sp_dbrecovery_order. See below for more information about sp_dbrecovery_order.
Users can log in to Adaptive Server as soon as the system databases have been recovered, but they cannot access other databases until they have been recovered.