略
某局点由于业务需求需要重装iMC,预先通过DBman将数据备份后拷入SSD,后续重装完成后恢复数据失败
查看iMC 的版本:plat E0703
1.查看备份恢复的版本和数据库
版本一致,数据库版本一致(版本高于原先版本也可以)
2.查看发现数据文件在桌面,恢复路径有中文,要求现场工程师将版本路径移至C盘目录
3.收集iMC/dbman/log 文件夹下俩个日志
dbman.log :
2020-06-17 19:36:53 [LOG] [ManualRestoreBase] Begin to manual restore databases. manualType: 0
2020-06-17 19:38:54 [LOG] [ManualRestoreBase] Failed to manual restore databases.
dbman_debug.log:
2020-06-17 19:38:54 [DEBUG] [WriteFile] Write file D:\Program Files\iMC\dbman\bin\dbop.sql.
2020-06-17 19:38:54 [DEBUG] [CDbRestore::ExecRestoreSql] Exec command: osql -b -S127.0.0.1,1433 -dmaster -U"sa" -P"iMC-Install2008" -n -o"D:\Program Files\iMC\dbman\bin\dbop.sql.log" -i"D:\Program Files\iMC\dbman\bin\dbop.sql"
2020-06-17 19:38:54 [INFO] [runCommand] runCommand result FAIL. ret=1, errno=2, WIFEXITED(ret)=1, WEXITSTATUS(ret)=1
2020-06-17 19:38:54 [ERROR] [CDbRestore::ExecRestoreSql] Exec command fail
2020-06-17 19:38:54 [ERROR] [int ReadFile()] Read file D:\Program Files\iMC\dbman\bin\dbop.sql.log fail. //对文件读取失败
2020-06-17 19:38:54 [DEBUG] [CDbRestore::ExecRestoreSql] Exec sql log:
2020-06-17 19:38:54 [INFO] [Remove] Fail to remove file: D:\Program Files\iMC\dbman\bin\dbop.sql.log
2020-06-17 19:38:54 [DEBUG] [Remove] Remove file: D:\Program Files\iMC\dbman\bin\dbop.sql
2020-06-17 19:38:54 [ERROR] [CDbRestore::RestoreOneLocalDBase] Fail to restore `C:\slave\127.0.0.1@config_db_imc_config_db_20200617_140945_full.db".
2020-06-17 19:38:54 [ERROR] [CDbRestore::RestoreDatabaseList] Fail to restore DB file in RestoreOneDBase Function 127.0.0.1@config_db_imc_config_db_20200617_140945_full.db
2020-06-17 19:38:54 [INFO] [ManualRestoreBase] req asn msg:{ -- SEQUENCE --
iErrCode "f6"H --
,
iContent "636f6e6669675f64623b3132372e302e302e31"H -- "config_db;127.0.0.1" --
}
2020-06-17 19:38:54 [INFO] [sendTrapAlert] Send trap success
2020-06-17 19:38:54 [ERROR] [ManualRestoreBase] Failed to manual restore databases. ManualType: 0
2020-06-17 19:38:54 [ERROR] [response_err_code] errCode = -10
2020-06-17 19:38:54 [INFO] [ManualRestoreBase] Begin start service.
2020-06-17 19:39:30 [INFO] [ManualRestoreBase] End start service.
目前可以确定是恢复时读取问题
windows系统杀掉后台DBman进程,然后以管理员身份运行即可。
另外如果有杀毒软件建议卸载杀毒软件进行测试
解释:
Windows环境经常遇到,应该就是dbman进程启动的时候没有获取写文件的权限
正常启动时会去校验读写,较小概率会出现读写未校验的情况致使后续不能进行读操作
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作