Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

What is best practice to check is a database is online?

3 posts in General Discussion Last posting was on 2010-02-10 20:35:32.0Z
Mike Posted on 2010-02-10 20:12:05.0Z
Reply-To: "Mike" <michaeldtirrell@vcisolutions.com>
From: "Mike" <michaeldtirrell@yahoo.com>
Newsgroups: ianywhere.public.general
Subject: What is best practice to check is a database is online?
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b731315$1@forums-1-dub>
Date: 10 Feb 2010 12:12:05 -0800
X-Trace: forums-1-dub 1265832725 10.22.241.152 (10 Feb 2010 12:12:05 -0800)
X-Original-Trace: 10 Feb 2010 12:12:05 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7888
Article PK: 6918

I have to write a method that will be called by a web service at a regular
interval and will report either success or failure based on whether or not
my ASA database is up and running. What is the easiest and least invasive
way to do this? Can I ping the database somehow? Should I set up a web
service at the database level? Any help would be greatly appreciated.
Thanks.


Breck Carter [TeamSybase] Posted on 2010-02-10 20:29:13.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: What is best practice to check is a database is online?
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <jh56n51atvq5g2e2netvju70vb01b16ebp@4ax.com>
References: <4b731315$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 10 Feb 2010 12:29:13 -0800
X-Trace: forums-1-dub 1265833753 10.22.241.152 (10 Feb 2010 12:29:13 -0800)
X-Original-Trace: 10 Feb 2010 12:29:13 -0800, vip152.sybase.com
Lines: 27
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7889
Article PK: 6920

On 10 Feb 2010 12:12:05 -0800, "Mike" <michaeldtirrell@yahoo.com>

wrote:

>I have to write a method that will be called by a web service at a regular
>interval and will report either success or failure based on whether or not
>my ASA database is up and running. What is the easiest and least invasive
>way to do this? Can I ping the database somehow? Should I set up a web
>service at the database level? Any help would be greatly appreciated.
>Thanks.

Connect and do a SELECT COUNT(*) FROM dummy;

IMO making a connection and actually doing a query is the only real
way to ensure your database is truly "up and running" and responding
to requests... with the latter (responding to requests) being rather
important :)

Breck

--
Breck Carter - Blog: http://sqlanywhere.blogspot.com/

SQLA questions and answers: http://sqla.stackexchange.com

RisingRoad helps SQL Anywhere developers make better databases
http://www.risingroad.com/
Breck.Carter at gmail


"Kory Hodgson (Sybase iAnywhere)" <khodgson Posted on 2010-02-10 20:35:32.0Z
From: "Kory Hodgson (Sybase iAnywhere)" <khodgson@A_SPAM_FREE_sybase.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: What is best practice to check is a database is online?
References: <4b731315$1@forums-1-dub>
In-Reply-To: <4b731315$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b731894$1@forums-1-dub>
Date: 10 Feb 2010 12:35:32 -0800
X-Trace: forums-1-dub 1265834132 10.22.241.152 (10 Feb 2010 12:35:32 -0800)
X-Original-Trace: 10 Feb 2010 12:35:32 -0800, vip152.sybase.com
Lines: 14
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7890
Article PK: 6921

You might want to check out the SQL Anywhere Monitor:

http://dcx.sybase.com/index.html#1101en/dbadmin_en11/intro-sam.html

Mike wrote:
> I have to write a method that will be called by a web service at a regular
> interval and will report either success or failure based on whether or not
> my ASA database is up and running. What is the easiest and least invasive
> way to do this? Can I ping the database somehow? Should I set up a web
> service at the database level? Any help would be greatly appreciated.
> Thanks.
>
>