sql-server - 无法添加 Oracle OLEDB 提供程序的性能计数器

标签 sql-server oracle oledb odp.net performancecounter

在我的服务器上,我使用 SqlClient 连接到 SQL Server,Oledb 用于连接 Oracle 的旧应用程序和 ODP.NET 用于连接 Oracle 的新应用程序。

我在性能计数器中看到:

  • Oracle 的 .NET 数据提供程序
  • 用于 Sql Server 的 .NET 数据提供程序
  • ODP.NET 托管

  • 但是我只能添加和查看用于 Sql Server 和 ODP.NET 的 .NET 数据提供程序的计数器,而用于 Oracle 的 .NET 数据提供程序(我的意思是 System.Data.Oledb )不工作。

    来源:
  • Monitoring OleDbConnection pool

  • The OleDb provider does not expose performance counters.



    那是对的吗?

    最佳答案

    The OleDb provider does not expose performance counters.



    不幸的是,这是真的 .

    但另一方面,您提到的三个提供程序都有性能计数器:
  • 适用于 Oracle 的 .NET 数据提供程序
  • 用于 Sql Server 的 .NET 数据提供程序
  • ODP.NET 托管

  • (1,2) Oracle 的 .NET 数据提供程序和 Sql Server 的 .NET 数据提供程序

    .NET Data Provider for Oracle不是System.Data.OLEDB提供者是 System.Data.OracleClient Provider,它有性能计数器。
    基于 Performance Counters in ADO.NET official documentation :

    ADO.NET 2.0 introduced expanded support for performance counters that includes support for both System.Data.SqlClient and System.Data.OracleClient.



    而在 System.Data.OracleClient Namespace documentation他们提到:

    The System.Data.OracleClient namespace is the .NET Framework Data Provider for Oracle.



    那么,什么是 System.Data.OLEDB?

    引用System.Data.OleDb Namespace official documentation :

    The System.Data.OleDb namespace is the.NET Framework Data Provider for OLE DB.



    在谈论性能计数器时,Microsoft 似乎没有提到与此 Provider 相关的任何内容。

    (3) 用于 .NET 的 Oracle 数据提供程序

    引用Data Provider for .NET Developer's Guide :

    Installing Oracle Data Provider for .NET creates a set of performance counters on the target system. These performance counters are published by ODP.NET for each ODP.NET client application. These performance counters can be viewed using Windows Performance Monitor (Perfmon).



    类似问题链接
  • Can't seem to add sqlclient counters to perfmon
  • 关于sql-server - 无法添加 Oracle OLEDB 提供程序的性能计数器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42221681/

    相关文章:

    sql - 从 Oracle PL/SQL 使用 Web 服务

    c++ - 如何在 C++ 中使用 OLEDB 附加到 MDF 数据库文件?

    C# - UPDATE SET WHERE 查询问题 (OleDb)

    javascript - 从 Access 到 MySQL 的 SQL 查询转换

    oracle - 插入复制不使用触发器

    sql-server - 如何查找包含字符串并将这些值设为 Null 的所有列

    sql - 在 .sql 脚本中定义和使用变量

    ms-access - OleDbCommand 无法执行此命令,为什么?

    c# - 如何在 C# 中使用带有参数化查询的 SqlDataReader?

    sql-server - Sql Server 订单最大值