Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transaction Log Backup job failing

Status
Not open for further replies.

bikerboy718

Programmer
Feb 11, 2005
195
US
I am running into an issue that I hope someone can shed some light on. I have a job that backs up the transaction logs every 30 min. When a new database is added the transaction log backup job fails because the new database does not have a corresponding full backup. I was wondering what is the the best way of handling this issue? Our production team creates databases on the server so I do not know when exactly the databases are created but I am alerted with the job fails. I am assuming there is a flag or something that lets the server know if a full backup was ever taken for a database but I cannot find it. If such a flag exists I can have a full database backup taken for that database before trying to backup its transaction log.

Any help would be greatly appreciated.

With Great Power Comes Great Responsibility!!! [afro]

Michael
 
If you are using SS2005, you can get the information from the following two tables:

msdb.dbo.backupset
msdb.dbo.backupfile

Join the two on backup_set_id. You want the logical_name from backupfile and type from backupset. You want to look if type is D if not, then a backup of the data file has not been done.

That should give you a starting point.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top