Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com May 9 '11 at 18:49

This question came from our site for professional and enthusiast programmers.

    
What version of SQL Server are you on? –  Martin Smith May 5 '11 at 13:53
    
sql server 2008 –  lulhuh May 5 '11 at 16:13
    
Ah I thought SQL Server 2008 had multiple threads doing database recovery precisely because of this issue. Although not sure how many of these there are. –  Martin Smith May 5 '11 at 16:14

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.