Some background: I'm migrating my SQL Server DBs to a new machine and I wrote a few Powershell scripts to send/apply full backups and transaction logs asynchronously to the new server, but my question is about tail log backups. Eventually, I need my source DB to be unavailable to users so I can back up the tail log and apply it to the new instance.
What happens to active connections if I do something like this:
Backup-SqlDatabase -ServerInstance $serverInstance -Database $db -BackupAction Log -NoRecovery -Credential $credential -BackupFile $backupFile
Or similarly this:
BACKUP LOG <db> TO DISK = <path> WITH NORECOVERY
If I use the NORECOVERY option, I know my db will be unavailable, but will uncommitted transactions get rolled back immediately or will the db continue with active transactions and refuse new connections?
I'm curious to know what happens here, but I'd greatly appreciate any other relevant advice regarding my process. Thanks in advance!