Microsoft SQL Server Statistics via ODBC

I have an instance of SQL Server that I am trying to verify. In SQL Studio, I can enter

SET STATISTICS TIME ON

and then view the statistics displayed. From C ++ code, I can do something like

SQLExecDirect(hstmt, "SET STATISTICS TIME ON", SQL_NTS);

and then get this statistics through SQLError.

Is there a way to get these statistics when accessing SQL Server over vanilla ODBC. In this case, I use the Ruby connector DBI:ODBC, which works great to connect and run queries, but I could not understand this metafile.

+3
source share
2 answers

, odbc, Sql Server, Sql Profiler ? , , sprocs Sql Server.

+1

dbh.func(:stat)

0

Source: https://habr.com/ru/post/1707718/


All Articles