Navicat连接oracle失败:Error - OCI_INVALID_HANDLE

原因:突然断电或者把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,因此会删除注册等信息,包括数据库连接信息,使用前要导出备份

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值