There are few shell scripts that use the isql to execute some sql statements on a Sybase database server. I see several Log Suspend messages in the logs and the problem is that the shell script exits with success.

The transaction log in database MAIN_DB is almost full. Your transaction is being suspended until space is made available in the log.

I need to intercept these Log suspend messages and report the correct error. How do I do this? I am not sure about how to proceed here. When it occurs there is no way it gets cleared and the database administrator has to kill the spid after a some time, but the script already exits with success. So, the data-transfer didn't actually happen and was aborted. This is the scenario I need to handle.

Please let me know how we would be able to intercept the Log Suspend and atleast wait for a particular time ?

Server Details (select @@version)

"Adaptive Server Enterprise/12.5.4/P/x86_64/Enterprise Linux/ase1254/2159/64-bit/OPT/Mon Nov  2 03:14:39 2009"

asked 29 Jan '13, 03:02

mtk's gravatar image

accept rate: 0%

edited 19 Feb '13, 10:53

Mark%20Culp's gravatar image

Mark Culp

Is that a question on Sybase SQL Anywhere (on which this forum is focussed) or on other Sybase databases (such as ASE)?

I'm asking as SQL Anywhere by default grows its log file automatically, and in case there's no further disk space available, I'd expect a different behaviour (e.g. SQLCODE -304: "Disk full '%1' -- transaction rolled back").

(29 Jan '13, 03:30) Volker Barth

@Volker Please see I have added server details.

(29 Jan '13, 03:52) mtk
Replies hidden

So apparently you are using Sybase ASE, a completely separate database product, unrelated to SQL Anywhere. - Please consider the general forum FAQ to find out how to get further help on ASE-related questions.

(29 Jan '13, 04:25) Volker Barth

The question has been closed for the following reason "Question is off-topic or not relevant" by Mark Culp 19 Feb '13, 10:42

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 29 Jan '13, 03:02

question was seen: 1,947 times

last updated: 19 Feb '13, 10:53