Попробуйте этот скрипт, чтобы удалить все записи:
set Oracle_x64=c:\oracle\product\12.1\Client_x64\odp.net
set Oracle_x86=c:\oracle\product\12.1\Client_x86\odp.net
set OraProvCfg_x64=%Oracle_x64%\bin\4\OraProvCfg
set OraProvCfg_x86=%Oracle_x86%\bin\4\OraProvCfg
"OraProvCfg_x64" /action:config /force /product:odpm /frameworkversion:v4.0.30319 /productversion:4.121.1.0 /unset:settings\TNS_ADMIN
"OraProvCfg_x64" /action:config /force /product:odpm /frameworkversion:v4.0.30319 /productversion:4.121.2.0 /unset:settings\TNS_ADMIN
"OraProvCfg_x64" /action:config /force /product:odpm /frameworkversion:v4.0.30319 /productversion:4.122.1.0 /unset:settings\TNS_ADMIN
"OraProvCfg_x64" /action:config /force /product:odpm /frameworkversion:v4.0.30319 /productversion:4.122.18.3 /unset:settings\TNS_ADMIN
"OraProvCfg_x64" /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /productversion:4.121.1.0
"OraProvCfg_x64" /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /productversion:4.121.2.0
"OraProvCfg_x64" /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /productversion:4.122.1.0
"OraProvCfg_x64" /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /productversion:4.122.18.3
"OraProvCfg_x86" /action:config /force /product:odpm /frameworkversion:v4.0.30319 /productversion:4.121.1.0 /unset:settings\TNS_ADMIN
"OraProvCfg_x86" /action:config /force /product:odpm /frameworkversion:v4.0.30319 /productversion:4.121.2.0 /unset:settings\TNS_ADMIN
"OraProvCfg_x86" /action:config /force /product:odpm /frameworkversion:v4.0.30319 /productversion:4.122.1.0 /unset:settings\TNS_ADMIN
"OraProvCfg_x86" /action:config /force /product:odpm /frameworkversion:v4.0.30319 /productversion:4.122.18.3 /unset:settings\TNS_ADMIN
"OraProvCfg_x86" /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /productversion:4.121.1.0
"OraProvCfg_x86" /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /productversion:4.121.2.0
"OraProvCfg_x86" /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /productversion:4.122.1.0
"OraProvCfg_x86" /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /productversion:4.122.18.3
После этого вы можете использовать тот же инструмент для правильной настройки:
set TNS_ADMIN=C:\oracle\network\admin
IF EXIST "%Oracle_x64%\managed\common\Oracle.ManagedDataAccess.dll" "%OraProvCfg_x64%" /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:%Oracle_x64%\managed\common\Oracle.ManagedDataAccess.dll /set:settings\TNS_ADMIN:%TNS_ADMIN%
IF EXIST "%Oracle_x86%\managed\common\Oracle.ManagedDataAccess.dll" "%OraProvCfg_x86%" /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:%Oracle_x86%\managed\common\Oracle.ManagedDataAccess.dll /set:settings\TNS_ADMIN:%TNS_ADMIN%
Обновление
На самом деле вы можете удалить все записи с помощью
set Oracle_x64=c:\oracle\product\12.1\Client_x64\odp.net
set Oracle_x86=c:\oracle\product\12.1\Client_x86\odp.net
set OraProvCfg_x64=%Oracle_x64%\bin\4\OraProvCfg
set OraProvCfg_x86=%Oracle_x86%\bin\4\OraProvCfg
"OraProvCfg_x86" /action:unconfig /product:odpm /frameworkversion:v4.0.30319
"OraProvCfg_x64" /action:unconfig /product:odpm /frameworkversion:v4.0.30319