Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Database Update from 1.92 to 3.20.2 failed

  • BB2oo6
  • BB2oo6's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago - 4 years 4 months ago #191575 by BB2oo6
Hi Guys,

I want to bring the old version up to date.

I can not upgrade the database or I get interrupted with an error message.

CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The index 'lime_questions_questions_idx4' is dependent on column 'type'.. The SQL statement executed was: ALTER TABLE [lime_questions] ALTER COLUMN [type] nvarchar(1) NOT NULL


Systemconfig:
OS: Windows Server 2016
Webserver: IIS 10
PHP: 7.3
MSSQL: 11.0.7469.6

DEBUG LOG
Code:
 
C:\inetpub\wwwroot\umfrage.xxxx\framework\db\CDbCommand.php(358)
 
346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349 
350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351             $message=$e->getMessage();
352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354 
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
357 
358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360         }
361     }
362 
363     /**
364      * Executes the SQL statement and returns query result.
365      * This method is for executing an SQL query that returns result set.
366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368      * them in this way can improve the performance. Note that if you pass parameters in this way,
369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370      * Please also note that all values are treated as strings in this case, if you need them to be handled as
Code:
Stack Trace
#0   
+
 C:\inetpub\wwwroot\umfrage.xxxx\framework\db\CDbCommand.php(1445): CDbCommand->execute()
#1   
+
 C:\inetpub\wwwroot\umfrage.xxxx\application\helpers\update\updatedb_helper.php(3977): CDbCommand->alterColumn("{{questions}}", "type", "string(1) NOT NULL")
#2   
+
 C:\inetpub\wwwroot\umfrage.xxxx\application\helpers\update\updatedb_helper.php(746): alterColumn("{{questions}}", "type", "string(1)", false, ...)
#3   
+
 C:\inetpub\wwwroot\umfrage.xxxx\application\helpers\update\update_helper.php(31): db_upgrade_all(156)
#4   
+
 C:\inetpub\wwwroot\umfrage.xxxx\application\controllers\admin\databaseupdate.php(40): CheckForDBUpgrades("yes")
#5   
 unknown(0): databaseupdate->db("yes")
#6   
+
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\actions\CAction.php(109): ReflectionMethod->invokeArgs(databaseupdate, array("yes"))
#7   
+
 C:\inetpub\wwwroot\umfrage.xxxx\application\core\Survey_Common_Action.php(83): CAction->runWithParamsInternal(databaseupdate, ReflectionMethod, array("r" => "admin/databaseupdate/sa/db/continue/yes", "sa" => "db", "continue" => "yes"))
#8   
+
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CController.php(308): Survey_Common_Action->runWithParams(array("r" => "admin/databaseupdate/sa/db/continue/yes", "sa" => "db", "continue" => "yes"))
#9   
+
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CController.php(286): CController->runAction(databaseupdate)
#10   
+
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CController.php(265): CController->runActionWithFilters(databaseupdate, array())
#11   
+
 C:\inetpub\wwwroot\umfrage.xxxx\application\controllers\AdminController.php(158): CController->run("databaseupdate")
#12   
+
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CWebApplication.php(282): AdminController->run("databaseupdate")
#13   
+
 C:\inetpub\wwwroot\umfrage.xxxx\framework\web\CWebApplication.php(141): CWebApplication->runController("admin/databaseupdate/sa/db/continue/yes")
#14   
+
 C:\inetpub\wwwroot\umfrage.xxxx\framework\base\CApplication.php(185): CWebApplication->processRequest()
#15   
+
 C:\inetpub\wwwroot\umfrage.xxxx\index.php(194): CApplication->run()

Can you help me??

Bye
Dome
Last edit: 4 years 4 months ago by BB2oo6.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago - 4 years 4 months ago #191576 by holch
Replied by holch on topic Database Update from 1.92 to 3.20.2 failed
I am not surprised.

In between these two main versions were two other main versions (2.06 LTS and 2.7x).

It is a little bit like updating straight from Windows 98 to Windows 10. Won't work...

You probably have to go in steps. Go from 1.9x to 2.06 LTS. From there you could try to go to 3.0, but you might want to make a stop via 2.7 first...

Of course IIS and MSSQL add another level of "problems". LS is mostly tested on LAMP environments, and from time to time MSSQL specific problems appear.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 4 years 4 months ago by holch.
The following user(s) said Thank You: DenisChenu, cdorin, HHouston03
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose