Listing the user-assigned recovery order of databases

To list the recovery order of all databases assigned a recovery order, use:

sp_dbrecovery_order

This generates output similar to:

The following databases have user specified recovery order:
Recovery Order Database Name        Database Id
-------------- -------------------- -----------
    1          dbccdb                   8
    2          pubs2                    5
    3          pubs3                    6
    4          pubtune                  7
The rest of the databases will be recovered in default database id order.

To display the recovery order of a specific database, enter the database name:

1> sp_dbrecovery_order pubs2
2> go
Database Name Database id Recovery Order
 ------------- ----------- --------------
 pubs2             5          2