Welcome to the LimeSurvey Community Forum

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

FIXED: URGENT: SQL Error

  • marcgold
  • marcgold's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 4 months ago #221555 by marcgold
URGENT: SQL Error was created by marcgold
Hi  

I Have an urgent issue that has just happened.  And I have no idea what has caused this.
Using Plesk server and run a system update earlier from 18.0.38 to 18.0.39 - Although I doubt this is related.
I also had a large number of old surveys which I deleted.   approx 300.

Everything was fine and working well.  Until all of a sudden I experienced a Server 500 error...   Eek.   Not a problem, I thought as I was doing some updates I had a Backup from an hour earlier so just restored the database and everything started to work again.   

Been working fine for a few hours, then all of a sudden - it happened again.   I have changed nothing - I know famous last words - but i really havent.   I have live surveys running on this server and they have been accessing no problem .... Until Now.

If I try and log in i get the login screen but when I do login I get: 500: Internal Server Error CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.language' in 'where clause'
If I try and access a public survey i get in the browser: Couldn't get group list SELECT * FROM `{{groups}}` WHERE sid=3737 AND language='en' ORDER BY group_order 

HELP!!!  Any Idea's
DB is Maria and I have tried a DB repair - no issues found


LS is the latest 3.27.23  

Marc 
The topic has been locked.
  • marcgold
  • marcgold's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
2 years 4 months ago #221560 by marcgold
Replied by marcgold on topic FIXED: URGENT: SQL Error
Problem Solved.... And I am ashamed to say it was a rookie mistake that caused the issues in the first place.

But not to proud to openly admit it.... Im going to tell you all what I did in the hope that it helps someone else avoid what I did that is also overworked and not 100% concentrating on the task at hand.
  1. Backup up Codebase and DB (of course).
  2. Copied the live LS instance into a new one, to test the upgrade path to V5.
  3. Create a brand new Database and imported the live data to the new database.
  4. (FORGOT to update config.php to the new database   DOH!!  (<- DON'T EVER DO THIS)
  5. Run the update on the new site and totally screwed the live instance database.
5 Hours trying to figure out what I had done wrong - and then it dawned on me.  Oh well could have been a lot worse 
And who said you cant teach old dogs new tricks, or even old tricks - LOL
The following user(s) said Thank You: holch
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose