View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
04412Bug reportsInstallationpublic2010-07-06 11:22
Reporterjrowley Assigned Toc_schmitz  
PriorityurgentSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.90b 
Fixed in Version1.90RC2 
Summary04412: Identity insert problems on SQL Server 2008 upgrading from 1.87 to 1.90rc1
Description

Executing.....INSERT INTO lime_questions ( QID, SID, GID, TITLE, QUESTION, QUESTION_ORDER, LANGUAGE, PARENT_QID ) VALUES ( 2009, 49736, 29, 'CL1a', 'Suspicious Mammogram', 1, 'es-MX', 49 )...Failed! Reason: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value for identity column in table 'lime_questions' when IDENTITY_INSERT is set to OFF.
Executing.....INSERT INTO lime_questions ( SID, GID, TITLE, QUESTION, QUESTION_ORDER, LANGUAGE, PARENT_QID ) VALUES ( 49736, 29, 'CL1b', 'Second opinion', 2, 'en', 49 )...Success!
Executing.....INSERT INTO lime_questions ( QID, SID, GID, TITLE, QUESTION, QUESTION_ORDER, LANGUAGE, PARENT_QID ) VALUES ( 2010, 49736, 29, 'CL1b', 'Second opinion', 2, 'es-MX', 49 )...Failed! Reason: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value for identity column in table 'lime_questions' when IDENTITY_INSERT is set to OFF.

After I restored the DB, I set the IDENTITY_INSERT to be ON, but I still got this error. I suspect LS drops tables and rebuilds them.

Thanks.

Steps To Reproduce

run the upgrade scripts

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)8816
I will donate to the project if issue is resolved
BrowserFirefox
Database type & versionMS SQL Server 2008
Server OS (if known)Windows Server 2008
Webserver software & version (if known)IIS 7
PHP Version5.2.11

Users monitoring this issue

There are no users monitoring this issue.

Activities

jrowley

jrowley

2010-06-11 04:18

reporter   ~12214

attached is the v1.87 database for testing.

bobc55

bobc55

2010-06-11 22:22

reporter   ~12217

I have not looked at the backup file yet, but I am guessing by the error message that you have existing records in the lime_questions table.

The column QID is an identity (auto number) column. "set identity_insert on" will turn off the auto number.

Looking at the survey file, It looks like two records have the same ID one for English and the other for Spanish. ID 47 is used for both.

c_schmitz

c_schmitz

2010-06-17 00:31

administrator   ~12237

Thank you for the DB dump. The issue will be fixed in 1.90RC2.

Issue History

Date Modified Username Field Change
2010-06-11 03:58 jrowley New Issue
2010-06-11 03:58 jrowley Status new => assigned
2010-06-11 03:58 jrowley Assigned To => user372
2010-06-11 03:58 jrowley File Added: limesurvey_survey_49736.lss
2010-06-11 04:17 jrowley File Added: ls_backup.bak.gz
2010-06-11 04:18 jrowley Note Added: 12214
2010-06-11 22:22 bobc55 Note Added: 12217
2010-06-16 23:38 c_schmitz View Status public => private
2010-06-17 00:30 c_schmitz File Deleted: ls_backup.bak.gz
2010-06-17 00:30 c_schmitz File Deleted: limesurvey_survey_49736.lss
2010-06-17 00:31 c_schmitz View Status private => public
2010-06-17 00:31 c_schmitz Note Added: 12237
2010-06-17 00:31 c_schmitz Assigned To user372 => c_schmitz
2010-06-17 00:31 c_schmitz Status assigned => resolved
2010-06-17 00:31 c_schmitz Fixed in Version => 1.90RC2
2010-06-17 00:31 c_schmitz Resolution open => fixed
2010-07-06 11:22 c_schmitz Status resolved => closed