April 6, 2010 at 8:11 pm
Hi,
I run my fulls on Monday, then diff's from Tues - Sun. I am looking on some help on some tsql. If I add a new database on Thursday, the diff job will fail due to no full being available. Is there some kind of logic I can put in to have it check if the full exists, if not, run the full then the diff?
Thanks
April 6, 2010 at 8:59 pm
Query the sys.database_recovery_status system view.
The last_log_backup_lsn column will be NULL for a database that has not had a full back up
to start the log restore sequence.
SELECT database_name = DB_NAME(database_id),
last_log_backup_lsn
FROM sys.database_recovery_status;
April 6, 2010 at 10:47 pm
Thanks, problem solved 🙂
April 6, 2010 at 11:25 pm
Thank you.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply