• I've actually never leveraged sp_getapplock nor even encountered it, and I've seen a lot of databases code. However, I have seen situations where developers have implemented their own concurrent "locking" mechanism that basically does the same thing. The buildin sp_getapplock procedure probably does it better. There are occasions where sp_getapplock would come in handy. For example, if you have a dashboard reporting application for a data warehouse, it would be useful to block the application from accessing the tables while they are being bulk loaded or updated. That would be preferable to relying on SQL Server's row/page/table locking mechanism, especially if developers have implemented NOLOCK hints on all their queries.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho