Your check would make sense after we attempted to open the table. Did we really open it exclusive? This check, however, would not let us know, if the table is opened exclusive somewhere or not...
So, I would probably put this check afterwards as a precaution...
>Yes, but if I try to open the table exclusive using an error handler that sets some flag and it is either not opened or in the case of use table in 0 exclusive again (where it may actually open but in shared mode), this will tell me that I cannot open the table exclusively. I don't really care if someone else has the table exclusively,shared or otherwise, or if it is being used in another data session, this should tell me that I cannot open it exclusively.
>
If it's not broken, fix it until it is.
My Blog