View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09869Bug reportsSurvey editingpublic2016-02-05 19:01
Reporterrola Assigned Toc_schmitz  
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Summary09869: Error on Survey Activation "There is already an object named 'PRIMARY' in the database"
Description

Hi,

i receive below error after trying Activate a survey.

CDbCommand failed to execute the SQL statement: SQLSTATE[42S01]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]There is already an object named 'PRIMARY' in the database.

Steps To Reproduce

after creating multiple surveys and upgrading from build no. 150629 to 150831

  1. deactivate survey A.
  2. reactivate survey A.
  3. deactivate survey B.
  4. reactivate survey B here you will receive mentioned error .
Additional Information

each time a response table get created a constrain called 'PRIMARY' on id column get created too.

first time activation will succeed , but the next time it will fail due to duplication in constraint name .

it could be related to below method in application/helpers/admin/activate_helper.php

Yii::app()->db->createCommand()->addPrimaryKey('PRIMARY', '{{survey_'.$iSurveyID.'}}', 'id');

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-02-05 18:29

developer   ~34634

Can you provide LimeSUrvey version and build number ?

c_schmitz

c_schmitz

2016-02-05 19:01

administrator   ~34639

Please update to the latest 2.06 where this issue is resolved.
https://www.limesurvey.org/downloads/category/24-archived-releases?download=1456:limesurvey206plus_build160129zip

Issue History

Date Modified Username Field Change
2015-09-07 11:39 rola New Issue
2016-02-05 08:38 DenisChenu Project Development => Bug reports
2016-02-05 08:38 DenisChenu Category Survey Design => Other issues
2016-02-05 18:28 DenisChenu Category Other issues => Survey design
2016-02-05 18:28 DenisChenu Product Version 2.06 =>
2016-02-05 18:29 DenisChenu Note Added: 34634
2016-02-05 19:01 c_schmitz Note Added: 34639
2016-02-05 19:01 c_schmitz Status new => closed
2016-02-05 19:01 c_schmitz Assigned To => c_schmitz
2016-02-05 19:01 c_schmitz Resolution open => fixed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing