SQL @@IO_BUSY Function returns the total time spent on input operations and output operations since SQL Server last started. The syntax behind this is @@IO_BUSY is
@@IO_BUSY
SQL @@IO_BUSY Example
Below code snippet will show you the total amount of time spent on input and output operations since this SQL Server last started.
SELECT @@IO_BUSY AS 'IO Busy Time'
Use @@TIMETICKS to get the Input and output operations time or IO busy time in microseconds. Next, we used the GETDATE() function to see the total IO busy time until today.
SELECT @@IO_BUSY AS 'IO Busy Time', @@IO_BUSY * @@TIMETICKS AS 'IO Busy Time in Microseconds', GETDATE() AS 'As Of Today'