【问题标题】:How to check the version of oracle provider for ole-db. OraOLEDB.Oracle provider如何检查 ole-db 的 oracle 提供程序的版本。 OraOLEDB.Oracle 提供者
【发布时间】:2019-01-23 12:10:43
【问题描述】:

如何检查 ole-db 的 oracle 提供程序的版本。 Windows 10 和 Windows 7 上的 OraOLEDB.Oracle 提供程序?

【问题讨论】:

  • 与Oracle客户端版本相同——否则提供者不起作用。

标签: oracle oledb


【解决方案1】:

您可以使用例如工具RegDllView。搜索“OraOLEDB”,结果可能是这样的:

更简单的方法是导航到您的ORACE_HOME\bin 目录并找到文件OraOLEDB??.dll。用鼠标右键检查版本 -> 属性 -> 详细信息。

但是,你只是拿到了文件的版本,并不一定意味着这个DLL也被注册了,可以使用了。

或者使用这个 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 提供程序可能存在于 32 位或/和 64 位中,因此您可以执行两次脚本:

C:\Windows\System32\cscript.exe Print_OLE.vbs
C:\Windows\SysWOW64\cscript.exe Print_OLE.vbs

【讨论】:

    猜你喜欢
    • 2014-11-13
    • 1970-01-01
    • 1970-01-01
    • 2017-12-20
    • 2016-11-03
    • 2017-12-02
    • 1970-01-01
    • 1970-01-01
    • 2022-01-15
    相关资源
    最近更新 更多