Timestamps on update scripts

JackAceJackAce Posts: 75 New member
edited September 14, 2011 4:07PM in SQL Compare Previous Versions
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
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

  • Thanks for your post. I've had a look and couldn't see this already requested so I've added an enhancement request for it to be investigated.
    Systems Software Engineer

    Redgate Software

  • JackAceJackAce Posts: 75 New member
    Thanks for your post. I've had a look and couldn't see this already requested so I've added an enhancement request for it to be investigated.

    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.
Sign In or Register to comment.