dbTalk Databases Forums  

Setting SQL timeout

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Setting SQL timeout in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nguyen, Vu [SKY:QW54:EXCH]
 
Posts: n/a

Default Setting SQL timeout - 12-05-2003 , 09:18 AM






Hi all,
I've got some general questions:
1) Is there way to set timeout per SQL statement.
2) How to invoke scripts as ASA server startup/shutdown.

Thanks,
Vu



Reply With Quote
  #2  
Old   
Nick Elson
 
Posts: n/a

Default Re: Setting SQL timeout - 12-06-2003 , 12:23 AM






Not knowing the version or programming APIs
means my answers are general (and so may or may
not apply to your specific case).


Quote:
1) Is there way to set timeout per SQL statement.
That would depend upon you API and how you
can coded your application. For Embedded SQL and
ODBC (at least) another thread can cancel and
running statement.

Through the ODBC API you can set the statement
attribute SQL_ATTR_QUERY_TIMEOUT. I don't
if other APIs offer this capability.

I don't know if this your question is 'does this work '
or something a little more general.


Quote:
2) How to invoke scripts as ASA server startup/shutdown.
I guess that depends on what you mean by invoke (one time or
every startup) and how flexible you need it.

I do expect (as of version 7 and up) the Event handler capabilities
may answer your requirements. The "DatabaseStart" or even
the "Connect" are probably quite useful to you.




"Nguyen, Vu [SKY:QW54:EXCH]" <vnguyen (AT) americasm01 (DOT) nt.com> wrote

Quote:
Hi all,
I've got some general questions:
1) Is there way to set timeout per SQL statement.
2) How to invoke scripts as ASA server startup/shutdown.

Thanks,
Vu





Reply With Quote
  #3  
Old   
Greg Fenton
 
Posts: n/a

Default Re: Setting SQL timeout - 12-06-2003 , 12:28 AM



Nguyen, Vu [SKY:QW54:EXCH] wrote:

Please *always* post the version and build number of ASA that you are using.


Quote:
1) Is there way to set timeout per SQL statement.
Can you describe what you mean by this?

Quote:
2) How to invoke scripts as ASA server startup/shutdown.
You can set an EVENT to fire on server startup. See the online ASA docs:

ASA Database Administration Guide
Automating Tasks Using Schedules and Events
- Understanding events

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/



Reply With Quote
  #4  
Old   
Vu
 
Posts: n/a

Default Re: Setting SQL timeout - 12-08-2003 , 09:28 AM



First, sorry about not mentioned the version which is ASA 8.0.2.

1) Is there way to set timeout per SQL statement.
I meant if there is a way from database or from JDBC that I can
set a timeout for each SQL query that sends. I imagine the situation
that queries are queued up and some rejected by default timeout
(eperienced in oracle, I believe is one min per query, by setting it
longer the issue gone).

I have to send it back to you not to the groups because of some
problem with my email software here.



Sorry,
Vu




Greg Fenton <greg.fenton_NOSPAM_ (AT) ianywhere (DOT) com> wrote

Quote:
Nguyen, Vu [SKY:QW54:EXCH] wrote:

Please *always* post the version and build number of ASA that you are using.


1) Is there way to set timeout per SQL statement.

Can you describe what you mean by this?

2) How to invoke scripts as ASA server startup/shutdown.

You can set an EVENT to fire on server startup. See the online ASA docs:

ASA Database Administration Guide
Automating Tasks Using Schedules and Events
- Understanding events

greg.fenton

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.