DBAmon |
Home |
Index/DBAmon Doc. |
|
DBAmon_Synthetic_Trans_MS: 65This would be read by DBAmon as a synthetic transaction response time of 65 milliseconds.
After you setup the job to collect the response time (below in this document), the entire file will look something like:
Job 'DBAmon - Synthetic_Transaction_1' : Step 1, 'S1' : Began Executing 2012-06-03 21:30:02 Starting at: [SQLSTATE 01000] Jun 3 2012 9:30PM [SQLSTATE 01000] Executing Synthetic Transaction... [SQLSTATE 01000] ===================================== [SQLSTATE 01000] ----------------- 23860003.16 (1 rows(s) affected) SQL Server Execution Times: CPU time = 63 ms, elapsed time = 1594 ms. [SQLSTATE 01000] ===================================== [SQLSTATE 01000] Done with Synthetic Transaction at [SQLSTATE 01000] Jun 3 2012 9:30PM [SQLSTATE 01000] e_time=1593 (MS) [SQLSTATE 01000] DBAmon_Synthetic_Trans_MS: 1593 [SQLSTATE 01000] Done [SQLSTATE 01000] |
The highlighted line above is the only line that DBAmon cares about.
First, you need to decide which application transaction will be your synthetic transaction. You will be running it via T-SQL, so it must be specified will all required parameters, etc.
Create an MSSQL Job with 1 step. The step T-SQL should look like:
PRINT 'Starting at:' declare @s_time DATETIME DECLARE @e_time CHAR(10) set @s_time=getdate() print @s_time PRINT 'Executing Synthetic Transaction...' print '=====================================' set statistics time on select max(value) from dbamon.dbamon.metrics_detail -- THIS IS THE SYNTHETIC TRANSACTION set statistics time off print '=====================================' PRINT 'Done with Synthetic Transaction at' PRINT GETDATE() SET @e_time = RTRIM(CAST(DATEDIFF(MS, @s_time, GETDATE()) AS CHAR(10))) PRINT 'e_time=' + @e_time + ' (MS)' PRINT 'DBAmon_Synthetic_Trans_MS: ' + @e_time PRINT 'Done' |
In the definition of this step, click ADVANCED. For OUTPUT FILE, specify: c:\temp\DBAmon_Synthetic_Trans1.txt and click Append output to existing file. Also click Including Step Output in Job History .
Schedule the job to run at least every 30 minutes. If it runs more than once before the next DBAmon iteration, then the last (most recent) transaction response time will be recorded.