When I execute this statement through ASP.NET
select cntr_value FROM sysperfinfo
I get this error,
System.Data.SqlClient.SqlException: Invalid object name 'sysperfinfo'.
Any ideas why?
It sounds to me like your connectionstring (the string that points to the database which you are querying) is pointing to a database that does not have a table entitled 'sysperfinfo'|||To add to the previous post some things have changes about sysperfinfo. Try the links below for more. Hope this helps.
sysperfinfo
In SQL Server 2005,sysperfinfo returns abigint value for thecntr_value column. Modify applications that usesysperfinfo to make sure that they can handle thebigint values of thecntr_value column.
In SQL Server 2005,sysperfinfo is a compatibility view. You should use thesys.dm_os_performance_counters dynamic management view instead.
http://msdn2.microsoft.com/en-us/library/ms143179.aspx
http://www.sqlservercentral.com/columnists/jsack/troubleshootingsqlserverwiththesysperfinfotable.asp
|||
Maybe you're in the wrong database, try:
select cntr_value FROM master..sysperfinfo
No comments:
Post a Comment