SQL Log backup fails with the SQL8: Database is already open and can only have one user at a time error.
This issue occurs if the database is in the Maintenance mode.
- Download the logs for the backup job. See Logs.
- Extract the log, open the Phoenix<YYYY/MM/DD>-<timestamp>.log file, and search for the following traceback in the logs.
[2020-03-28 21:09:35,184] [ERROR] <_MainThread(MainThread)> Error <class 'vdilib.SqlException'>:Database 'AdventureWorksLT2012' is already open and can only have one user at a time.. Traceback -Traceback (most recent call last):
File "agents\sqlserver\VssHelper.pyc", line 52, in open_vdi_handle
File "agents\sqlserver\VdiHelper.pyc", line 103, in open
File "vdilib.pyx", line 177, in vdilib.PyVdiBackup.PyMountAndTransfer (vdilib_pyx.cpp:2502)
File "vdilib.pyx", line 206, in vdilib.PyVdiBackup.PyCheckError (vdilib_pyx.cpp:2953)
SqlException: Database 'AdventureWorksLT2012' is already open and can only have one user at a time.
- After the maintenance of the database is done, change the status of the database from the Maintenance mode to the Normal mode.
- Perform log backup when the database is in the Normal mode.