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.

Automated query execution in Sybase

7 posts in ,  UnixWindows NT General Discussion Last posting was on 2000-03-16 00:27:06.0Z
rahul bakare Posted on 2000-02-25 19:38:02.0Z
Message-ID: <38B6DA1A.9D328E10@intervoice.com>
Date: Fri, 25 Feb 2000 13:38:02 -0600
From: rahul bakare <rbakare@intervoice.com>
X-Mailer: Mozilla 4.06 [en] (WinNT; I)
MIME-Version: 1.0
Subject: Automated query execution in Sybase
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.general,sybase.public.sqlserver.unix,sybase.public.sqlserver.nt
Lines: 6
NNTP-Posting-Host: freeside.intervoice.com 208.200.21.194
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.general:3735 sybase.public.sqlserver.unix:265 sybase.public.sqlserver.nt:593
Article PK: 1074691

Hi,

Does SYBASE has any "internal cron" kind of process which executes a
stored process
at a certian time. Oracle has one --- dbms_jobs
Can any one help me in this regard please ??

Thnaks in advance.

Rahul


Bill Province Posted on 2000-03-16 00:27:06.0Z
Message-ID: <38D02A5A.F0A1403@callidussoftware.com>
Date: Wed, 15 Mar 2000 16:27:06 -0800
From: Bill Province <bprovince@callidussoftware.com>
Organization: Callidus Software The Business Performance Systems Company
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Automated query execution in Sybase
References: <38B6DA1A.9D328E10@intervoice.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.general,sybase.public.sqlserver.unix,sybase.public.sqlserver.nt
Lines: 28
NNTP-Posting-Host: 209.31.59.13
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.general:3729 sybase.public.sqlserver.unix:259 sybase.public.sqlserver.nt:587
Article PK: 1074685

You may wish to examine the waitfor function.

Examples:

create procedure annoyCEOEveryHour as
begin
while true
begin
waitfor delay "1:00:00"
exec sendmail 'ceo@CallidusSoftware.com'
end
end
go

create procedure annoyCEOAt3Am as
begin
while true
begin
waitfor time "3:00am"
exec sendmail 'ceo@CallidusSoftware.com'
end
end
go

You will find the documentation in the Sybase ASE Reference Manual
Volume 1: Commands and Functions.

PS: Please don't annoy my CEO. He would be very upset with me. :)

rahul bakare wrote:

> Hi,
>
> Does SYBASE has any "internal cron" kind of process which executes a
> stored process
> at a certian time. Oracle has one --- dbms_jobs
> Can any one help me in this regard please ??
>
> Thnaks in advance.
>
> Rahul

--
Bill Province
Object Server Group Team Lead
(408) 271-2667 x232
mailto:bprovince@CallidusSoftware.com
The Business Performance Systems Company
http://www.CallidusSoftware.com


ibrahim DOGAN Posted on 2000-02-28 14:34:37.0Z
From: "ibrahim DOGAN" <idogan@takasbank.com.tr>
References: <38B6DA1A.9D328E10@intervoice.com>
Subject: Re: Automated query execution in Sybase
Date: Mon, 28 Feb 2000 16:34:37 +0200
Lines: 38
Organization: ISE Takasbank
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <MEIa$kfg$GA.202@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.general,sybase.public.sqlserver.unix,sybase.public.sqlserver.nt
NNTP-Posting-Host: 212.15.15.65
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.general:3730 sybase.public.sqlserver.unix:260 sybase.public.sqlserver.nt:588
Article PK: 1074686

Hi Rahul,

* I have just implemented an ASECron mechanism like Unix cron.
It is a centeralized solution so easy to manage and update.

* Instead of using separate scripts in which you need to use passwords
directly or from a file. I :

a- created a table ,Tb_DbaCron, to store information about procedures
that are to be run periodically.

b- wrote a procedure , Pr_DbaCron, executes *paralelly* the procedures in
Tb_DbaCron whose time is on. I used XP_SERVER here.

c- wrote an embedded-C program in Unix , dbacron.exe , which connects to
server using a hardcoded login. (dbacron). After connection, it just
executes sp_DbaCron.

d- scheduled unix cron to execute dbacron.exe for each minute.

* if you are interested i may send source codes. please feel free to ask any
detail.

bye

rahul bakare wrote in message <38B6DA1A.9D328E10@intervoice.com>...
>Hi,
>
>Does SYBASE has any "internal cron" kind of process which executes a
>stored process
>at a certian time. Oracle has one --- dbms_jobs
>Can any one help me in this regard please ??
>
>Thnaks in advance.
>
>Rahul
>


Warren Dosch Posted on 2000-02-26 18:28:36.0Z
From: "Warren Dosch" <wdosch@cableregina.com>
References: <38B6DA1A.9D328E10@intervoice.com>
Subject: Re: Automated query execution in Sybase
Date: Sat, 26 Feb 2000 12:28:36 -0600
Lines: 17
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <pyr5pfIg$GA.201@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.general,sybase.public.sqlserver.unix,sybase.public.sqlserver.nt
NNTP-Posting-Host: ip223.net247251.cr.sk.ca 24.72.51.223
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.general:3732 sybase.public.sqlserver.unix:262 sybase.public.sqlserver.nt:590
Article PK: 1074688

No
Why not use cron?

rahul bakare wrote in message <38B6DA1A.9D328E10@intervoice.com>...
>Hi,
>
>Does SYBASE has any "internal cron" kind of process which executes a
>stored process
>at a certian time. Oracle has one --- dbms_jobs
>Can any one help me in this regard please ??
>
>Thnaks in advance.
>
>Rahul
>


ibrahim DOGAN Posted on 2000-02-28 13:23:29.0Z
From: "ibrahim DOGAN" <idogan@takasbank.com.tr>
References: <38B6DA1A.9D328E10@intervoice.com>
Subject: Re: Automated query execution in Sybase
Date: Mon, 28 Feb 2000 15:23:29 +0200
Lines: 37
Organization: ISE Takasbank
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <bSIpR9eg$GA.251@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.general,sybase.public.sqlserver.unix,sybase.public.sqlserver.nt
NNTP-Posting-Host: 212.15.15.65
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.general:3731 sybase.public.sqlserver.unix:261 sybase.public.sqlserver.nt:589
Article PK: 1074689

Hi Rahul,

* I have just implemented an ASECron mechanism like Unix cron.
Instead of using scripts in which you need to use passwords directly
or from a file. I :

a- created a table ,Tb_DbaCron, to store information about procedures
that are to be run periodically.

b- wrote a procedure , Pr_DbaCron, executes *paralelly* the procedures in
Tb_DbaCron whose time is on. I used XP_SERVER here.

c- wrote an embedded-C program in Unix , dbacron.exe , which connects to
server using a hardcoded login. (dbacron). After connection, it just
executes sp_DbaCron.

d- scheduled unix cron to execute dbacron.exe for each minute.

* if you are interested i may send source codes. please feel free to ask any
detail.

bye

rahul bakare wrote in message <38B6DA1A.9D328E10@intervoice.com>...
>Hi,
>
>Does SYBASE has any "internal cron" kind of process which executes a
>stored process
>at a certian time. Oracle has one --- dbms_jobs
>Can any one help me in this regard please ??
>
>Thnaks in advance.
>
>Rahul
>


Joe Hellsten Posted on 2000-02-25 22:45:39.0Z
Message-ID: <38B70613.1A8DB6CD@Enron.com>
Date: Fri, 25 Feb 2000 16:45:39 -0600
From: Joe Hellsten <Joe_Hellsten@Enron.com>
X-Mailer: Mozilla 4.51 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Automated query execution in Sybase
References: <38B6DA1A.9D328E10@intervoice.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.general,sybase.public.sqlserver.unix,sybase.public.sqlserver.nt
Lines: 9
NNTP-Posting-Host: outbound5.enron.com 192.152.140.9
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.general:3734 sybase.public.sqlserver.unix:264 sybase.public.sqlserver.nt:592
Article PK: 1074690

what we do is schedule a shell script thru Cron that executes isql

Joe

rahul bakare wrote:

> Hi,
>
> Does SYBASE has any "internal cron" kind of process which executes a
> stored process
> at a certian time. Oracle has one --- dbms_jobs
> Can any one help me in this regard please ??
>
> Thnaks in advance.
>
> Rahul


Gary Estridge Posted on 2000-02-25 23:35:48.0Z
From: "Gary Estridge" <aaaa@aaaa.com>
References: <38B6DA1A.9D328E10@intervoice.com>
Subject: Re: Automated query execution in Sybase
Date: Fri, 25 Feb 2000 18:35:48 -0500
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <YOKCpm#f$GA.251@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.general,sybase.public.sqlserver.unix,sybase.public.sqlserver.nt
NNTP-Posting-Host: 31.orlando-06-07rs.fl.dial-access.att.net 12.77.194.31
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.general:3733 sybase.public.sqlserver.unix:263 sybase.public.sqlserver.nt:591
Article PK: 1074692

With NT you can use the AT scheduler to call a ISQL script or batch file at
any time. The ISQL script would be launched on the day and times specified
then call any stored procedures you want.If you want more functionality then
batch files under NT then there are products like MKS Toolkit that allow you
to have a Korn shell interpreter under NT.

"rahul bakare" <rbakare@intervoice.com> wrote in message
news:38B6DA1A.9D328E10@intervoice.com...
> Hi,
>
> Does SYBASE has any "internal cron" kind of process which executes a
> stored process
> at a certian time. Oracle has one --- dbms_jobs
> Can any one help me in this regard please ??
>
> Thnaks in advance.
>
> Rahul
>