How does SQL Server Startup? I'm running SQL Server 2008 R2 and have it set to start the service in the background on startup of the machine. When this happens, what is the process that it goes through to startup?

I believe that the master database loads first, but what order do the other databases load in? How is this determined?

EX: I have databases a1,b1,c1. Does a1 load before c1?

How would I go about setting the priority of a database (e.g. load c1 before b1...)?

I'm looking for a behind-the-scenes look into what happens when the program starts, I am not running any queries on it. Thanks.
Ah, after you updated your comment I realized that you were asking about how to start another process after all databases have been restored/loaded. You can configure a stored procedure to be called using the sp_procoption. I am pretty sure that runs after all databases are ready. Next, you just need to invoke your external process via sql server.

"...Execution of the stored procedures starts when all databases are recovered and the "Recovery is completed" message is logged at startup...."