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.
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
Any ideas what the issue is? It happens intermittently, and works 98%
of the time. Typically when this happens, during the next backup it
will be fixed. 22 3790
pb648174 (go****@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, es****@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
Hi
What is print time doing? You may want to change it to echo %time%
John
"pb648174" <go****@webpaul.net> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com... 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.
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
Any ideas what the issue is? It happens intermittently, and works 98% of the time. Typically when this happens, during the next backup it will be fixed.
Sorry, it isn't print time but time /t
John Bell wrote: Hi
What is print time doing? You may want to change it to echo %time%
John
"pb648174" <go****@webpaul.net> wrote in message news:11**********************@v46g2000cwv.googlegr oups.com... 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.
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
Any ideas what the issue is? It happens intermittently, and works 98% of the time. Typically when this happens, during the next backup it will be fixed.
Yes, D is a local drive to the SQL Server. I have also replaced time /t
with echo %time% as suggested above which prints seconds as well. I'll
post that the next time it fails.
I added seconds and got the same "Timeout expired" error for 3 backups
in a row, with the backups happening every two hours. The issue went
away by the time the 4th backup (8 hours later) came up. The output is
below with time.
10:00:00.43
Timeout expired
10:00:16.35
The interesting thing is that there are two production SQL 2005 servers
and one backup SQL 2005 server. Here is how they were affected during
the three failed backups, two hours between each, with no loss of
connectivity for users using the application. The duration between
start and end for the failure is pretty consistently about 16 seconds
as in the above error message.
production1 production2 backup
10am down up down
12pm down down down
02pm down up up
pb648174 (go****@webpaul.net) writes: I added seconds and got the same "Timeout expired" error for 3 backups in a row, with the backups happening every two hours. The issue went away by the time the 4th backup (8 hours later) came up. The output is below with time.
10:00:00.43 Timeout expired 10:00:16.35
15 seconds is the default connection timeout. So it does look like a
connection problem after all. What I don't understand is the message.
But maybe there is some variation of connection problems where ODBC
do find the server, but is not let in?
The interesting thing is that there are two production SQL 2005 servers and one backup SQL 2005 server. Here is how they were affected during the three failed backups, two hours between each, with no loss of connectivity for users using the application. The duration between start and end for the failure is pretty consistently about 16 seconds as in the above error message.
production1 production2 backup 10am down up down 12pm down down down 02pm down up up
So which of the servers did the script try to connect to?
--
Erland Sommarskog, SQL Server MVP, es****@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
All three each time - it backs up prod1, then prod 2 and restores it to
backup. So it is alternatively taking errors on all three machines
while connecting, but this only happens once or twice per month.
pb648174 (go****@webpaul.net) writes: All three each time - it backs up prod1, then prod 2 and restores it to backup. So it is alternatively taking errors on all three machines while connecting, but this only happens once or twice per month.
That's impossible! I mean in the original post of this thread, you said
The code in the sql is as follows:
BACKUP Database DBName to DISK='D:\Files\Backups\DBName.bak'
WITH INIT
That's one backup statement, not two, and not a RESTORE statement in sight.
What about telling the full story of what's in the script?
--
Erland Sommarskog, SQL Server MVP, es****@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
My first statement is accurate, the backup command is being run once on
one machine and then again on another machine (separate osql calls).
The script that is being run on the third machine (backup) is a restore
not a backup, but it takes the same error so i don't think it is even
running the script, but taking the timeout during the connection. At
any rate, if you want to focus on just the backup part for the two
production servers to simplify it, that is fine. I just included that
info in case it helped to understand it.
We are starting to get these errors more often now, like 2-3 times per
week, so if anyone has any suggestions for further debugging or can
direct me to the best area to look for issues I would appreicate it.
pb648174 (go****@webpaul.net) writes: We are starting to get these errors more often now, like 2-3 times per week, so if anyone has any suggestions for further debugging or can direct me to the best area to look for issues I would appreicate it.
I guess you have to be around when it happens, so you can test
interactively.
But if we assume that is a connection problem, I guess there is a network
problem of some sort.
--
Erland Sommarskog, SQL Server MVP, es****@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
My theory all along is that the network connectivity between the
machine making the connection and the database server is somehow
intermittently going up and down. If that is the case, what would be
the best way to confirm? Is the amount of time (15 seconds) consistent
with this?
pb648174 (go****@webpaul.net) writes: My theory all along is that the network connectivity between the machine making the connection and the database server is somehow intermittently going up and down. If that is the case, what would be the best way to confirm? Is the amount of time (15 seconds) consistent with this?
15 is the default connection timeout. Normally a connection timeout
results in a different message. But maybe this message could appear if
the connection initially beings to start up, but then fails to complete
for some reason. But that is just pure speculation on my part.
--
Erland Sommarskog, SQL Server MVP, es****@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
I used the same script and specified a bogus machine name and got
"Specified SQL Server not found", so it isn't a network issue I
guess... I'm at a loss as to what to do from here.
pb648174 (go****@webpaul.net) writes: I used the same script and specified a bogus machine name and got "Specified SQL Server not found", so it isn't a network issue I guess... I'm at a loss as to what to do from here.
Yes, that's the message I would expect if the server is entierly
unavailable. But what if some packets make it, and others not?
I'm about as lost as you are, but what about running ping -n 200 in
conjunction with running the backup job, and then check for packet
loss?
--
Erland Sommarskog, SQL Server MVP, es****@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
Ok, I'll try that and report back in a week or two most likely - thanks.
Just my 2 cents, I faced a similar problem sometime ago:
I would try to backup my SQL Server DB (not from a script, but
manually) and I would get timeout's after sometime. I found out that
this happens when you are running the backup remotely to write to a
drive on the SQL Server (basically a n/w issue)
So I started logging into the actual m/c and then backing up there was
not a problem anymore. Also my DB was huge by then about 10GB.
Hope that helps.
An interesting observation. I have installed some Internet Firewall
Client on my box at work, as per request from my sysadmin.
When I connect from home, I now have troubles of accessing my machine,
and relevant to this thread is that some attempts to connect with
OSQL gave the message "Timeout expired". I am able to connect to the
machine with Remote Desktop and by file system. When I added the
option -l 30, to get a longer connection timeout, the only change
was that it took longer time for "Timeout expired" to appear.
I'm not saying that you have exactly the same problem as I have, but
at least it is an indication that my theory that the connection is
initiated, but then fails somewhere.
I had some more ideas that I should try, but alas now I only get the
message "SQL Server does not exist or access denied".
--
Erland Sommarskog, Stockholm, es****@sommarskog.se
We have multiple database servers and want to keep it centralized so I
don't think we will do the back job from the SQL Server.. Also, that
doesn't seem to make sense because all osql or enterprise manager does
is issue a command to the SQL Server.. It isn't actually making a
backup from the connecting client and transferring the file. I guess
for now we will just live with the intermittent backups problems. I
have the ping command in there so I'll know once it fails again if the
entire network connection is down.
Erlans, I take it you have unblocked ALL traffic to 1433 for your
firewall? It might consider your home connection as a different type of
connection. Also, I have had problems with Authenticated logins through
firewalls and use only SQL Authentication when just 1433 is open.
pb648174 (go****@webpaul.net) writes: We have multiple database servers and want to keep it centralized so I don't think we will do the back job from the SQL Server.. Also, that doesn't seem to make sense because all osql or enterprise manager does is issue a command to the SQL Server.. It isn't actually making a backup from the connecting client and transferring the file. I guess for now we will just live with the intermittent backups problems. I have the ping command in there so I'll know once it fails again if the entire network connection is down.
The error "timeout expired" has nothing to do with the backup command.
You could just as well have a "PRINT 'Howdy!'" in that input file. You
would get the same error. OSQL fails to connect to SQL Server for some
reason that I don't know.
Erlans, I take it you have unblocked ALL traffic to 1433 for your firewall? It might consider your home connection as a different type of connection. Also, I have had problems with Authenticated logins through firewalls and use only SQL Authentication when just 1433 is open.
It used to work, but then I installed this Internet Firewall Client. There
is some ISA Server in the mix too. I have not investigated where the
problem might be, and I think I will leave to my sysadmin to find out. :-)
--
Erland Sommarskog, SQL Server MVP, es****@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
As per previous posts in this thread, I have added the ping statement
to the server in question to the backup script.. Here we are a few
weeks later with the same intermittent
problem, ping works fine.
Pinging dbserver [192.168.23.154] with 32 bytes of data:
Reply from 192.168.23.154: bytes=32 time<10ms TTL=128
Reply from 192.168.23.154: bytes=32 time<10ms TTL=128
Reply from 192.168.23.154: bytes=32 time<10ms TTL=128
Reply from 192.168.23.154: bytes=32 time<10ms TTL=128
Ping statistics for 192.168.23.154:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
8:00:19.85
Timeout expired
8:00:37.23
pb648174 (go****@webpaul.net) writes: As per previous posts in this thread, I have added the ping statement to the server in question to the backup script.. Here we are a few weeks later with the same intermittent problem, ping works fine.
Pinging dbserver [192.168.23.154] with 32 bytes of data:
Reply from 192.168.23.154: bytes=32 time<10ms TTL=128
Reply from 192.168.23.154: bytes=32 time<10ms TTL=128
Reply from 192.168.23.154: bytes=32 time<10ms TTL=128
Reply from 192.168.23.154: bytes=32 time<10ms TTL=128
Ping statistics for 192.168.23.154:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
8:00:19.85 Timeout expired 8:00:37.23
When I was able to get "Timeout Expired" to my server at work, I was
still able to ping my machine.
As I've said before, I suspect that the issue is related to Windows
Networking, Active Directory or something else I have very little
knowledge of.
--
Erland Sommarskog, SQL Server MVP, es****@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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Cath B |
last post by:
I am pretty sure I am getting a command timeout when execute a SQL
procedure that has an output parameter. The code below is in an asp
page that is called using RSGetASPObject. I want to be able...
|
by: Steve - DND |
last post by:
We are continually receiving timeout, and "Unable to
write data to the transport connection" errors while using the
System.Net.HttpWebRequest class from an ASP.Net web page. Below are the two...
|
by: Chris Langston |
last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server
that is experiencing strange shutdown problems. We are using ASP.NET v1.1
and our application is written in VB.NET
...
|
by: Brent |
last post by:
I thought I was doing a simple thing, here -- asking a server for a text
document, getting the first 150 lines, and then returning the lines. But
I keep getting timeout errors:
"Exception...
|
by: peterlan |
last post by:
Hi, this is a follow-up to my previous post. I've got a long-running function
exposed as a web service. It can take up to 3 or 4 minutes to complete
(rendering a 300 page pdf from xsl-fo). I have...
| |
by: Barb |
last post by:
Hello,
I have a (C#) web service being consumed by a high volume "asp classic"
site. It worked perfectly until I tried consuming a second web service
from the first web service. Both services...
|
by: yawnmoth |
last post by:
Say I have the following script:
<?
$timeout = 5;
$start = time();
$fsock = fsockopen('125.1.119.10',80,$errno,$errstr,$timeout);
// reduce $timeout by the amount of time that it took for...
|
by: a.r.austin |
last post by:
Hello,
I am trying to download a few files one after another from a remote
server. Problem is that I don't know how to, or if I am able at all,
set a time out for download. I don't want to time...
|
by: Robin Becker |
last post by:
While messing about with some deliberate socket timeout code I got an unexpected
timeout after 20 seconds when my code was doing socket.setdefaulttimeout(120).
Closer inspection revealed that...
|
by: alvinstraight38 |
last post by:
I have a client who has been receiving hundreds of SQL timeout error
messages in their error logs. Specifically, the message looks like
this:
MESSAGE :...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |