SQL history Blocker
HelloOracle 10g.
Lets say that I have lived a lock of database 2 hours ago and I want to find what sql statement was blocking others.
I know that the sid of the blocker but I am unable to find the SQL of the inhibitor.
Also, when I check higher activity of enterprise manager shows only the boy.
I tried to run the queries at the bottom of the link, but it only shows information about the pending session.
http://oraclue.com/2009/10/15/blocking-locks-history/
How can I find the sql statement in the particular sid history?
Hello
If you can access the ASHES,
SID-> ASH-> SQL_ID-> V$ SQL...
Kind regards
Tags: Database
Similar Questions
-
2.1: SQL history ignore encoding
Hello.
I specified MS932 encoding in the environment preference tab.
Developer SQl recorded history in the file named 'SqlHistory.xml' MS932 of encoding.
I restart SQL Developer, history is broken.
I guess that history file is read without taking into account the encoding setting.
Should indicate something more?Is this the same thing reported in this 2.1: SQL history still not right... [Correction 2.1.1]?
theFurryOne
-
Hello
After SQL-Developer starting this morning (07/12/2009), SQL-history shows not all files even if the story (SqlHistory.xml) contains documents. Last record stored in the history file is dated 12/04/2009.
I am running XP SP3Already registered:
Bug 9156084 - RC1: HISTORY of SQL IS NOT LOADED ON STIMULUS SQLDEV-Turloch
-
HTML form in a "PL/SQL (anonymour block).
Hello
I need a little guidance ugent
I create a "form" in a "PL/SQL (anonymour block). The requirement is to show what looks like an HTML form as you build the code
The problem is that I'm "Place Setting" treatment of the APEX which is wwv_flow.accept... I've added an example below...
Any help very good home
Thank you
Pete
______________________________________________________________________________________________
HTP.PRN('<!) DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN".
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
(< html xmlns = "http://www.w3.org/1999/xhtml" > ');
HTP. PRN ("< style type =" text/css"> '");
HTP. PRN ('#form {do-family: "Trebuchet MS", Verdana, without serif; width: 25em ;}');})
HTP. PRN ('h2 {margin: 0 0 0 0; padding: 0 ;}}) ") ;
HTP. PRN ('p {margin: 0 0 1em 0; padding: 0; do-size: 90 %} ""});
HTP. PRN ('fieldset {background: #C361D2; border: none; margin-bottom: 1em; width: 24em; padding-top: 1.5em}');
HTP. PRN ('p.legend {background: #DED983;})
color: black;
Padding: .2em .3em;
Width: 750px;
do-size: 18px;
border: 6px start #DED980;
position: relative;
margin:-2em 0 1em 1em;
Width: 20em ;} ") ;
HTP. PRN ('fieldset {margin-bottom: 1em; width: 66em; padding-top: 1.5em ;}}) ") ;
HTP. PRN ('#company {background: #F3B4F5; border: departure #F3B4F5; width = "700" ;}}) ") ;
HTP. PRN ('#company tag {position: absolute;})
do-family: arial;
do-size: 16px;
Padding: .2em ;} ") ;
HTP. PRN (' input {margin-left: 9è; margin-bottom: .2em; line-height: 1.4em ;}}) ") ;
HTP. PRN (' #message1 {background: #a3B4F5; border: departure #a3B4F5; width = "700" ;}}) ") ;
HTP. PRN (' #message2 {background: #c3B4F5; border: departure #c3B4F5; width = "700" ;}}) ") ;
HTP. PRN ('button1 {make: 48px "Trebuchet MS", "Verdana", sans-serif;})
background: #F0888A;
{border: start #6EC6F1} ");"
HTP. PRN (' input #buttons1 {background: #DED983;})
{font: 1.2em "Trebuchet MS", Verdana, without serif} ");"
HTP. PRN ('p #buttons1 {white-space: nowrap} "");
HTP. PRN ("</style > '");
HTP. PRN ("< table width ="760"> < tr bgcolor ="#D5EAE9"> ');
HTP. PRN ("< BR > < BR > '");
HTP. PRN ("< form method =" "action =" "> ');
HTP. PRN ("< fieldset id ="company"> < class p ="legend"> < /p > company '");
HTP. PRN ("< label > Comapany name: < / label > < input name ="company"type ="Text"size ="30"/ >");
HTP. PRN ("< br > < br >");
HTP. PRN ("< / fieldset > '");
HTP. PRN ("< br > < br > < br >");
HTP. PRN ("< fieldset id ="message1"> < class p ="legend"> < /p > Message'");
HTP. PRN ("< / fieldset > '");
HTP. PRN ("< br > < br > < br >");
HTP. PRN ("< fieldset id ="message recu2"> < class p = 'legend' > two Message < /p > '");
HTP. PRN ("< / fieldset > '");
HTP. PRN ("< br > < br >");
HTP. PRN ("< / make >");
HTP. PRN ("< /tr > < / table > '");
End;
______________________________________________________________________________________________________Pete:
Delete the name attributes of all the entry elements defined by the process of pl/sql. For example
should be replaced byor
APEX accept process recognizes a predefined set of HTML form entry name. No matter which entry with a name not this game will result in the failure of the process accept. F01 through f50 are valid names for the acceptance procedure.CITY
-
pl/sql-anonymous block filled
Hello
I have executed this PL/SQL block without errors, but I don't see that the result .i can see anonymous block realized as a result.
I use SQL Developer...
Help, please
Set serveroutput on
declare
form constant char (20): = "square";
real (6) region;
side constant number (6): = 2;
PI constant number (4,2): = 3.14;
constant number of RADIUS (5): = 2;
Len number constant (5): = 3;
constant number of width (5): = 3;
Start
case
What = "square" shape then area: = side * side;
shape = "circle".
then
Start
area: pi = *(radius*radius);
dbms_output.put_line (' the area of the circle is :'|| area);
end;
what form = "reactangle."
then the area: = len * width;
on the other
Start
dbms_output.put_line (' not correct form ": form");
raise program_error;
end;
end case;
commit;
end;
/
Thank youto_learn wrote:
Hello
I have executed this PL/SQL block without errors, but I don't see that the result .i can see anonymous block realized as a result.
I use SQL Developer...displayed code performs as programmed.
Nothing Is displayed for the 'square '!
-
PL/SQL dynamic dynamic SQL SELECT block vs
Hello
I have a question about the best way to encode a dynamic SELECT INTO statement. Here are the 2 posiibilities I know:
_1. Dynamically, the execution of the SELECT statement and making use of the INTO clause the EXECUTE IMMEDIATE statement_
FUNCTION to CREATE or REPLACE get_num_of_employees (p_loc VARCHAR2, VARCHAR2 p_job)
RETURN NUMBER
IS
v_query_str VARCHAR2 (1000);
v_num_of_employees NUMBER;
BEGIN
v_query_str: = 'SELECT COUNT (*) FROM emp_.
|| p_loc
|| ' WHERE employment =: bind_job';
V_query_str EXECUTE IMMEDIATE
IN v_num_of_employees
Using p_job;
RETURN v_num_of_employees;
END;
/
_2. Encapsulation of the SELECT INTO statement in a block and dynamically exectuting the gabarit@sur
FUNCTION to CREATE or REPLACE get_num_of_employees (p_loc VARCHAR2, VARCHAR2 p_job)
RETURN NUMBER
IS
v_query_str VARCHAR2 (1000);
v_num_of_employees NUMBER;
BEGIN
v_query_str: = ' start
"SELECT INTO COUNT (*): into_bind FROM emp_"
|| p_loc
|| ' WHERE employment =: bind_job;
end;';
V_query_str EXECUTE IMMEDIATE
With the HELP of v_num_of_employees, p_job;
RETURN v_num_of_employees;
END;
/
I was wondering which way would be best? I know that the second method uses a variable binding for the INTO clause, but one also uses link varialbes (No. semicolon)? Differences in terms of efficiency or speed?
Thank you very much
Edited by: BYS2 October 19, 2011 01:23SELECT Dynamics also links the output - it no worries.
The dynamic PL/SQL block would result in a change in additional context of PL/SQL for SQL inside the block. It would be a very slight overhead.
I'd go for the SELECT dynamic - I see no reason to associate a PL/SQL block.
-
run in parallel sql statement block
Hello
I'm looking for a way to run 2 blocks from the sql statement at the same time in sqlplus
Block1
drop table CTSGLOB_TABLE;
create the table CTSGLOB_TABLE select * from CTSGLOB_VIEW;
create index TEMPS_CTSGLOB_IDX ON CTSGLOB_TABLE("TEMPS");
create index ORGA_CTSGLOB_IDX ON CTSGLOB_TABLE("ORGA");
create index RUBSRH_CTSGLOB_IDX ON CTSGLOB_TABLE("RUBSRH");
Block2
drop table CTSGLOB_TABLE_2;
create the table CTSGLOB_TABLE_2 select * from CTSGLOB_VIEW_2;
create index TEMPS_CTSGLOB_IDX_2 ON CTSGLOB_TABLE_2("TEMPS");
create index ORGA_CTSGLOB_IDX_2 ON CTSGLOB_TABLE_2("ORGA");
create index RUBSRH_CTSGLOB_IDX_2 ON CTSGLOB_TABLE_2("RUBSRH");
I know that I can open 2 client session to run, but I would like to know another way.
Best regards
Jean-MarcWell, that depends on what you mean exactly when you say "run 2 blocks from the sql statement at the same time in sqlplus '...
You can also copy all statements in a sql script and run that, just.
If this isn't what you want, then please explain why. -
Oracle SQL Developer 3.0: Debugging of PL/SQL anonymous blocks: ISSUES
Hello
I just downloaded the Oracle SQL Developer 3.0. I used EA versions because they have emerged and was happy to see the final version. So I immediately tried to debug an anonymous block (something I was not looking to do in EA versions) and nothing happened.
The "Debug" is grayed out and the string 'ctrl-SHIFT-F10' key did nothing. I found this forum:
and Vadim Tropashko follow-up advice. This has nothing to my anonymous block but has worked well for a simple example.
So I started to whittle my anonymous block to the bottom to find the culprit, here's a breaking point repeatable for me:
The moment that I SELECT INTO... XMLTABLE() it fails (a normal SELECT INTO works very well).declare stmt1 long; stmt2 long; stmt3 long; stmt4 long; p_data varchar2( 500 ); i varchar2( 10 ); BEGIN STMT1 := 1; STMT2 := 1; STMT3 := 1; STMT4 := 1; --the moment this is in the block "Debug" is no longer an option select SendDocumentResult into p_data from XMLTABLE( '/data' PASSING xmltype.createxml( '<?xml version="1.0" encoding="utf-8"?><data><SendDocumentResult>test</SendDocumentResult></data>' ) COLUMNS SendDocumentResult varchar2( 1000 ) PATH 'SendDocumentResult' ) ; end;
Is this a problem with my environment or there's a problem with SQL Developer 3.0.04. Overlooking the comments of K, it seems that debugging has worked for 'simple' blocks, so I wonder if it's just out of reach...
My environment:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production CORE 11.2.0.1.0 Production TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production NLSRTL Version 11.2.0.1.0 - Production and Oracle SQL Developer 3.0.04 (Buld Main 04.34 with bundled Java) on a Window's XP box.
The analysis has been the problem indeed. Can offer no alternative workaround, that packing horror XML in a view.
-
How we refer the anonymous block in PL/SQL? And what is the purpose of anonymous blocks?
This can be useful
http://DocStore.Mik.UA/orelly/Oracle/PROG2/ch15_03.htm -
Hello
I use the apex of oracle 10g 3.2
I want to display some fields in a table format for which I use anonymous pl/sql block.
I use the slider for that.
declare
News c is select...
Start
I'm in the loop c
-----------
HTP.p ();
---------
end loop;
end;
Databasetable A has 3 columns.
Name of the person, education, brands.
Now, a person can have more than one education as
A 12TH-90
A 10-98
B - b - 90
Now if I just use a slider I row-by-row and I just use htp.p and display fields.
Now what I want is whenever there are more then one entry for a person I want to view together
that is in one table itself all the information should be there.
p. ex. A - 10th, 12th - 98.90
B - b - 90
So in a page, you need only one table for each person. If there are more entries for a person in the db table,
then I should the club upward?
How can I reach it?
Thank youHello
See aggregation Techniques String
* 009 *.
-
PL/SQL anonymous block - try to call the function within cursor
Hello-
I need to create an anonymous block that contains a cursor and function. I want to call the function from the cursor and function will essentially have an ID as parameter and will return a list of values comma separated.
However, when I try to do it I get the error 'function 'GET_PAYMENT_DATES' is not usable in SQL.
Does anyone know of a workaround? I'm trying to avoid having to store this function.
Thank you
ChristineWell you can't do this using an sql not stored function.
What you could do is to increase your sort_area_size which can help you to overcome the performance Bug.for example: alter session set sort_area_size = 64000;
other than that, it seems that you need a stored function
-
DBA dear friends,
DB - 11.1.0.7
I have borrowed in line for deletion in bulk in a table PL/SQL procedure. I'm trying to figure this out before the implementation-
My table has a 22 millions of files, I need to delete records more of 14 days (about 15 million), then confirm each record 500 K.
Do the Execute procedure below actually achieve?
SQL > EXEC DSB. ORDER_PURGE ("14").
This is the syntax of PL/SQL successfully created in the database-
CREATE OR REPLACE PROCEDURE DSB. ORDER_PURGE (p_retention IN PLS_INTEGER)
IS
-This set to the largest a number as will support your restore/cancel
v_delete_limit PLS_INTEGER: = 500000;
BEGIN
IF p_retention > 0
THEN
LOOP
DELETE from ord.order where cre_dttm < trunc (sysdate) - p_retention
AND ROWNUM < = v_delete_limit;
WHEN THE OUTPUT SQL % ROWCOUNT = 0;
COMMIT;
END LOOP;
COMMIT;
END IF;
Ord.order END of purge.
/
Your method is one of the methods of REMOVING BULK. As others have commented it seems that COMMIT in a LOOP is always a terrible thing but I'm not on it. It is above all a bad idea, but not always.
There could be several approaches:
1. search Ask Tom remove the site for CATS and in bulk. He recommends Tom create a table with the required lines (to not not deleted rows). Then, slide / truncate the old table and use your intermediate table for recreation.
2. use of ROWNUM, something like you did it
BEGIN
LOOP
REMOVE the TABLE Table_name WHERE
AND ROWNUM<=>=> -print the lines if you wish
WHEN THE OUTPUT SQL % ROWCOUNT = 0;
COMMIT;
END LOOP;
END;
It has its own advantages and disadvantages. I saw the site of Laurent Schneider where Tom Kyte also commented on. Very interesting discussions. You can take a look.
http://laurentschneider.com/wordpress/2013/04/delete-one-billion-row.html
3. use of DBMS_PARALLEL_EXECUTE (and why the version of your database is important)
4. the use of the cursor and PL/SQL bulk operation, I think the worst of all these.
-
Timestamp indicating incorrectly in SQL history
HelloSQL Developer version 4.0.0.13, the timestamp was not properly in the historic window of SQL
SQL for today - January 3, 14 shows with a timestamp of 1 March 14
Looks like that the day and month have been reversed when formatting.
Bugs of all sorts of fun it - they were processed for our next patch/version and the developer tells me, on the contrary, the product should be faster and more responsive in this area.
-
the selection of the PL/SQL nested block table error...
SQL > create type string_table is the table of the varchar (100);
2.
Type of creation.
declare
v_names string_table: = string_table();
Start
v_names. EXTEND (3);
v_names (1): = "Name1"
v_names (2): = "Name2";
v_names (3): = 'name3 ';
dbms_output.put_line (v_names (1));
dbms_output.put_line (v_names (2));
dbms_output.put_line (v_names (3));
dbms_output.put_line (v_names. COUNT());
Select * from table (v_names);
end;
/
Select * from table (v_names);
*
ERROR on line 12:
ORA-06550: line 12, column 7:
PLS-00428: an INTO clause in this SELECT statementSelect * from table (v_names);
I guess, here you have tried to put the contents of the NT NT one another, or simply trying to print it.
But I don't think that INTO Clause is mandatory here.Please check your modified code (w/o INTO) and the output:
DECLARE TYPE string_table IS TABLE OF VARCHAR (100); v_names string_table := string_table (); v_test string_table := string_table (); BEGIN v_names.EXTEND (3); v_names (1) := 'name1'; v_names (2) := 'name2'; v_names (3) := 'name3'; DBMS_OUTPUT.put_line ('Old collection - '||v_names (1)); DBMS_OUTPUT.put_line ('Old collection - '||v_names (2)); DBMS_OUTPUT.put_line ('Old collection - '||v_names (3)); DBMS_OUTPUT.put_line ('Old collection - '||v_names.COUNT ()); DBMS_OUTPUT.put_line (CHR(10)); /* SELECT * FROM TABLE (v_names); */ v_test := v_names; DBMS_OUTPUT.put_line ('New collection -- '||v_test (1)); DBMS_OUTPUT.put_line ('New collection -- '||v_test (2)); DBMS_OUTPUT.put_line ('New collection -- '||v_test (3)); DBMS_OUTPUT.put_line ('New collection -- '||v_test.COUNT ()); DBMS_OUTPUT.put_line (CHR(10)); /* Printing using FOR LOOP */ FOR i IN v_test.FIRST..v_test.LAST LOOP DBMS_OUTPUT.put_line ('In FOR Loop --- '||v_test (i)); END LOOP; EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('Error ' ||SQLERRM|| DBMS_UTILITY.format_error_backtrace); END;
gives o/p:
Old collection - name1 Old collection - name2 Old collection - name3 Old collection - 3 New collection -- name1 New collection -- name2 New collection -- name3 New collection -- 3 In FOR Loop --- name1 In FOR Loop --- name2 In FOR Loop --- name3
See this link - http://docs.oracle.com/cd/E11882_01/appdev.112/e17126/tuning.htm#CIHGGBGF
Published by: Vanessa B on 26 December 2012 14:29
-modified codePublished by: Vanessa B on 26 December 2012 14:45
LOOP FOR-updated - added 'again' code -
Region of HTLM apex 4.0 Refresh (sql/pl sql anonymous block)
Is it possible to update this area of dynamic action through refreshment?
No luck for me.
Thank youHello
M don't know if pl/sql refreshment APEX 4.x area or not...
But there is a work around to do the same thing to the point 3.2 and will work for 4.0...
Instead of the region of PL/SQL create HTML Region and enter the source
Then, through a combination of javascript and ondemand process... fill your div with content you want...
Kind regards
Shijesh
Maybe you are looking for
-
Hello guys,. To open the screws dynamically, instead of Hardcoding the name VI in a constant string, I do as indicated below to keep addictive for my VI, so if someone ever delete the VI of the project, move, rename, it will create a wire broken some
-
I get this message what it means?
I have windows vista and a few days ago I started getting the message "WINDOWS has DETECTED AN IP ADDRESS CONFLICT. ANOTHER COMPUTER ON THE NETWORK HAS THE SAME TO IP ADDRESS OF THIS COMPUTER. CONTACT YOUR NETWORK ADMINISTRATOR FOR ASSISTANCE IN RESO
-
to get a new email, I put in the name of the incoming and outgoing server. where can I find them?
-
Recover/reinstall Word &; Excel on SP3 without disks (installed online)
Years ago bought Inspiron laptop Windows XP Home Edition 2002 Service Pack 2 and have reinstall disks for this. Two years ago, updated online to SP3 - have not all discs. A month ago I deleted without totally know Word and Excel try to free up spac
-
BlackBerry smartphone SD Card Info on 9999 "BOLD"
How to view SD card on the 9900 info to check the size of the map, use, free space, etc.?