How to check the version of oracle provider for ole-db. OraOLEDB.Oracle provider on windows 10 and windows 7 ?
You can use for example tool RegDllView. Search for "OraOLEDB", result could be this:
A simpler approach would be this navigate to your ORACE_HOME\bin
directory and locate file OraOLEDB??.dll
. Check version with right-hand mouse click -> Properties -> Details.
However, you just get the version of the file, it does not necessarily mean that this DLL is also registered and ready for use.
Or use this VBScript:
Option Explicit
Const HKEY_CLASSES_ROOT = &H80000000
Dim Key, strComputer, objRegistry, strPath, arrKeys, fso
Dim strKeyPath, strValueName, strValue, uValue, ver
Set fso = CreateObject("Scripting.FileSystemObject")
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objRegistry.enumKey HKEY_CLASSES_ROOT, "CLSID", arrKeys
For Each key In arrKeys
strKeyPath = "CLSID\" & key
strValueName = "OLEDB_SERVICES"
If objRegistry.GetDWordValue (HKEY_CLASSES_ROOT, strKeyPath, strValueName, uValue) = 0 Then
'get the (Default) value which is the name of the provider
objRegistry.GetStringValue HKEY_CLASSES_ROOT, strKeyPath, "", strValue
If InStr(1, strValue, "OraOLEDB.Oracle", vbTextCompare) > 0 Then
' get expanded location
objRegistry.GetStringValue HKEY_CLASSES_ROOT, strKeyPath & "\InprocServer32", "", strPath
ver = fso.GetFileVersion(strPath)
Wscript.Echo strValue & " @ " & strPath & " -> " & ver
End If
End If
Next
OLE DB provider may exist in 32-bit or/and in 64-bit, so you may execute the script twice:
C:\Windows\System32\cscript.exe Print_OLE.vbs
C:\Windows\SysWOW64\cscript.exe Print_OLE.vbs