cancel
Showing results for 
Search instead for 
Did you mean: 

Backup creating invalid database file

Former Member
3,460

I've got a maintenance plan running that does a validation and then a backup using

backup database directory 'P:\\\\GKBackups' wait before start transaction log rename;

There seems to be something wrong with the database or something, because the backup file is 'not a valid database file', and it seems the event for the maintenance plan never finished (connections were still disabled; never got email).

Any thoughts?

SQLA 10.0.1.3835

UPDATE: I did some logging, but I got NOTHING. The backup just never finishes. It never throws an exception either. I have absolutely nothing to go on. The strange thing is, though, that dbbackup.exe will work, just the backup database command will not.

Accepted Solutions (0)

Answers (1)

Answers (1)

johnsmirnios
Advisor
Advisor

If the backup didn't finish, then the file will be invalid. The last thing we do after the backup completes is update the header of the file to mark it as valid. What you need to find out is why the backup never finished.

Former Member
0 Kudos

Are there any internal issues that would cause a backup not to finish? I had already did a full validation on the database, and it was fine.

Either way, the run tonight is logging pretty much everything, so hopefully this will give me some more information.

Thanks for your help!

VolkerBarth
Contributor
0 Kudos

IIRC, I had some issues a while ago (with SA 10.0.1, can't remember the exact build) when using backup as part of a maintenance plan: AFAIK such a plan runs with the "WAIT BEFORE START" clause by default, and in case of (accidentally) long open trancactions, it prevented the backup to start at all... Manually removing that clause in the event handler solved the issue.

Former Member
0 Kudos

@Volker - I can run the same statement without that clause, and it still acts the same.