May 6, 2009 at 8:29 am
Hi,
I am looking for a ddl trigger that will trigger when a new db is created. Once the db is created, it will schedule a job to back up every night? I have seen something quite similar but it wasn't quite what I was looking for.
Thanks
J
May 6, 2009 at 8:57 am
What didn't work for you? I'd like to see you do some work here rather than just give you the answer.
A few hints: script the backup job (meaning the creation of the job). you will then execute that script as part of a procedure that takes a parameter of the db name. Call that proc from the DDL trigger.
May 6, 2009 at 10:04 am
I've had a look and I don't think this is what I'm looking for. I'll need to look into this more to find out what I want from my end result.
May 6, 2009 at 10:16 am
I wouldn't use a DDL trigger for this. I'd have a backup job that looks for what databases I have and backs them up. Set it up once and you're done.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply