Unix Technical Forum

SQL Query hang

This is a discussion on SQL Query hang within the Informix forums, part of the Database Server Software category; --> Hi Everyoe, I am using IDS 9.3. I have a very tricky situation to deal with. Here it is: ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:46 PM
Anu_R
 
Posts: n/a
Default SQL Query hang


Hi Everyoe,



I am using IDS 9.3.



I have a very tricky situation to deal with. Here it is:



I have to issue a SELECT Query on a user defined database/table which
will hang. And most important : it should be the only statement I issue
in that particular dbaccess session.



I am also thinking if there is a way to corrupt a database so that the
SELECT statement does not work....



Please ... help...



Regards,

Anu_R


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 07:46 PM
John Carlson
 
Posts: n/a
Default Re: SQL Query hang

On Tue, 16 Sep 2003 12:28:15 -0400, Anu_R <member30973@dbforums.com>
wrote:

>
>Hi Everyoe,
>
>
>
>I am using IDS 9.3.
>
>
>
>I have a very tricky situation to deal with. Here it is:
>
>
>
>I have to issue a SELECT Query on a user defined database/table which
>will hang. And most important : it should be the only statement I issue
>in that particular dbaccess session.
>
>
>
>I am also thinking if there is a way to corrupt a database so that the
>SELECT statement does not work....
>
>
>
>Please ... help...
>
>
>


Please post....
1. the query itself
2. the schema(s) for the affected table(s)
3. the query plan

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 07:47 PM
Anu_R
 
Posts: n/a
Default Re: SQL Query hang


Hi John,



I dont have any query/query plan/schema.



I need to create a new simple database myself and think of SELECT
statement that would hang. But most important as I mentioned is, it
should be a SELECT statement that is hanging and should be only
statement in the session.



I was also thinking if a dbspace is down will a SELECT statement
execute? OR can I corrupt the database such that any SQL statement
will hang.



Anu_R


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 07:47 PM
=?iso-8859-2?Q?Gorazd_Hribar_Rajteri=E8?=
 
Posts: n/a
Default Re: SQL Query hang

If you have 4GL at your disposal, then write a simple program that locks a record or a whole table and wait for some input. All SQL scripts and other programs accessing this record/table from other sessions will hang. Example of 4GL program:

DATABASE sampleDB
MAIN
DEFINE
cDummy CHAR(1)
SQL
LOCK TABLE myTable IN EXCLUSIVE MODE
END SQL
PROMPT "Press enter after finished..." FOR cDummy
END MAIN

Gorazd

"Anu_R" <member30973@dbforums.com> wrote in message news:3376504.1063729695@dbforums.com...
>
> Hi Everyoe,
>
>
>
> I am using IDS 9.3.
>
>
>
> I have a very tricky situation to deal with. Here it is:
>
>
>
> I have to issue a SELECT Query on a user defined database/table which
> will hang. And most important : it should be the only statement I issue
> in that particular dbaccess session.
>
>
>
> I am also thinking if there is a way to corrupt a database so that the
> SELECT statement does not work....
>
>
>
> Please ... help...
>
>
>
> Regards,
>
> Anu_R
>
>
> --
> Posted via http://dbforums.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2008, 07:48 PM
Anu_R
 
Posts: n/a
Default Re: SQL Query hang


Thanks!! Unfortunately i have only dbaccess. Can I do the same in
dbaccess:



Session:1



Lock the table



Session:2



SELECT * from table



Will that hang? I think it will return a ISAM error code and not hang.



Any thoughts?

Anu_R


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-19-2008, 07:48 PM
Gorazd Hribar Rajterič
 
Posts: n/a
Default Re: SQL Query hang

It depends on how you have configured waiting time in Session2. If you SET
LOCK MODE TO WAIT 0 it will wait indefinitely.

Gorazd

"Anu_R" <member30973@dbforums.com> wrote in message
news:3384104.1063857165@dbforums.com...
>
> Thanks!! Unfortunately i have only dbaccess. Can I do the same in
> dbaccess:
>
>
>
> Session:1
>
>
>
> Lock the table
>
>
>
> Session:2
>
>
>
> SELECT * from table
>
>
>
> Will that hang? I think it will return a ISAM error code and not hang.
>
>
>
> Any thoughts?
>
> Anu_R
>
>
> --
> Posted via http://dbforums.com



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-19-2008, 07:49 PM
Anu_R
 
Posts: n/a
Default Re: SQL Query hang


Hi,



Thanks. I dont want to use any statement except for the SELECT in
session2. I am aware that issuing a SET LOCK MODE in 2nd session will
cause the SELECT to hang.



But, I need to only use a SELECT statement.



So, I was thinking if I can corrupt the database in some way, probably
SELECT might hang.



How about your ideas?



Anu_R


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-19-2008, 07:49 PM
Gorazd Hribar Rajterič
 
Posts: n/a
Default Re: SQL Query hang

More than a year ago we experienced such kind of trouble. Later we found out
that index was corrupt, but I have no idea on how to do it on purpose.

Gorazd

"Anu_R" <member30973@dbforums.com> wrote in message
news:3388891.1063940718@dbforums.com...
>
> Hi,
>
>
>
> Thanks. I dont want to use any statement except for the SELECT in
> session2. I am aware that issuing a SET LOCK MODE in 2nd session will
> cause the SELECT to hang.
>
>
>
> But, I need to only use a SELECT statement.
>
>
>
> So, I was thinking if I can corrupt the database in some way, probably
> SELECT might hang.
>
>
>
> How about your ideas?
>
>
>
> Anu_R
>
>
> --
> Posted via http://dbforums.com



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-19-2008, 07:50 PM
Obnoxio The Clown
 
Posts: n/a
Default Re: SQL Query hang

Gorazd Hribar Rajterič wrote:

> More than a year ago we experienced such kind of trouble. Later we found
> out that index was corrupt, but I have no idea on how to do it on purpose.


Try running your disks on a separate power supply from the server, then pull
the plug from the server. That ought to do it. )

--
"C'est pas parce qu'on n'a rien ŕ dire qu'il faut fermer sa gueule"
- Coluche
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-19-2008, 07:50 PM
Obnoxio The Clown
 
Posts: n/a
Default Re: SQL Query hang

Malc P wrote:

> Obnoxio The Clown <obnoxio@hotmail.com> wrote in message
> news:<bked9f$o5bl$1@ID-64669.news.uni-berlin.de>...
>> Gorazd Hribar Rajterič wrote:
>>
>> > More than a year ago we experienced such kind of trouble. Later we
>> > found out that index was corrupt, but I have no idea on how to do it on
>> > purpose.

>>
>> Try running your disks on a separate power supply from the server, then
>> pull the plug from the server. That ought to do it. )

>
> The voice of bitter experience, I surmise?


Not my own, but it's probably quite a good way of rogering a system.

--
"C'est pas parce qu'on n'a rien ŕ dire qu'il faut fermer sa gueule"
- Coluche
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com