First, let me preface this by saying that I can recompile web apps without disrupting an ASP.NET web app, because I don't use session state and IIS gives the old app domain 90 seconds to finish, while sending new requests to a new worker process when it recycles an app domain.
On the other hand, when I deploy a database assembly to SQL Server 2008, I've noticed that it becomes unavailable for a few seconds. Web apps that try to connect to it get errors on the connection (perhaps it times out or just immediately throws an error on any active connections or commands) while the app domain within SQL Server is reloaded.
Is there any way to prevent this? Does SQL Server just purposely throw errors when this kind of thing is going on, because it's a technically challenging situation to handle properly, or is it more likely some timeout on the connection or command that could be increased to resolve it?
Side Note: I'm not asking for suggestions like complicating the architecture and adding redundant systems. This is a simple development issue where I'd like to be able to sneak in a quick deployment without risking disrupting any users. It's just a couple seconds of downtime I'd like to be able to avoid.