Is there a way to see what locks a stored procedure obtains?
Stored procedures don't acquire locks. Queries do. But you can't really detect which query obtained a lock. You can only see which session/transaction is holding a lock.