vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| After executing osql from the command line via the Windows scheduled task interface, the following error is returned: "Timeout expired" The code in the sql is as follows: BACKUP Database DBName to DISK='D:\Files\Backups\DBName.bak' WITH INIT go Is the timeout happening during the backup or in just connecting to the server? There is no firewall between the two machines they are on the same hub, and the machine executing osql has SQL 2000 installed while the database machine has SQL 2005. Any ideas? |
| |||
| pb648174 (google@webpaul.net) writes: > After executing osql from the command line via the Windows scheduled > task interface, the following error is returned: "Timeout expired" > > The code in the sql is as follows: > > BACKUP Database DBName to DISK='D:\Files\Backups\DBName.bak' WITH INIT > go > > Is the timeout happening during the backup or in just connecting to the > server? There is no firewall between the two machines they are on the > same hub, and the machine executing osql has SQL 2000 installed while > the database machine has SQL 2005. Exactly how the command line for OSQL look like? It sounds like it includes the -t option, which specifies a maximum execution time for queries. By the default, OSQL does not time out, which is why suspect that -t is there. Notice that this timeout is a client-side thing. What happens when the timeout elapses is that that the client cancels the query. By the way, why don't you run backups from SQL Server Agent? -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx |
| |||
| osql -b -n -E -S ServerName -i Backup.sql We use a single backup server that not only connects to all the various databases and backs them up, but also copies the .bak files to another drive, copies application files to a backup area, zips them up, etc. I think this is related to another issue I see on some client's servers where the web server intermittently cannot talk to the SQL server.. This error also happens intermittently. I have never figured out what the issue is so I ping the newgroup every now and then hoping someone will have seen it themselves. My guess is that it is network related. |
| |||
| pb648174 (google@webpaul.net) writes: > osql -b -n -E -S ServerName -i Backup.sql > > > We use a single backup server that not only connects to all the various > databases and backs them up, but also copies the .bak files to another > drive, copies application files to a backup area, zips them up, etc. > > I think this is related to another issue I see on some client's servers > where the web server intermittently cannot talk to the SQL server.. > This error also happens intermittently. I have never figured out what > the issue is so I ping the newgroup every now and then hoping someone > will have seen it themselves. My guess is that it is network related. If the error message is exactly "Timeout expired" and nothing else to go with it, it looks very much like a query timeout. But should not get one with that command line, unless there is some undocumented environment variable that affects the query timeout. Do you have any idea how time it take before the timeout elapses? -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx |
| Thread Tools | |
| Display Modes | |
|
|