Cannot perform a backup or restore operation within a transaction

前端 未结 3 1508
一整个雨季
一整个雨季 2020-12-19 15:12

I am using PyODBC to back up my database, using following code:

SQL_command = """
                BACKUP DATABASE [MyDatabase]
                         


        
3条回答
  •  鱼传尺愫
    2020-12-19 15:37

    By default all pyodbc connections start with a transaction.

    You need to turn autocommit on - using the autocommit keyword to the connect function:

    conn.autocommit = true
    

提交回复
热议问题