Viewing post 1 (of 1 total)
You could try:
CREATE TRIGGER [dbo].[PostDBRestore]
ON [msdb].[dbo].[restorehistory]
FOR INSERT
AS
SET NOCOUNT ON
DECLARE @DBName AS VARCHAR(256)
DECLARE @User AS VARCHAR(256)
SELECT @DBName = destination_database_name
, @User = user_name
FROM INSERTED
IF @DBName = 'YourDB' ....
SET NOCOUNT OFF
November 24, 2009 at 11:40 am
Viewing post 1 (of 1 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy