We are looking at using dbtools API to kick off a "live" log backup.
The documentation is all pretty clear and we think we see how to use the DBBackup method and the associated a_backup_db structure (putting the required log file name into member hotlog_filename). However what we can't see is how to later stop the backup when that is needed. Other types of backup just terminate when they are finished, but by its nature the live log backup continues indefinitely.
Obviously we could use a Windows API call to kill the process, but that seems rather crude and maybe runs the risk of a damaged log file?
Is there a clean way of terminating a live log backup process started by the DBBackup method?
asked 07 Jan '16, 10:14
What you need to do is the following:
answered 07 Jan '16, 11:20
It's rude to answer a question with a question, but why would you need to stop (or use) a live backup that is still running?
Generally speaking, a live backup is only "needed" after the database fails, and when the database fails, the live backup stops automatically because it has lost its connection.