如何检查 ole-db 的 oracle 提供程序的版本。 OraOLEDB.Oracle 供应商
How to check the version of oracle provider for ole-db. OraOLEDB.Oracle provider
如何检查 ole-db 的 oracle 提供程序的版本。 OraOLEDB.Oracle windows 10 和 windows 7 上的提供商?
您可以使用例如工具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 位 or/and 64 位,因此您可能会执行脚本两次:
C:\Windows\System32\cscript.exe Print_OLE.vbs
C:\Windows\SysWOW64\cscript.exe Print_OLE.vbs
如何检查 ole-db 的 oracle 提供程序的版本。 OraOLEDB.Oracle windows 10 和 windows 7 上的提供商?
您可以使用例如工具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 位 or/and 64 位,因此您可能会执行脚本两次:
C:\Windows\System32\cscript.exe Print_OLE.vbs
C:\Windows\SysWOW64\cscript.exe Print_OLE.vbs