- Posts: 5
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Survey activation failed due to database error
- limepl
- Topic Author
- Offline
- New Member
LimeSurvey:3.25.19 210323apache 2.4 (Linux)
php 7.4.16
MSSQL 2019 ("15.00.2080"), "DriverName": "libmsodbcsql-17.7.so.1.1", "DriverODBCVer": "03.52"
Attempt to activate survey ends with sql error
Some survey activation works fine. Some don't. No additional errors with debuglog on.SQL: SQLSTATE[42S01]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]There is already an object named 'lime_survey_296632' in the database.. The SQL statement executed was: CREATE TABLE [lime_survey_296632] (
[id] int IDENTITY PRIMARY KEY NOT NULL,
[token] nvarchar(35) COLLATE SQL_Latin1_General_CP1_CS_AS NULL,
[submitdate] datetime NULL,
[lastpage] int NULL,
[startlanguage] nvarchar(20) NOT NULL,
[seed] nvarchar(31) NULL,
[296632X9X11] nvarchar(1) NULL,
[296632X9X14] nvarchar(1) NULL,
[296632X9X10SQ001] nvarchar(5) NULL,
[296632X9X10SQ002] nvarchar(5) NULL,
[296632X9X10SQ003] nvarchar(5) NULL,
[296632X9X10SQ004] nvarchar(5) NULL,
[296632X9X10SQ005] nvarchar(5) NULL,
[296632X9X12] decimal (30,10) NULL,
[296632X9X13] nvarchar(1) NULL,
[296632X9X15] nvarchar(1) NULL,
[296632X9X16] nvarchar(max) NULL,
[296632X9X17] nvarchar(1) NULL,
[296632X9X18] nvarchar(1) NULL
)
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13620
- Thank you received: 2488
I have such issue in some of mly setup with one of my broken plugin.
I add this
if($survey->getHasResponsesTable()){ $survey->active = 'Y'; $survey->save(); $aData['aSurveysettings']['active'] = 'Y'; }
At this line : github.com/LimeSurvey/LimeSurvey/blob/9b...surveyadmin.php#L845
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
- limepl
- Topic Author
- Offline
- New Member
- Posts: 5
- Thank you received: 1