Cannot perform a backup or restore operation on a transaction

Gian Consiglio 21 Reputation points
2022-07-27T19:44:21.35+00:00

Hello everyone, I have a problem with an algorithm I developed in Python. Basically it sends a query to the sql server that should backup a particular database, but every time I run it, it returns this error:

('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot perform a backup or restore operation on a transaction. (3021) (SQLExecDirectW); [42000] [Microsoft ][ODBC Driver 17 for SQL Server][SQL Server]BACKUP DATABASE is terminating abnormally. (3013)')

With other queries it works normally, except to perform backups or restores. Does anyone know if there is any way around this?

SQL Server | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Tom Phillips 17,781 Reputation points
    2022-07-27T19:49:26.167+00:00
    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.