Timestamps on update scripts
JackAce
Posts: 75 New member
Is there a way to generate the update scripts so that they will PRINT the current GETDATE() or GETUTCDATE() value as each step is being executed?
For example, instead of generating
...you would generate
This would be very useful in determining how long each step of the script is taking.
For example, instead of generating
PRINT N'Dropping [dbo].[MyProcedure]' GO DROP PROCEDURE [dbo].[MyProcedure] GO ...
...you would generate
PRINT CONVERT(NVARCHAR, GETDATE(), 121) + N' - Dropping [dbo].[MyProcedure]' GO DROP PROCEDURE [dbo].[MyProcedure] GO ...
This would be very useful in determining how long each step of the script is taking.
Comments
Redgate Software
That's great.
It's nice to know how long each step takes. We usually manually execute the scripts in a mirrored production environment beforehand and it's critical to identify which steps take a long time.