Die Zeit für die Ausführung einer Stored Procedure messen:
DECLARE @DatB DateTime
Set @DatB = (Select convert(datetime, substring(convert(varchar,getdate(),121),1,50), 21))
Select @DatB
..... ToDo .....
DECLARE @DatE DateTime
Set @DatE = (Select convert(datetime, substring(convert(varchar,getdate(),121),1,50), 21))
Select @DatE
SELECT DATEDIFF(ms, @DatB, @DatE) AS NewDate