MyBB Community Forums

Full Version: Locked database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have restored a database with phpLiteAdmin but get message SQLSTATE[HY000]: General error: 6 database table is locked. How can I unlock it?
what is your sqlite version ? if it is a old version then can you get it upgraded & try again ..
The phpLiteAdmin is v1.9.7.1
I'm wondering if there is some sort of lock (in a table) set during a backup and that this is then imported back.
sqlite database server version needs to be checked.
looks like its a strange error - so far could not find relevant documentation to fix.

see also SQLite 'locked' error on 1.8 upgrader (though not directly related)
I restored to my previous version 1.8.7, and after checking it all worked OK, tried to upgrade to 1.8.12 and immediately after selecting upgrade - same problem (database locked). Looks to be same problem as above "SQLite 'locked' error on 1.8 upgrader ".
Hmm. I expect you to try this code:

USE [drc2 ]
GO
ALTER DATABASE [drc2] SET READ_WRITE WITH NO_WAIT
GO

However, if it says SQL database is in use, then use single user mode

ALTER DATABASE [drc2] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

The above instruction will rollback any ongoing query and will bring back the SQL server in single user mode.