View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
04068Bug reportsData Entry (non public)public2010-01-27 22:46
Reporterthozi Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionno change required 
Product Version1.86 
Summary04068: Strange tablename in DB
Description

This is going a bit deeper into the DB table strucutre used by Limesurvey. I'm using LimeSurvey for quiet some time with good success. No problems. I now wanted to backup the database by dumping out SQL. Unfortunately I cannot do this because LimeSurvy somehow and someetime ago created a table with a name in quotes which I now cannot access (e.g. show data) or modified via SQL statements. (Note that I'm not the super expert in SQL. I'm running Limesurvey under MSSQL (not mysql). with Version 1.86 (7697).

So I found a table created which name is
"[lime_tokens_43557]". I cannot rename, delete or whatever do with this table. SQL statements such as the following fail:

EXEC sp_rename '[dbo].["[lime_tokens_43557]"]', 'lime_tokens_43557', 'OBJECT'
GO

How can I delete or rename the table??? What would be the syntax of the SQL Command?

I found other tables called lime_tokens_14213 which work w/o problems. Somehow this problematic tablename was created and now I've trouble to get rid of it. Any ideas ??

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

Users monitoring this issue

There are no users monitoring this issue.

Activities

user372

2010-01-25 13:00

  ~10882

@ c_schmitz: any idea?

c_schmitz

c_schmitz

2010-01-25 13:07

administrator   ~10884

Did you try to use the MSSQL Enterprise Manager to remove it?

thozi

thozi

2010-01-25 13:47

reporter   ~10886

Yes, I tried the SQL Manager 2010 for SQL Server, selected the table and tried to rename or remove and I get the same error.

IT creates the following SQL command but then cannot compile and execute. See below's transcript:

--------------- SQL ---------------

EXEC sp_rename '[dbo].["[lime_tokens_43557]"]', 'lime_tokens_43557', 'OBJECT'
GO

---------- ERROR MESSAGE ----------

Syntax error parsing SQL identifier '[dbo].["[lime_tokens_43557]"]'.

c_schmitz

c_schmitz

2010-01-26 12:58

administrator   ~10897

well, rename may be failing
but what is the error message on removal?

thozi

thozi

2010-01-26 13:05

reporter   ~10898

Ok. tried that as well. Here's the log:
--------------- SQL ---------------

DROP TABLE [dbo].["[lime_tokens_43557]"]
GO

---------- ERROR MESSAGE ----------

Unclosed quotation mark after the character string ']
'.

c_schmitz

c_schmitz

2010-01-26 13:20

administrator   ~10899

Only thing you could try is to export the correct tables,
then drop the database and import the data back again.
Or you can just leave it there ;).
MSSQL should not have allowed to create the table in the first place if it is so sensitive about deletion. (The table was created due to a bug in a dev version quite some time ago).

thozi

thozi

2010-01-26 13:26

reporter   ~10900

That is really bad. The problem is that I cannot export each individual table, only the complete schema (at least in SQL Manager 2010 lite). I'm not a SQL expert how to do this. Trying to export all tables stops when it tries to export the table with the strange name... And then I'm lost.. Anyway, thanks for your suggestions..

Issue History

Date Modified Username Field Change
2010-01-25 11:37 thozi New Issue
2010-01-25 11:37 thozi Status new => assigned
2010-01-25 11:37 thozi Assigned To => user372
2010-01-25 11:37 thozi LimeSurvey build number => 7697
2010-01-25 11:37 thozi Browser => Firefox
2010-01-25 11:37 thozi Database & DB-Version => mssql
2010-01-25 11:37 thozi Operating System (Server) => Windows
2010-01-25 11:37 thozi Webserver => IIS
2010-01-25 11:37 thozi PHP Version => ?
2010-01-25 13:00 user372 Note Added: 10882
2010-01-25 13:01 user372 Assigned To user372 => c_schmitz
2010-01-25 13:07 c_schmitz Note Added: 10884
2010-01-25 13:47 thozi Note Added: 10886
2010-01-26 12:58 c_schmitz Note Added: 10897
2010-01-26 13:05 thozi Note Added: 10898
2010-01-26 13:20 c_schmitz Note Added: 10899
2010-01-26 13:20 c_schmitz Status assigned => resolved
2010-01-26 13:20 c_schmitz Resolution open => no change required
2010-01-26 13:26 thozi Note Added: 10900
2010-01-27 22:46 c_schmitz Status resolved => closed