Open Windows Causing Locks After Sproc has Completed I had a query that was being blocked. Ran sp_whoisactive @ get_locks=1 and identified the blocking query and it's owner. The result indicated the table had been locked for over four hours. The developer stated it was a stored procedure that she executed and it completed in 21 seconds. She still had the SSMS window open for the stored procedure. As soon as she closed the window the lock was released. I've never seen a completed stored procedure retain the lock simply because the window had not been closed. I've researched, but have been unable to find anything similar to this issue. The stored procedure basically Selects records into a temp table and then UPDATES another table and sets a flag if there is a bad address detected.
Is this standard behavior? Is there a setting that can be changed so this does not happen?
It's SQL Server 2019. SSMS v 18.
Is this standard behavior?

No.  There was either a transaction started before the stored procedure ran, or the session was running with SET IMPLICIT_TRANSACTIONS ON, which can be set to default for SSMS query windows.
In any case if the session was blocking with no query running, it had an open transaction.