question

sensetech avatar image
sensetech asked

Backup timing out

I execute the following command from within SSMSS 2005 Express and within a few seconds get the dreaded "timeout expired or server not responding" message, and stats showing '34 percent processed'. I haven't altered any settings (as far as I know) so what's the problem ? BACKUP DATABASE [ITDatabase] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\test1.bak' WITH FORMAT, INIT, MEDIANAME = N'test', NAME = N'ITDatabase-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 1 GO
backuptimeout
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sp_lock avatar image
sp_lock answered
@Fatherjack has some excellent questions... One thing to try is to right click in the query window and select "Query Option". Change "Execution time-out" to 0 (if it is not already)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image
Fatherjack answered
just questions I'm afraid - How big is the database? How big are the backups usually? Is there space on the hard drive? Have you tried another location for the backup? Do other databases backup successfully? Is the server very busy doing other stuff?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image
Grant Fritchey answered
If you're going straight to disk, I wouldn't bother with NOREWIND and NOUNLOAD. These are tape specific commands and just clutter the landscape of your backup. I agree with Jonlee. It sounds like you might be setting a timeout on your connection. Don't do that. I'd check the settings for your Management Studio environment. Look at Query Execution to validate that the timeout is set to 0 and that the lock timeout in Sql Server, Advanced is set to -1. Check the logs to see if there are other errors being reported as part of this process.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sensetech avatar image
sensetech answered
Ah, thank you, Jonlee ! For some strange reason the query execution time-out was set to 5 seconds. Changed that to 0 and all was fine. Thanks to you other guys for your suggestions too. If ever you're in the Half Moon in Wilstone ( just outside Tring, UK ) I'll buy you a beer - just ask for Neil ...
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

TimothyAWiseman avatar image TimothyAWiseman commented ·
If that works for you, you can select Jonlee's answer as the accepted one.
0 Likes 0 ·
Fatherjack avatar image Fatherjack ♦♦ commented ·
@sensetech, click the "thumbs-up" beside Jonlee's answer so that he gets the credit for the correct solution and other people finding this question will quickly get to the solution. Thanks for the drink offer, not sure how many people you can accommodate ... ! You never know!
0 Likes 0 ·
sp_lock avatar image sp_lock commented ·
Host a SQL event and offer free beer... Think you would get more that you bargain for ha. No problem, glad i could help
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.