The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

Our company uses Micros POS which uses Sybase SQL Anywhere. We have a lot of scripts that use dbisql to extract data from the Micros databases. These scripts have been running for years with no dbisql issues. However, today when a script tries to run for one of our locations, dbisql simply freezes. I've tried different command line options but no matter what, I get nothing.

I tried running the dbisql directly on the command line like this:

c:>dbisql -datasource LOC1 c:filesf1.sql

and it just hangs.

We have dbisql version

What could cause it to completely freeze? These scripts have run hundreds of thousands of times without this issue occurring. Thanks!

asked 28 Mar '14, 13:50

raphael75's gravatar image

accept rate: 0%

It might not be dbisql itself freezing... it might be one of the SQL statements is blocked by another connection. Open another dbisql session in GUI mode (not executing a script) and run this command:

CALL sa_conn_info();

If the BlockedOn column is not zero, it will hold the connection Number of the connection that is blocking it.

For example (using SQL Anywhere 9), line Number=4 contains BlockedOn=6, which means connection 6 is blocking connection 4.

6,'ddd9-4','DBA',0,'2014-03-28 15:17:01.254',,,'CURSOR_OPEN','local','',1966,,0,0,1
5,'ddd9-3','DBA',0,'2014-03-28 15:15:24.486',,,'CURSOR_CLOSE','local','',0,,0,0,0
4,'ddd9-2','DBA',0,'2014-03-28 15:16:52.678',,,'STMT_EXECUTE','local','',5175,,6,35,0
3,'ddd9-1','DBA',0,'2014-03-28 15:15:24.230',,,'CURSOR_CLOSE','local','',0,,0,0,0

To find out more information about the cause of the block, run this:

CALL sa_locks();
For example, connection 6 has an exclusive lock on a row in table t:

If you want a database monitor to tell you about this kind of problem, maybe even send you an email, check out Foxhound...

alt text

permanent link

answered 28 Mar '14, 15:16

Breck%20Carter's gravatar image

Breck Carter
accept rate: 21%

edited 28 Mar '14, 15:43

Comment Text Removed
Your answer
toggle preview

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: 28 Mar '14, 13:50

question was seen: 1,623 times

last updated: 28 Mar '14, 15:47