473,322 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

HTTP Error code of SQL server down

what will be the http error code (ex. 404, 500) produced when an sql server is down due to maintenance works? thanks in advance =)
Oct 22 '07 #1
8 1170
radcaesar
759 Expert 512MB
HTTP doesn't know about your database. You have to chack this using SQLDMO.
Oct 22 '07 #2
thanks for the reply but what i meant was...if I try to access a website that has a sql server under maintenance (assuming the site has no custom error page) what will be the error displayed by the site.
Oct 23 '07 #3
Shashi Sadasivan
1,435 Expert 1GB
in that case it would act as if your application was connecting to a non existant database.

And will throw an exception.

If that exception is not caught, it will show a very non-informational data to the "common" user.

So the catch here is to catch the exception
Oct 23 '07 #4
what exception will it throw? i am creating a custom error page specifically for sql server that is under maintenance. right now, im using error code 500 internal server error. is this correct? or is there any more appropriate error code to use?
thank you very much...
Oct 23 '07 #5
Shashi Sadasivan
1,435 Expert 1GB
I think that would depends upon how much of the server is down.
If the entire server is down then the instance of the server will not be found,
If only the database is down then the initial catalogue will fail.

not sure of the exact errors though.

you could try that by playing with your connection string.
Edit: I tried that....on both occasions it gives SqlException. However with different messages (but if you do recieve this exception, it should probabl be because of this reason, it will also throw this exception if there is a non existing stored procedure / funtion which has been called)

cheers
Oct 23 '07 #6
radcaesar
759 Expert 512MB
Else Check for the Status of the SQL Server Service status using some custom code.

:)
Oct 23 '07 #7
Plater
7,872 Expert 4TB
It will probably throw an SqlException (or an analouge like OdbException depening on your database type)
Oct 23 '07 #8
JamieHowarth0
533 Expert 512MB
Hi there,

I'm not a .NET pro but you could use Try... Catch to attempt retrieval of data, then if the database server is down for whatever reason, you use code in the Catch to handle the error and show something nice and user-friendly.

Best regards,

medicineworker
Oct 23 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Terri | last post by:
Hi, I am experiencing the following error from a particular XP workstation. The application has been in production for some time and the error only appears on one XP workstation. I have run...
1
by: dmiller23462 | last post by:
Hey guys.... I put an error-handling in my page and have it posted at the complete end of the code, see below(when people were putting in 's I was getting the delimiter errors). Great, I...
7
by: Alan Pretre | last post by:
I have an application installed at a customer site that has been getting a general network error for a couple of years. I was hoping that .NET 2.0 would clear it up, but unfortunately it didn't. ...
18
by: rfhurley | last post by:
How do I run a .php program? (I'm starting with the "hello world" script)
0
by: Wayne Deleersnyder | last post by:
Hi All, I'm hoping to try to solve this error. I'm currently putting together a little web app, but I need it to work under both IE6, IE7, Mozilla, etc... Although the formatting is off for...
7
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am trying to set this up using asp code and IIS configuration. But it seems not working. Here it is the way I am doing. In IIS I set up a virtual directory with secure communication, I...
3
by: paulus4605 | last post by:
dears since I'm new to ruby I try to create a form within ruby on rails. this is my controller require "player" class SpelersController < ApplicationController def index @speler =...
1
by: John Straumann | last post by:
Hello all: I am trying to call an ASPX page from another ASPX page code-behind file by using the HTTP Request object. By loading the page and typing: javascript:alert(resultRender.outerHTML) ...
15
by: Lawrence Krubner | last post by:
Does anything about this script look expensive, in terms of resources or execution time? This script dies after processing about 20 or 25 numbers, yet it leaves no errors in the error logs. This is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.