SQLDeveloper on macosx 10.5 & killing a query
When a search runs for a long time and I kill it (red button), I am unable to do another search until I quit and restart the application, made worse because I now can not quit the application but must do a force-quit from the operating system.
user12269273 wrote:
Thanks a lot for teaching me about 'Ctrl-Shift-N'. It's cool.
As for expected behavior in stopping queries.
It seems, this particular problem I was having had very little to do with SQLdeveloper itself. I was able to reproduce the same <A class=bodylinkwhite href="http://www.software-to-convert.com/adobe-flash-conversion-software/adobe-flash-to-h264-software.html"><FONT face=tahoma,verdana,sans-serif color=#000 size=1>flash</FONT></A> problem in SQLPlus. SQL I was using in the test was "execute dbms_lock.sleep(10)"
As I said, I was connecting to Oracle using SSH port forwarding and SSH tunnel does not seem to handle properly special 'urgent' packets used for canceling queries. It can be easily demonstrated with TCPDUMP, it's just not clear to do with it.
The reason I'm posting this is that maybe someone else has the same problem...It is good for reference, It is exactly what I need.
Similar Messages
-
I moved from TOAD to SQL Developer and am not an experienced programmer.
When a query gets away from me that I want to kill, I hit the red X button. SQL Developer will hang. Sometimes I will actually have to stop and restart the Oracle service to kill the query.
How do I kill a query immediately?This is probably due to the nature of your query rather than an sqldev bug, so the database won't let you cancel and sqldev just hangs there until it completes anyway.
You shouldn't have any trouble canceling a normal select. If you do, get back with DB/sqldev version and a reproducible script.
Also, it would be great if you can compare the same statement with TOAD. If it can be canceled there, it should be possible in sqldev too.
Last, you can always kill the whole session through sqldev's Monitor Sessions tool (in a second instance since the first one is blocked by your statement), the Enterprise Manager or the OS' KILL command.
Regards,
K. -
Killing Parallel Query Session
Hi,
I am running Oracle 11.2.0.1.0 on Solaris 5.10.
Couple of hours ago, I ran a job through DBMS_JOB (Yes, I need to use dbms_schedular), and in the job I used parallel query. Now I want to remove the job. Also I want to clean up the sessions. I can remove the job by doing DBMS_JOB.remove(job id). Is there a way that I kill one parallel query coordinator session, and it would automatically kill all the slave sessions?
Thanks and regards
Edited by: Fahd Mirza on Apr 22, 2010 11:57 AMThanks for the answer.
I have run the following query with output:
SQL> select ps.sid,s.username,ps.qcsid
from v$session s, v$px_session ps
where s.sid=ps.sid
and s.username='BIADM'; 2 3 4
SID USERNAME QCSID
91 BIADM 147
267 BIADM 147
290 BIADM 147
332 BIADM 147
345 BIADM 147
69 BIADM 147
92 BIADM 147
102 BIADM 147
222 BIADM 147
112 BIADM 147
73 BIADM 147
126 BIADM 147
136 BIADM 147
145 BIADM 147
170 BIADM 147
180 BIADM 147
276 BIADM 147
190 BIADM 147
221 BIADM 147
234 BIADM 147
214 BIADM 147
246 BIADM 147
270 BIADM 147
256 BIADM 147
278 BIADM 147
291 BIADM 147
309 BIADM 147
298 BIADM 147
323 BIADM 147
344 BIADM 147
2 BIADM 147
331 BIADM 147
134 BIADM 94
125 BIADM 94
156 BIADM 94
168 BIADM 94
181 BIADM 94
205 BIADM 94
191 BIADM 94
215 BIADM 94
232 BIADM 94
245 BIADM 94
255 BIADM 94
269 BIADM 94
292 BIADM 94
302 BIADM 94
280 BIADM 94
311 BIADM 94
147 BIADM 147
94 BIADM 94
50 rows selected.If I kill sessions with sid 147 and 94, shouldn'it it be killing all the sessions of BIADM?
REGARDS -
Hi, Group.
This seems like the type of question that has been asked / answered a million times before but a quick Google and a search in this forum didn't return what I was hoping for.
I have a Java application that issues SQL statements against an Oracle database (10g). Is there anyway I can have the Java application tell the database to kill a specific query? I know how to do this in SQL*Plus and so I could figure out a long-winded way of wrapping that in Java but I'm wondering if there isn't a "simple" hook that I can call that does what I want?
Cheers, MaxHi,
You can delete the query and query elements using RSZDELETE transaction.
Hope this helps... -
How to kill a Query In Shared Connection Pool
Is it possible to kill just a single "long running query" (and in this case after 5 seconds) when the connection is through a connection pool?
Environment is Exadata, about a 1500 Users making search query and may do a query for "THE%"
Is there a profile setting?
RegardsThis sounds like a perfect case for the Resource Manager, with which Exadata is very closely integrated. Here is an example,
http://www.orafaq.com/forum/mv/msg/121801/333625/0/#msg_333625 -
Better to write this query -- the UNION kills the query
Is there a better way to write this qery to avoid the union?
CREATE TABLE EMP
EMP_ID NUMBER,
LAST_NAME VARCHAR2(20),
FIRST_NAME VARCHAR2(20),
MID_NAME VARCHAR2(20)
CREATE TABLE EMP_NM
EMP_ID NUMBER,
LAST_NAME VARCHAR2(20),
FIRST_NAME VARCHAR2(20),
MID_NAME VARCHAR2(20)
INSERT INTO EMP
VALUES(
1, 'ANDERSON', 'SCOTT', NULL)
INSERT INTO EMP
VALUES
(2, 'KEVINSKY', 'KEVIN', NULL
INSERT INTO EMP_NM
VALUES(
1, 'ANDERSON', 'SCOTT', NULL)
INSERT INTO EMP_NM
VALUES(
1, 'LEE', 'SCOTT', 'K')
INSERT INTO EMP_NM
VALUES
(2, 'KEVINSKY', 'KEVIN', NULL )
INSERT INTO EMP_NM
VALUES
(2, 'ANDERSON', 'KEVIN', NULL )
SELECT
E.EMP_ID ,
E.LAST_NAME ,
E.FIRST_NAME ,
E.MID_NAME FROM
EMP E
WHERE
E.LAST_NAME =:LAST_NAME
UNION
SELECT
E.EMP_ID ,
E.LAST_NAME ,
E.FIRST_NAME ,
E.MID_NAME
FROM
SELECT EN.EMP_ID
FROM
EMP_NM EN
WHERE
EN.LAST_NAME =:LAST_NAME ) EN1 ,
EMP E
WHERE
E.EMP_ID = EN1.EMP_IDEXPLAIN PLAN without sort
SELECT STATEMENT Optimizer Mode=CHOOSE 171 K 6717
FILTER
TABLE ACCESS FULL EMP 171 K 5 M 6717
TABLE ACCESS BY INDEX ROWID EMP_NM 1 14 1
INDEX RANGE SCAN IDXEMP_ID 1 3
EXPLIAN PLAN WITH SORT
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=CHOOSE 171 K 7658
SORT ORDER BY 171 K 5 M 7658
FILTER
TABLE ACCESS FULL EMP 171 K 5 M 6717
TABLE ACCESS BY INDEX ROWID EMP_NM 1 14 1
INDEX RANGE SCAN IDXEMP_ID 1 3 -
Query killing Win2KServer box!
I am running an 8i installation on a Windows2000 Server box with 1 CPU and 512K RAM. Service Pack 2 has been installed. My database and server runs happily along...until...one of my reports that looks at a fairly large slice of the database (only about 300MB total in data) is submitted. The report is tuned to use all of the correct indexes..and in fact runs quickly when it runs. I have been working with Oracle for about 15 years. I have spent almost all of it working on Unix (a REAL O/S) machines. I have tweaked and tuned every imaginable init param on my database, turned on monitoring tools at the O/S level to see if my CPU or RAM is causing the issue. Here is the problem. The report runs fine (95% of the time) as long as NO other activity is happening on the server. Opening a Word document, having a user just sign onto the network (the machine is the domain controller). As soon as other activity happens, or 5% of the time when no other activity at all, the server stops responding completely...no keyboard....no mouse...no network accessibility. There are no errors logged, no "not enough resources so I'm gonna kill the query and the database" messages. It just DIES! Otindher than leaving MS (broken)-Windows behind....what else can I try???????
Hello,
use the dual table to populate the values using record group.Define the list style as "poplist"
Thanks -
Is there a way to kill a query running under a session without killing the session?
We are using connection pooling so for many front-end sessions, there is only one database connection open...
How do you kill a query executed by one of these front-end sessions without killing the database connection?
Thanks...Hi
My opinian is that it is not possible. There is no command to cancel query. It can be canceled from client side in multithread application only.
Regards
null -
How to cancel/kill a long SQL query?
For example, I issued a SQL query from Java, which may run for a long time, then, I want to cancel/kill it after a certain amount of time, how can I do it?
Also, is there a way to cancel/kill the query session in Oracle without using Java/JDBC?
Thanks!Yes. Either set it up automatically with Statement.setQueryTimeout()
or cancel the statement from a different thread, via Statement.cancel().
Joe Weinstein at BEA Systems -
Kill query on forms? Possible?
I have inherited a forms application, when it was developed 10 years ago having a select * from table_name on all tables was fine.
Now I have a form that still allows a full table scan- but now the table has over 200 million records. What would be the easiest way to stop a full table scan on this form? I am running forms 6i on a linux x86 platform. I was thinking to create an alert- but I can't get it to kill the query.
I am new to forms- because I have inherited this application.
Hitting cancel query- which exectues a KILL_FORM doesn't work- it hangs the form and the query still is active when I query v$session, v$process.
Sorry, to bother you, but I would like to get a good feel of which avenue to look at before I invest research time."Would maximum query time, or maximum records fetched work?"
The on-line help points out for this property
"Specifies the interaction mode for the form module. Interaction mode dictates
how a user can interact with a form during a query. If Interaction Mode is set to
Blocking, then users are prevented from resizing or otherwise interacting with the
form until the records for a query are fetched from the database. If set to Non-
Blocking, then end users can interact with the form while records are being
fetched.
Non-blocking interaction mode is useful if you expect the query will be
time-consuming and you want the user to be able to interrupt or cancel the query.
In this mode, the Forms runtime will display a dialog that allows the user to
cancel the query. "
Greetings...
Sim -
Can't kill query when I run using "statement" option
Help! I get an "X" to kill the query when I run a query using the "script"" option, but when I use the "statement" option I have no option I can find to cancel/kill the query. What should I do? I am using SQL Developer 2.1.1.64. In prior versions the "X" was always there. This has got to be a bug but I don't see this quetions posted anywhere else.
Please help!!! Thanks.
Edited by: user13064034 on Jul 9, 2010 10:06 AMOh... right, but that's only on SELECTs. I thought we were all referring to the still missing features discussed in-depth in 30EA2->2.1.*: Task Progress indication
K. -
Hi,
Sometimes my users run a BIA query by mistake or a hug BIA query that running too long, they want Basis to stop/kill their query sessions. They start the query from the Portal ->BI ->BIA. Given that they provide me user-id, I can go to the BI and kill their RFC sesssions. That would kill their RFC sesssions in the BI.
My question, how do I kill their sessions from the BIA so we can avoid memory over loaded? Any advice will be greatly appreciated.
Thanks.
MimosaHi Sebastian,
Thanks very much for your response. I thought the same but need second opinion to respond back to my client.
Could you advise me exact parameters allowed me to automatically stop long running/nonsense queries?
Thanks for your help.
Mimosa
Edited by: Mimosa on May 7, 2008 3:53 PM -
Old query taking substantial CPU time in AWR report
Hi,
We have a particular query which used to generate substantial CPU wait event in the AWR report.On of our DBA's killed the query some days back but still today's AWR report shows that particular query as the largest CPU consumer (50%). When I checked from the view V$SQL the last execution time was of 23-02-2011.
My question is after the query gets killed does it still show in the v$SQL ? And why is it still showing in the SQL BY ELAPSED TIME section ?
Please help.No it is a select statement. I AM PASTING THE QUERY BELOW.
select /*+ FULL(COMP_TM) FULL(TRANS_TM) FULL(INVC_TM) */
CUST_BE_ID ,
DISTR_BE_ID ,
FG_BE_ID ,
KIT_BE_ID ,
BG_ID_NO_BE_ID ,
ACTL_TERR_BE_ID ,
CORE_TERR_BE_ID ,
sum( JNJ_LIST_AMT ) AS JNJ_LIST_AMT,
sum( JNJ_PYMT_AMT ) AS JNJ_PYMT_AMT,
sum( JNJ_QTY ) AS JNJ_QTY,
sum( JNJ_REB_AMT ) AS JNJ_REB_AMT,
sum( JNJ_SLS_AMT ) AS JNJ_SLS_AMT,
sum( KIT_LIST_AMT ) AS KIT_LIST_AMT,
sum( KIT_QTY ) AS KIT_QTY,
sum( KIT_SLS_AMT ) AS KIT_SLS_AMT,
sum( FG_PYMT_AMT ) AS FG_PYMT_AMT,
sum( FG_QTY ) AS FG_QTY,
sum( FG_REB_AMT ) AS FG_REB_AMT,
sum( FG_SLS_AMT ) AS FG_SLS_AMT,
sum( FG_LIST_AMT ) AS FG_LIST_AMT,
to_date('15'||substr(COMP_TM.FISC_MO_CD,8,2)||substr(COMP_TM.FISC_MO_CD,3,4),'DDMMYYYY') AS TRANS_MO_DATE,
to_number(substr(COMP_TM.FISC_MO_CD,3,4) ) AS PRD_YR_CD,
to_number(substr(COMP_TM.FISC_MO_CD,8,2) ) AS PRD_MO_CD,
CONTR_PRD_TIER_NO,
COMP_TM.FISC_MO_OID AS COMP_MO_BE_ID,
CLSD_YR_FLG,
ADJM_TRANS_CD,
INVC_TM.FISC_MO_OID AS INVC_MO_BE_ID,
ORD_TYP_CD,
TRANS_TM.FISC_MO_OID AS TRANS_MO_BE_ID
from
FACT_DLY_ALGND_SLS F, DIM_TM_MV TRANS_TM,
DIM_TM_MV INVC_TM, DIM_TM_MV COMP_TM
/***** comment out for loading historical data.... ***/
WHERE F.PRD_YR_CD >= (select case when to_number(to_char(sysdate,'MM')) <= 3
then to_number(to_char(sysdate,'YYYY'))-1
else to_number(to_char(sysdate,'YYYY'))
end case from dual
-- and F.PRD_YR_CD = '2008'
AND F.COMP_DT_BE_ID=COMP_TM.BE_ID
AND F.TRANSACTION_DATE = TRANS_TM.DAY_STRT_PRD_OF_TM
AND TRANS_TM.DAY_OID = TRANS_TM.BE_ID
AND F.INVC_DT = INVC_TM.DAY_STRT_PRD_OF_TM
AND INVC_TM.DAY_OID = INVC_TM.BE_ID
group by
CUST_BE_ID ,
DISTR_BE_ID ,
FG_BE_ID ,
KIT_BE_ID ,
BG_ID_NO_BE_ID ,
ACTL_TERR_BE_ID ,
CORE_TERR_BE_ID ,
to_date('15'||substr(COMP_TM.FISC_MO_CD,8,2)||substr(COMP_TM.FISC_MO_CD,3,4),'DDMMYYYY'),
to_number(substr(COMP_TM.FISC_MO_CD,3,4) ),
to_number(substr(COMP_TM.FISC_MO_CD,8,2) ),
CONTR_PRD_TIER_NO,
COMP_TM.FISC_MO_OID ,
CLSD_YR_FLG,
ADJM_TRANS_CD,
INVC_TM.FISC_MO_OID ,
ORD_TYP_CD,
TRANS_TM.FISC_MO_OIDI am wrong in the previous post. Actually the elapsed time in the AWR was showing 840 mins. -
Table.Join/Merge in Power Query takes extremly long time to process for big tables
Hi,
I tried to simply merge/inner join two big tables(one has 300,000+ rows after filtering and the other has 30,000+ rows after filtering) in PQ. However, for this simple join operation, PQ took at least 10 minutes (I killed the Query Editor after 10
minutes' processing) to load the preview.
Here's how I did the join job: I first loaded tables into the workbook, then did the filtering for each table and at last, used the merge function to do the join based on a same field.
Did I do anything wrong here? Or is there any way to improve the load efficiency?
P.S. no custom SQL was used during the process. I was hoping the so called "Query Folding" can help speed the process, but it seems it didn't work here.
Thanks.
Regards,
QilongHi!
You should import the source tables
in Access. This will speed up the work of
PQ in several times. -
FIM Reporting and SCSM Database Query Issue
Hello,
We have been having issues with FIM Reporting, the ETL Process for some reason seems to be failing, we further drilled down and found that there was a SQL Query running on the SCSM database Server for a very long time.
"CREATE PROCEDURE dbo.[p_GroomManagedEntity] ( @TargetId uniqueidentifier, @RetentionPeriodInMinutes int, @GroomingCriteria nvarchar(max), @BatchSize int )
AS BEGIN DECLARE @LastErr int; DECLARE @RowCount int = 1; DECLARE @TotalRowCount int = 0; DECLARE @RetentionDateTime DATETIME; DECLARE @SelectEntitiesToBeGroomedStmt
nvarchar(max); DECLARE @CoreDeleteTypedEntitiesTable TypedManagedEntityType; DECLARE @TimeGenerated DATETIME = getutcdate(); DECLARE @Command nvarchar(MAX) DECLARE @GroomHistoryId
bigint DECLARE @Comment nvarchar(max); SET @Command = N'Exec dbo.p_GroomManagedEntity ' + CAST(@TargetId AS nvarchar(40)) + ', ' + CAST(@RetentionPeriodInMinutes AS nvarchar(10)) +
', ' + CAST(@GroomingCriteria AS nvarchar(100)) + ', ' + CAST(@BatchSize AS nvarchar(10)) -- Call the grooming history insert sproc EXEC @LastErr = dbo.p_InternalJobHistoryInsert @Command,
@GroomHistoryId OUT IF @LastErr <> 0 GOTO Err; CREATE TABLE #BaseManagedEntitiesToDelete ( BaseManagedEntityId uniqueidentifier
); -- Figure out the retention datetime SELECT @RetentionDateTime = DATEADD(mi, -@RetentionPeriodInMinutes, getutcdate()) -- Execute the grooming filter statement,
hence populate the table variable, with "BatchSize" many entities. WHILE (@RowCount > 0) BEGIN INSERT #BaseManagedEntitiesToDelete EXEC sp_executesql @GroomingCriteria,
N'@Retention DATETIME,@TargetTypeId uniqueidentifier,@NumOfEntities INT', @Retention = @RetentionDateTime, @TargetTypeId = @TargetId, @NumOfEntities = @BatchSize;
SELECT @LastErr = @@ERROR, @RowCount = @@ROWCOUNT; IF @LastErr <> 0 GOTO Err; IF (@RowCount >
0) BEGIN -- Convert the BMEIds to TMEIds. INSERT @CoreDeleteTypedEntitiesTable SELECT
TME.TypedManagedEntityId FROM #BaseManagedEntitiesToDelete D JOIN dbo.TypedManagedEntity TME ON D.BaseManagedEntityId
= TME.BaseManagedEntityId WHERE TME.IsDeleted = 0; SELECT @LastErr = @@ERROR;
IF @LastErr <> 0 GOTO Err; --
Use existing DDP code to delete the instances captured in the temp table. EXEC @LastErr = dbo.p_DDPWrapperForGroomManagedEntity @TimeGenerated, @CoreDeleteTypedEntitiesTable;
IF @LastErr <> 0 GOTO Err; TRUNCATE TABLE #BaseManagedEntitiesToDelete;
SELECT @LastErr = @@ERROR; IF @LastErr <> 0 GOTO Err; END
SET @TotalRowCount = @TotalRowCount + @RowCount; END -- Call the grooming history insert sproc to update status to success
SET @Comment = N'BaseManagedEntity: ' + CAST(@TotalRowCount AS nvarchar(10)) EXEC @LastErr = dbo.p_InternalJobHistoryUpdate @GroomHistoryId, 1, @Comment IF @LastErr <> 0
GOTO Err; RETURN 0 Err: -- Call the grooming history insert sproc to update status to failure. SET @Comment = N'BaseManagedEntity: ' + CAST(@TotalRowCount
AS nvarchar(10)) EXEC @LastErr = dbo.p_InternalJobHistoryUpdate @GroomHistoryId, 2, @Comment IF @LastErr <> 0 GOTO Err; RETURN 1 END"
Can somebody advise on what this query is really about and what is its fuction, we are thinking of killing this query since it has been running for a very long time, will that hamper or cause the database to corrupt.
Rgds,
Abhishek.Vijay,
Thanks for you reply.
I figure out a related bug:
Bug 12859472: Cannot browse store procedure in case-sensitive MS SQL Database
There are two possible workarounds:
1. Use a database name with capital letters
2. Do not use stored procedures, but access the tables directly.
The notes on the Bug ticket describes that the issue would be scheduled to be fixed in PS7 which is 11.1.1.8.
Cheers!
Leandro.
Maybe you are looking for
-
I bought music on my 3rd generation iPod touch, and now it won't play on my computer.
When I synced the songs, they show in iTunes in gray, with a sort of recyle symbol. I have iOS 5.
-
How to get Flash Player 10.1 r53 to work with Mac OS X 10.6.4.
I have the latest version of Flash Player on my Mac OS X 10.6.4 Snow Leopard computer but I can't get videos to play. I've read in Adobe comments that Flash Player 10.1 is not working on 64-bit systems (which is mine). How can I get a version of Fl
-
Hi, My application connects through JDBC to a MySql. The problem is that althgough mysql can store data that contains cyrillic characters (the cp1251 charset is set for the DB columns), when I try to get these values from database, i get only unreada
-
Why does idvd quit when i try to add media from iphoto?
In iDVD, whenever I click Media & then click Photos, it looks like i should be able to select items from iPhoto: But if I click any of the top-level items listed like Events or Photos, iDVD quits/closes without any error messages. This happens in bot
-
I know several people have entered posts about this but I thought it would be nice for Skype development to comment now that version 6.18.0.106 was released this week. The issues are that (1) user must manually delete history which deletes from the l