upgrade causes database lock

upgrade causes database lock

by Tony O'Rourke -
Number of replies: 1

I am trying to upgrade from 2.2.2 to 2.4.3 on Windows IIS7 and SQL Server 2008 R2 using version 2 of the sqlsrv driver.

When I start the upgrade process it pretty much gets stuck right away without any log messages. I turned on Sql Server tracing to see what commands are being sent to the server. I think what is happening is that the upgrade process is running queries that step on each other's toes.

I can see that the following two queries are started but never come back. When I try to run them directly against the db they also hang indefinitely.

SELECT id, course, sequence FROM mdl_course_sections ORDER BY course, id

UPDATE mdl_course_sections SET course = '2',sequence = N'' WHERE id = '2'

Any thoughts on how to proceed?

Thanks much!

 

Average of ratings: -
In reply to Tony O'Rourke

Re: upgrade causes database lock

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

A query, run directly on the database, should not hang. It should either error out or complete. Are you sure that they have hung? I don't know anything about MSSQL - can you see if the query is still clocking up time? Some upgrade processes can take hours.