Error SQL18607 "sp_dbrecovery_order: No databases have user specified recovery order..." - SAP ASE for Business Suite

Symptom

Error below may be seen when using transaction SM21:

[ASE Error SQL18607] sp_dbrecovery_order: No databases have user specified recovery order. All databases will be recovered in database id order.

Cause

Error is just informative. You don't have any recovery order specified, the database server will recover the database in order of their DBIDs.

Resolution

To disable the error, specifiy the SID database with recovery order 1 as below:

1> sp_dbrecovery_order <SID>, 1
2> go

One consideration is preventing user connections while the database is in recovery. 

There are two methods for doing this:

Ø  The first is to disable logins (except sa_role role logins) via the configuration:

use master
go

exec sp_configure 'enable logins during recovery', 0
go

Ø  The alternative would be to use the configurable database recovery order and the previous hard bindings to saptempdb to prevent logins until the SID database was online - and force saptempdb to be the last database online using a script similar to:

use master
go

-- Enforce a database recovery order that ensures the hard binding prohibits user logins until all the databases are recovered.

exec sp_dbrecovery_order 'saptools', 1, null, strict
exec sp_dbrecovery_order '<SID>', 2, null, strict
exec sp_dbrecovery_order 'saptempdb', 3, null, strict
go



Sybase history

Sybase  is a computer software company that develops and sells database management system (DBMS) and middleware products. The company was fo...