>>>>When and why do you see the need for attaching/detaching databases?
>>>>Regards,
>>>>Viv
>>>
>>>The accountant (= accountant(s) + employees) decides to work on my data today (customer 27, year 2008). If (say) 00027_2008.mdf is not attached, it has to be attached to the sql server instance so he can work on it.
>>>
>>>If another employer wants to work on my data at the same time, the 00027_2008.mdf does not have to be attached since it already is. So he can simply connect to it.
>>>
>>>When the last person is done with 00027_2008.mdf, it has to be detached from the sql server instance [ we are talking about thousands of databases ]
>>
>>Why not leave them all attached?
>
>Thousands ?? and when he has to mail the database (or something the customer can restore) back to the customer ?
Databases per instance of SQL Server : 32767
But I guess it would be a bit cluttered :-{
>
>Mind you, I could have something run at night or regular interval, that detaches all db where ( #connections == 0). But this is only half of the work. It needs to be attached sometime
You could maintain one database with a table of databases to let the accountants select a database to attach and use sp_attach_db.....
>
>[ I think I saw an AutoDetach somewhere when I was fiddling with it last week ]
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only