Does anyone know how to find Batch Requests/Sec on particular database (database specific, not server level)?
This is how to find Transactions/Sec on a particular database.
DECLARE @Counter bigint
SELECT @Counter = cntr_value FROM sys.dm_os_performance_counters
WHERE counter_name = 'Transactions/sec'
AND object_name='SQLServer:Databases'
AND instance_name ='VirendraTest' -- Your DB Name
-- Wait for 1 second
WAITFOR DELAY '00:00:01'
SELECT cntr_value = @Counter FROM sys.dm_os_performance_counters
WHERE counter_name ='Transactions/sec'
AND object_name ='SQLServer:Databases'
AND instance_name ='VirendraTest' -- Your DB Name
Best Answer
'Batch Requests/Sec' is a server-level counter, not available for individual database instances. Keep in mind that single batch can access multiple databases.
You can get an aggregated count of batches and RPCs executed per database with an XE trace with a histogram target like the below example. This will count only the context database where the batch was executed, not all databases touched by the batch.