Replacing master.dbo.sysperfinfo with sys.dm_os_performance_counters
What are the differences between dm_os_performance_counters and master.dbo.sysperfinfo?


sys.dm_os_performance_counters is the replacement for sysperfinfo.  Please see this BOL reference on the mapping of system tables to system views/DMVs.  You should be using sys.dm_os_performance_counters.


  Do I need to pull dm_os_performance_counters from the Master context?


No, DMVs (or system catalog views) can be accessed from the context of any database, provided you have the appropriate permissions to view the contents.  The below example for illustration purposes would be just fine:

use NonMasterDatabase;
go

select *
from sys.dm_os_performance_counters;