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.

open and close DATABASE in sysbase

2 posts in General Last posting was on 2010-03-01 15:21:25.0Z
RAMAKRISHNA Posted on 2010-02-25 17:46:38.0Z
From: "RAMAKRISHNA" <forums.sybase.com>
Newsgroups: ianywhere.public.afaria.general
Subject: open and close DATABASE in sysbase
Lines: 49
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b86b77e$1@forums-1-dub>
Date: 25 Feb 2010 09:46:38 -0800
X-Trace: forums-1-dub 1267119998 10.22.241.152 (25 Feb 2010 09:46:38 -0800)
X-Original-Trace: 25 Feb 2010 09:46:38 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.afaria.general:258
Article PK: 3295

Hi,

I am new to Sybase database.

I need write a UNIX shell script for is the giving database has open or not?
Some times the number of databases is more than 20.



I wrote UNIX script like:



USER="xyz"
PASS="abc"
SERVER="SCCS"
DB="blue"
WORK_DIR="/usr/home/genesys/Sayantan/ramakrishna"



set -x
isql -U${USER} -P${PASS} -S${SERVER}<<EOF>$WORK_DIR/output.log



go

use db1

go

use db2

go

use db3



EOF.



I am not sure this's correct way to write the script. So could you please
advise in script how ca we find the database has accessible or not.


Frontline Newsgroups Posted on 2010-03-01 15:21:25.0Z
From: "Frontline Newsgroups" <SybaseiAnywhere@Live.com>
Newsgroups: ianywhere.public.afaria.general
References: <4b86b77e$1@forums-1-dub>
In-Reply-To: <4b86b77e$1@forums-1-dub>
Subject: Re: open and close DATABASE in Sybase
Lines: 1
Organization: Sybase iAnywhere
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b8bdb75$1@forums-1-dub>
Date: 1 Mar 2010 07:21:25 -0800
X-Trace: forums-1-dub 1267456885 10.22.241.152 (1 Mar 2010 07:21:25 -0800)
X-Original-Trace: 1 Mar 2010 07:21:25 -0800, vip152.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.afaria.general:259
Article PK: 648

Ramakrishna,
Which database platform are you using? The only "Sybase" database
platform that the Afaria product supports is SQL Anywhere 11.x. Are you
looking for a different newsgroup/forum for a specific Sybase database
product?

Thanks,
Chris

"RAMAKRISHNA" <forums.sybase.com> wrote in message
news:4b86b77e$1@forums-1-dub...
> Hi,
>
> I am new to Sybase database.
>
> I need write a UNIX shell script for is the giving database has open or
> not? Some times the number of databases is more than 20.
>
>
>
> I wrote UNIX script like:
>
>
>
> USER="xyz"
> PASS="abc"
> SERVER="SCCS"
> DB="blue"
> WORK_DIR="/usr/home/genesys/Sayantan/ramakrishna"
>
>
>
> set -x
> isql -U${USER} -P${PASS} -S${SERVER}<<EOF>$WORK_DIR/output.log
>
>
>
> go
>
> use db1
>
> go
>
> use db2
>
> go
>
> use db3
>
>
>
> EOF.
>
>
>
> I am not sure this's correct way to write the script. So could you please
> advise in script how ca we find the database has accessible or not.
>
>
>