none really, the database is basically in single user mode, only the restore has access.
Which locks are acquired during database restore
Chaitanya Kiran
796
Reputation points
Which lock does SQL Server place during database restore
2 answers
Sort by: Most helpful
-
-
Erland Sommarskog 111.1K Reputation points MVP
2023-10-31T22:47:05.6866667+00:00 Open a query window. Noe the spid in the status bar. Start a restore of a database of some size (so that the restore complete directly).
In a second window run, while the restore is running:
SELECT * FROM sys.dm_tran_locks WHERE request_session_id = <spid in restore window>
This will display the locks taken for the RESTORE.