Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need help Expand / Collapse
Author
Message
Posted Sunday, February 9, 2014 3:02 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Sunday, April 20, 2014 10:08 PM
Points: 30, Visits: 158


Hi All,

i am creating Trigger in MSDB as mentioned below

but after restoring the db Trigger not firing ,no records are inserting in Temp table

please let me know wat is the issue or else any alternative solution


create trigger TRG_restore
on restorehistory
after insert
as
insert into Temp(DBname) select destination_database_name from inserted


thanks
Post #1539556
Posted Sunday, February 9, 2014 9:41 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, October 16, 2014 6:18 PM
Points: 3,952, Visits: 7,170
1. Have any "new" records been inserted into the RestoreHistory table since they database was restored?
2. Try dropping and re-creating the trigger


______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience"
Post #1539573
Posted Monday, February 10, 2014 10:22 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Sunday, April 20, 2014 10:08 PM
Points: 30, Visits: 158
yes when ever bkp restoring records are inserting
Post #1539862
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse