原因:突然断电或者把oracle进程杀掉了(杀掉之后又重启oracle服务后使用navicat连接正常但运行sql报错)
解决:将以下命令保存为.bat脚本文件,运行一下
for /f %%i in ('reg query HKCU\Software\Classes\CLSID') do call:checkDelCLSID %%i
reg delete HKCR\NavicatProfileBackup /f 1>nul 2>nul
reg delete HKCR\NavicatProfileBatchJob /f 1>nul 2>nul
reg delete HKCR\NavicatProfileDataSync /f 1>nul 2>nul
reg delete HKCR\NavicatProfileExport /f 1>nul 2>nul
reg delete HKCR\NavicatProfileImport /f 1>nul 2>nul
reg delete HKCR\NavicatProfileModel /f 1>nul 2>nul
reg delete HKCR\NavicatProfileStructureSync /f 1>nul 2>nul
reg delete HKCR\NavicatProfileTransfer /f 1>nul 2>nul
reg delete HKCU\Software\PremiumSoft /f 1>nul 2>nul
rmdir /S /Q C:%HOMEPATH%\Documents\Navicat
rmdir /S /Q C:%HOMEPATH%\AppData\Local\Temp\NavicatCloud
exit
:checkDelCLSID
echo filtering %1
echo %1|findstr "{CAFEEFAC-" 1>nul 2>nul
set result=%errorlevel%
if %result%==0 goto:eof
echo checking %1
reg query %1\Info 1>nul 2>nul
set result=%errorlevel%
if %result%==1 goto:eof
echo deleteing %1
reg delete %1 /f 1>nul 2>nul
goto:eof
说明:
该脚本文件本用于无限试用navicat,因此会删除注册等信息,包括数据库连接信息,使用前要导出备份