database disk image is malformed(SqLite报错)


2023-04-06 20:07:21 WARN RG3.BO.Core.Provider.LogConsoleAbstractProvider 【Ws】【bo-app-config】【pushpull.ws.data.services.pro】【推送开始】
【WsKey】【bo-app-config】【owner-smdcm-mkey-bo-app-config】【推送开始】【2023-04-06 20:07:21】
2023-04-06 20:07:21 EROR RG3.DO.Core.DbContext 【smdcm.bo-app-config.manager_detail】【update bo_ws set value=@value,timestamp=@timestamp where id=@id】【{"id":"owner-smdcm-mkey-bo-app-config","timestamp":1680811641759,"value":""}】 Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
   at Microsoft.Data.Sqlite.SqliteCommand.GetStatements(Stopwatch timer)+MoveNext()
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
   at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2858
   at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 581
   at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 452
   at RG3.DO.Core.DbInvoker.ExecuteInvoker(PFGlobalParameter pfParams, BCDbConnection connection, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType, CommandSource commandSource) in C:\0_RG\Code\RG6.PF\rg3-pf\RG3.DO.Core\DbInvoker.cs:line 246

进入sqllite数据库解决

1、C:\0_RG\Code\RG6.PF\rg3-pf\RG3.Web.Host.PaaS\App_Data\DB\smdcm
删除底下数据库

smdcm_bo_ws.db
smdcm_sub_push_bridge.db
smdcm_sub_push_mapper.db

2、进入模板库
C:\0_RG\Code\RG6.PF\rg3-pf\RG3.Web.Host.PaaS\App_Data\DB\Master

rg3_master_sub_push.db
rg3_bo_ws.db

3、复制rg3_bo_ws.db、rg3_master_sub_push.db二个到\DB\smdcm目录
4、复制后的库分别重名

smdcm_bo_ws.db
smdcm_sub_push_bridge.db
smdcm_sub_push_mapper.db

再刷新页面查看控制台是否报错

http://localhost:5775/app/main

文档更新时间: 2023-06-12 09:46   作者:admin