Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70260

Backing up courses with SCORM package with SQL Server 2019 causes lock in DB

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 3.7.9, 3.8.6, 3.9.3, 3.10
    • Backup, Course, SCORM
    • Database Server:
      Microsoft SQL Server 2019
    • Microsoft SQL
    • MOODLE_310_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE

      The experience had here is the same as MDL-57698

      I only ran into the issue when upgrading to SQL Server 2019.

      This is the error thrown after killing the process once it locks:

      Debug info: SQLState: HY000<br>
      Error Code: 0<br>
      Message: [Microsoft][ODBC Driver 17 for SQL Server]Unspecified error occurred on SQL Server. Connection may have been terminated by the server.<br>
      SQLState: HY000<br>
      Error Code: 596<br>
      Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot continue the execution because the session is in the kill state.<br>
      SELECT 'x' FROM #mdl_backup_ids_temp WITH (NOLOCK) WHERE backupid = N'bd67803fedb82d760e80b9d767d5b9a9' AND itemname = N'filefinal' AND itemid = '19727' ORDER BY 1 OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
      [array (
       0 => 'bd67803fedb82d760e80b9d767d5b9a9',
       1 => 'filefinal',
       2 => '19727',
      )]
      Error code: dmlreadexception
      Stack trace: * line 486 of \lib\dml\moodle_database.php: dml_read_exception thrown
      * line 324 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
      * line 431 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
      * line 896 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
      * line 1902 of \lib\dml\moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
      * line 1887 of \lib\dml\moodle_database.php: call to moodle_database->record_exists_sql()
      * line 1871 of \lib\dml\moodle_database.php: call to moodle_database->record_exists_select()
      * line 169 of \backup\util\dbops\backup_structure_dbops.class.php: call to moodle_database->record_exists()
      * line 1769 of \backup\moodle2\backup_stepslib.php: call to backup_structure_dbops::move_annotations_to_final()
      * line 34 of \backup\util\plan\backup_execution_step.class.php: call to move_inforef_annotations_to_final->define_execution()
      * line 181 of \backup\util\plan\base_task.class.php: call to backup_execution_step->execute()
      * line 222 of \backup\moodle2\backup_activity_task.class.php: call to base_task->execute()
      * line 178 of \backup\util\plan\base_plan.class.php: call to backup_activity_task->execute()
      * line 119 of \backup\util\plan\backup_plan.class.php: call to base_plan->execute()
      * line 337 of \backup\controller\backup_controller.class.php: call to backup_plan->execute()
      * line 100 of \admin\cli\backup.php: call to backup_controller->execute_plan()

            Unassigned Unassigned
            matt_ovitraders Matthew Sawatzky
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.