|
Posted by Erland Sommarskog on 10/02/18 11:45
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
And D is a local disk to the SQL Server machine?
> 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.
>
>
> The command line is:
> print time
> osql -b -n -E -S ServerName -i Backup.sql
> print time
>
> and the output is:
>
> 8:00a
> Timeout expired
> 8:00a
Judging from the message, this is a command timeout, but that does not
make sense, as OSQL by default does not have a command timeout. But
maybe there some intermittent error which causes OSQL to set the
default timeout to 0? (The default timeout for ODBC as such is 30
seconds.)
It would have been interesting to see the seconds for the time as well.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|