I want to freeze the I/O of a SQL Server instance like the shadow copy does.
The result should look like this:
2020-01-19 23:11:40.90 spid73 I/O is frozen on database prod. No user action is required. However, if I/O is not resumed promptly, you could cancel the backup.
2020-01-19 23:11:57.89 spid73 I/O was resumed on database prod. No user action is required.
But I want to decide when the I/O is resumed. I tried it myself with a backup, but it finished too fast.
I want to debug my application during this I/O freeze.
How can I achieve this behavio(u)r?
Edit - 2020-01-27 10:53
The purpose is that the SQL Server doesn't accept new connections during this time:
Exception:
Class name: EMSError
Message: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Unit name: OLEDBAccess