View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
20281Bug reportsComfortUpdatepublic2025-10-01 10:27
ReporterFredJackson Assigned Togabrieljenik  
PrioritynoneSeveritycrash 
Status assignedResolutionopen 
Summary20281: MSSQL Database Upgrade fail 636 to 637 (LimeSurvey Community 6.15.9 to 6.15.15)
Description

Ran the comfort update to update from 6.15.9 to 6.15.15 and presented with an SQL error when trying to access any surveys/admin.

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Incorrect syntax near 'LIMIT'.

Also tried to manually upgrade the database via cli;

Update sqlsrv:Server=10.174.129.118;TrustServerCertificate=1;Database=limesurvey with prefix :lime_ from 636 to 637
CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Incorrect syntax near 'LIMIT'. in /var/www/html/vendor/yiisoft/yii/framework/db/CDbCommand.php:543
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii/framework/db/CDbCommand.php(415): CDbCommand->queryInternal()
#1 /var/www/html/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(1359): CDbCommand->queryRow()
#2 /var/www/html/application/models/LSActiveRecord.php(72): CActiveRecord->query()
#3 /var/www/html/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(1494): LSActiveRecord->query()
#4 /var/www/html/application/models/Survey.php(1003): CActiveRecord->findByPk()
#5 /var/www/html/application/helpers/common_helper.php(3786): Survey->findByPk()
#6 /var/www/html/application/helpers/update/updatedb_helper.php(3108): fixLanguageConsistency()
#7 /var/www/html/application/helpers/update/updatedb_helper.php(154): fixLanguageConsistencyAllSurveys()
#8 /var/www/html/application/commands/UpdateDbCommand.php(46): db_upgrade_all()
#9 /var/www/html/vendor/yiisoft/yii/framework/console/CConsoleCommandRunner.php(71): UpdateDBCommand->run()
#10 /var/www/html/vendor/yiisoft/yii/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#11 /var/www/html/vendor/yiisoft/yii/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
#12 /var/www/html/application/commands/console.php(77): CApplication->run()

Steps To Reproduce

Steps to reproduce

Comfort update from version 6.15.9 to 6.15.15

Expected result

Successful database upgrade

Actual result

Database did not upgrade and was presented with SQL error.

Thankfully I backed up the previous version and was able to reinstate back to 6.15.9 as business critical

TagsNo tags attached.
Bug heat0
Complete LimeSurvey version number (& build)6.15.9+250826
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMSSQL 2022 (ODBC Driver 18 for SQL Server)
Server OS (if known)
Webserver software & version (if known)
PHP Version8.1.2

Users monitoring this issue

There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-10-01 10:00 FredJackson New Issue
2025-10-01 10:27 tibor.pacalat Assigned To => gabrieljenik
2025-10-01 10:27 tibor.pacalat Status new => assigned