473,768 Members | 8,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

detecting that a SQL db is running

Hi

I wonder if anyone can help me with a problem that I have with MSDE
SQL db. [I am changing to SQL server soon].

I have an app that runs on a server that communicates with remote
devices using email, this and other similar servers then sends
XML/SOAP messages to a master application.

I am in the process of intercepting these XML messages and forwarding
them on to a service managment platform for notification alerts etc.
This app reads a SQL db to get some additional information which is
also included in the XML message.

the problem is that the app on the comms server is an aggregate of
modules, that has a tendency to lock up, the server still runs, but
it causes the SQL server to stop. This is being worked on by the
developers, i expect that it will take some time to resolve.

using ASR we just reboot the server when this happens.

Using simple SQL statements, i am able to detect when SQL is up and
running, and to detect when it has stopped.

Is there a simple way to detect if the SQL server has actually
started?

i had a look at investigating the registry, but to be honest, from
the various recipes that i have seen, i haven't a clue what I am
looking at,

any advice?

any information shall be gratefully received

kind regards

Bill

Nov 30 '06 #1
5 1161
Sorry if i did not make myself clear. let me try again.

1. I have a series of servers running windows server 2003.
2 on each server there is an application running that communicates
with remote devices using email.
3. this application is made up from a series of modules that also
extract data from a local MSDE db.
4. this application pulls emails from remote devices, interrogates a
the DB, then passes on an XML message to a central server.
5. I am intercepting these XML messages to insert additional data
that I extract from the DB, and then forward on to another
application. Call this my local app.

The problem that I have is that the original application occasionally
hangs, causing the DB to stop. I have ASR routines in place to
re-boot the server when this happens.

I can detect when the db is up and not responding, however, if the DB
does not start at all, my local application hangs. I need to find a
way to determine if the DB has started, that's all.

if any of you have any insight into how I can detect that the DB has
started as is running, that would be very useful.

any contributions, most gratefully received.

kind regards

bill

Nov 30 '06 #2
Dennis

none of this matters, all i am trying to find out is whether or not
the local MSDE is actually running.

I put all the other bits in there to try and put some background to
it.

kind regards

bill
Dec 1 '06 #3
bill ramsay wrote:
none of this matters, all i am trying to find out is whether or not
the local MSDE is actually running.
If it is a local MSDE then you may be able to rely on the connection
being refused if the server isn't running.

#-- begin
import socket

host = "127.0.0.1"
port = 1433 ## replace with msde_port, if it differs

s = socket.socket(s ocket.AF_INET)
try:
s.connect((host , port))
print "Server on %s is running" % port
except socket.error, e:
print "Server on %s appears to be down (%s)" % (port, e)

#-- end

Please note that this is untested and not very well thought through. But
try it and see if it gets you on the right track. If this isn't run
locally, you'll probably need to set the timeout low enough for the
connect call not to appear to hang before returning the timeout error.

--
pkm ~ http://paulmcnett.com
Dec 1 '06 #4
thank you paul, much appreciated
Dec 1 '06 #5
On Sat, 02 Dec 2006 07:39:51 GMT, Dennis Lee Bieber
<wl*****@ix.net com.comwrote:
>On Sat, 02 Dec 2006 09:02:43 +1300, bill ramsay <blah@blahdebla h>
declaimed the following in comp.lang.pytho n:
>Dennis

none of this matters, all i am trying to find out is whether or not
the local MSDE is actually running.
From my reading of your system, you have multiple "local MSDE"
server processes distributed about, and something on those distributed
systems that causes the initial problem... So I've never been clear of
just where any given application/server process actual resides...

However, all the tests I've been able to perform on my desktop
indicate that /I/ get time-outs or failure to connect messages within 15
seconds of a connection request when the server process is running.

I don't get unending lock-ups...

dennis

it doesn't matter what is causing the lockups, it's a problem with a
supposedly professionally written application package that I have no
control over. I am just at this moment trying to deal with the
consequences.

I think that I haave found a way to deal with the issue that I have.

Kind regards

Bill
Dec 2 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
9147
by: RootShell | last post by:
Hello I need to have a way to check if the user as refreshed the current page. Is there any way in PHP to do this? Here's the full facts, I have a JavaScript running that is merely a 30 seconds countdown, so that the user has only 30 seconds to answer a question.
2
2238
by: Frank | last post by:
Hello, I'm a total newbie on Javascript, and with a lot of help and some copy and paste managed to get things running. On my site: http://home.wanadoo.nl/homepage I use a form from Bravenet. This works fine. Unfortunately some persons fill in their e-mail address instead of the URL of their page. Checking is done on empty fields but how to avoid
7
6120
by: Joecx | last post by:
Hi Does anyone have the code or maybe give me a start on how to detect if my program is already running if someone tries to run it again while it's already running? I know I could do this with a dummy file by putting something in the file while it's running and emptying the file when it's not running, but I was hoping for something a little more professional. Has anyone done this yet? Joe
3
465
by: Sandeep Arya | last post by:
Thanks linuxfreak and sybren for positive comments My application will be running on Linux. How to send ICMP ECHO as broadcast packets. I do not know this. Please tell me how to? Sybren.. Does nmap is available on every systems? I tried on my linux fc4 machine in user previleage. it was not working. Does this just belongs to superuser...
2
2259
by: Deano | last post by:
In my app I have lots of forms with data presented in various ways using all kinds of controls. Is there a simple way of detecting if the user has changed any data? I would like to do this so I could set a boolean value to True and then I could use that to modify what is displayed on my reports. In my dim memory is there a dirty property for forms that would do this? Would that always work for every form? Most, if not all, of my...
7
2353
by: fox | last post by:
Maybe this is not the best group to ask this question, but I don't know a better one. I'm looking for a *portable* program in C (I mean source code) to detect whether unaligned word access is: a. handled by the main processor (e.g. x86) b. not supported (e.g. Sparc running Solaris) c. emulated in software (e.g. Alpha running Linux) By "unaligned word access" I mean access to a 16-bit word
2
1315
by: pmclinn | last post by:
I have a couple spyware bots I loaded on a test machine. While I was watching the spyware infect the system I noticed that it was launching a process but it was not listed in my task Managaer under processes. I know the process is running because the firewall is detecting it. Does anyone have code to list these invisble processes? -Peter
0
922
by: David Eales | last post by:
Hi All, I am having some difficulty when some application hang detection code, I have read the detecting hangs document on msdn but this only works for 1 monitored running app, what I would like to do is monitor all apps currently running. Many Thanks
8
6150
by: dwelch91 | last post by:
I need to detect whether the operating system I am running on (not the Python version) is 64bit or 32bit. One requirement is that I need to include support for non-Intel/AMD architectures. The 2 ways I have thought detecting 64bit are: 1. struct.calcsize("P") == 8 2. '64' in os.uname() I'm not convinced that either one of these is really adequate. Does
9
5573
by: timor.super | last post by:
Hi group, I've written a client/server application, using the dotnet sockets. In my server, I have a thread waiting for messages with : ret = currSocket.Receive(buffer, 1024, SocketFlags.None); When the client exits, I close the socket with a specific message (like "end") and the thread terminate in a proper manner, but If my client crashes, the server is still waiting for receiving data, and
0
9576
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10017
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9961
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8840
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6656
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3932
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 we have to send another system
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.