For some maintenance I need to drop a table and recreate it. However, it's possible another process could try to insert into this table during that short period of time. I would like to lock the table so the other process will wait, but that isn't going to work with dropping the table. I'd like to acquire a database lock for the (short) duration of this process so the other process will just wait, but I cannot figure out how to acquire one intentionally.
(This is 2005 and above if that matters)