2

we have hundreds of databases on one sql server instance. After restart sql server takes databases online one by one using default order from sys.databases view. This order use database_id, so first created database in sql server startups first(as I think).. It takes about on minute to bring online all databases.

I had one high priority database which I want to be started up as soon as possible, but unfortunately this database has database_id>1000 (so now it came online in the end of the list.

How can I fix this: change database_id for example, specify priority, inject script which bring online this database first...?

Or the only way is to replace some database with low id with this high priority database(backup->restore..)?

-thanks

MDMarra
  • 100,734
  • 32
  • 197
  • 329

1 Answers1

0

There isn't a way to control the start up order of the databases in any supported manner, so far as I a aware. Do you have the option of installing another instance of SQL Server on that server and migrating the database to it? That would ensure that on system restart it would be started up immediately.

K. Brian Kelley
  • 9,034
  • 32
  • 33