Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9204593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:44:48+00:00 2026-06-17T23:44:48+00:00

There are few shell scripts that use the isql to execute some sql statements

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:44:49+00:00Added an answer on June 17, 2026 at 11:44 pm

    You have two issues. One is the script does not detect errors correctly. Secondly the transaction log is filling up frequently.

    First the script needs to have the standard output AND the error output go to your log file. When you use the > it is using file descriptor 1. When you want to capture error output you need to use 2> for file descriptor 2. So the command would look like the following.

    isql > error.log 2> error.log

    Better yet use this

    isql 2>&1 > error.log

    The previous says to have file descriptor 2 go to file descriptor 1.

    Now to detect errors look for “Msg” which all errors have in front.

    Secondly to resolve the transaction log space, you need to grow the log size which should be on its own device. Then you need to set the threshold to dump the completed transactions to a disk file automatically. You need to investigate the following commands.

    sp_helpthreshold
    sp_addthreshold
    sp_thresholdaction
    

    Good SQL, good night.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a few Unix shell scripts where I need to check that certain
I know how to use locks in my app, but there still few things
I have an application that's locked down using forms authentication. There are few nightly
There are a few windows service projects in our codebase that follow this model,
I have a number of shell scripts that all look like this: #!/bin/bash cd
I was trying to do do some more shell scripting in the last few
I wrote a script that contains a few method definitions, no classes and some
I want to execute something in a linux shell under a few different conditions,
I am currently customizing a shell script that is used to launch a database
in my page there are few hidden field which are filled with the correct

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.