SQL & PL/SQL :: Session Is Killed But Locks Not Released
Jun 8, 2011
On DB123, I have 2 KILLED sessions which are not disappearing and are holding locks on some tables in ONE schema.
The sessions belonged to ETL process and I have killed them last Friday after they have been hanging for 3 days. Unfortunately, I've also killed the corresponding Unix session - and now I've read on the Internet that in those cases the KILLED sessions might be hanging forever (=until the DB is shutdown).
how to remove these locks.
View 5 Replies
ADVERTISEMENT
Apr 23, 2013
How to kill of a killed session?
I had killed inactive session using alter system kill session 'sid,serial#';
after that that sessions marked as killed and still get in v$session.
Then i try to get spid so that i can killed then from os command kill -9 spid
but when i try to get that join with v$process, no row select.
select * from v$session where username ='CAS' and status ='KILLED'
return 205 records.
select p.*,s.username,s.program,s.machine,s.status from v$process p,v$session s
where p.addr=s.paddr and s.status='KILLED'
return no record.
View 24 Replies
View Related
Oct 27, 2010
I killed some 70 sessions which where inactive couple of days ago using alter system kill session(sid,serial#) immediate;
But even after killing them it still exists in the v$session view when I query select sid,serial# from v$session where username is not null; It has the same sid and serial#....I tried killing them every now and then but it still shows those exists
View 3 Replies
View Related
Jan 30, 2013
I need the procedure that killed root blocker in RAC environmental 10g, I found the stored procedure for 11g which simple but 10g required some expertise because I want to just exec [procedure] it will kill root blocker either locally and remote node
View 5 Replies
View Related
Nov 19, 2012
I have an urgent requirement to kill an existing session if a new session starts for the same user. I have been reading lot of blogs and posts on the above topic, but could clearly tell me how to do it.
I thought of putting a process in 101 page when login button is pressed to catch this and kill the old session.
View 7 Replies
View Related
Oct 23, 2012
We are using Apex 4.0/Oracle 10gR2/ Hp-Ux, We noticed that there is a process Running in Two Sessions that seems running since 3 Hours using 60% CPU,** 30% given below sql it executes in two Sessions!
declare function x return boolean is begin -- if instr(upper(:F4000_P4651_PLUG_SOURCE),'ORDER BY')>0 then
declare
l_position number := 0;
begin
loop
l_position := instr(upper(:F4000_P4651_PLUG_SOURCE),'ORDER BY ',l_position + 1) ;
exit when instr(upper(:F4000_P4651_PLUG_SOURCE),'ORDER BY ',l_position + 1) = 0 ;
[code]....
View 4 Replies
View Related
May 13, 2011
I have the below questions on the locking mechanism in a partition table. Example I execute the below query,
delete from table_name subpartition (subpartition_name);
In that case,
1. If we perform above query, then which level of lock is happened to the table/partition & sub-partitions?
2. If we perform above query on same sub-partition of the same table with different where clause, what will happen?
3. If we perform above query for same table but different sub partition at same time, what will happen?
View 2 Replies
View Related
Apr 13, 2013
oracleDatabase version:11gR2
Os:solaris
how to check locks on database objects .it might be any lock? any select sql query to check database object levlel locks?what basis locks will occur?
View 3 Replies
View Related
Feb 25, 2012
I have a sql script where triggers, procedures and functions are written. The triggers are causing db outages and causing problems in the application as well.
I am trying my best but with my low experience and expertise, am not able to make good progress.
Scenario: Course enrollments are inserted, deleted and updated in course_main and course_users table. This is done in gui as well as in background snapshot scheduler in a cron process. Course_main table contains all course enrollments and course_users table has crsmain_pk1 as foreign key.
Its quite a big file and am not sure what should i paste here so am uploading the file in txt.
View -1 Replies
View Related
Oct 8, 2012
We have encountered dead locks in EBS R12 Database 10.2.0.3. Even after bouncing the appstier and dbtier completely does not release the locks. How to clear the locks?
View 4 Replies
View Related
Aug 28, 2013
Instead of giving permission directly to v$session and gv$session to a developer, Is there any other way to do the same?
View 3 Replies
View Related
Jan 6, 2011
Under what scenarios do we lock a table in the exclusive mode.
View 1 Replies
View Related
Aug 23, 2010
I have a job which runs the procedure below concurrently in 4 different sessions; It updates two tables.
PROCEDURE UPDATE_TAB_1_AND_TAB_2( traceIdTab IN pl_sql table,
individualIdTab IN pl_sql table,
fileSeqIdTab IN pl_sql table,
[Code].....
Each session is passed a sequence generated file ID; so the records processed in each session are completely different.
However, everytime this job runs, without failure, ONLY TWO sessions process concurrently, while the other two sessions are blocked. Once the first two have finished, then the remaining two sessions start work.
I have being monitoring the sessions on each run daily, and realized that the first two sessions processing are each holding a transaction exclusive lock on objects; hence blocking the other two sessions.
When I tried to find the objects that the two running sessions have a lock on, I cant seem to find anything by searching DBA_OBJECTS.object_id. However, when I look for the objects that are being waited on, its either a partitioned table or a partitioned index on either table_1 or table_2.
At first, I thought it was an ITL lock and after much analysis, I did not find anything which definitely pointed to an ITL lock. However, just to make sure, I increased the INITTRANS value from 2 to 5, but the problem did not go away.
At this point, I have applied all I know to understand the origin of the TX lock and how I can work around this situation, and decided to ask higher powers in Oracle for advise.
View 4 Replies
View Related
Sep 6, 2010
I used v$locked_object and v$lock query to get the output.. But still I'm an one year exp in ORACLE. How to analyze the output of lock queries. what are the parameters to be analyzed on AWR report.
How to do proper performance checkup in ORACLE database as well analyze it.
View 4 Replies
View Related
Jun 30, 2011
At a customers site I see lot of long lasting library cache locks during a complex ETL run. Several Sessions run in parallel and create Database tables with dynamic sql ( CREATE TABLE AS SELECT ....) .
Sometimes these procedures wait for each other with wait event 'Library Cache' . I presume that this is a side effect of the dynamic DDL in the stored procedures. Is that possible even when the Procs create different Tables but reference the same tables in their SELECT clauses ?
I presume that this is plausible but I need some arguments to convince my colleagues.
View 1 Replies
View Related
May 24, 2012
After ran db health check, my database report gives the following details
dml_locks OK. dml_locks = 3396, transactions = 849.
View 6 Replies
View Related
Nov 8, 2011
how to avoid blocking locks.
View 27 Replies
View Related
Jun 29, 2012
writing a script where there is a blocking lock for more than 30 minutes ?
View 2 Replies
View Related
Aug 21, 2012
How to view the number of locks defined for a database? I am using Oracle 10g.
How to calculate the number of locks for a given sql select statement?
say for example,
select a.eno,b.ename,c.salary,d.dob,e.address
from a,b,c,d,e
where...
...
..
Assume all of them are row level locking.
I want to calculate the number of locks . How many locks will be held while running the above query?
View 16 Replies
View Related
Aug 3, 2011
My code executes a Select For Update before updating a table. In some cases the network is disconnected and it causes the lock to hang. Then, I must kill the session in order to realese this lock.
I want to do it automatically. I would like to create a job that kills session that has a lock due to Select For Update that is not alive.
View 18 Replies
View Related
May 6, 2011
I have a forms 11g application that of course has several message and alert windows that pop up when various errors or messages need to be displayed. This all works great on the developer machine, but when I try and run the form on another machine using any browser the message and alert windows appear to be hidden and the application locks up with the rolling bar across the bottom. I would guess it is waiting for a response, but I cannot get the window to appear.
Following is an example of an alert to be displayed:
declare
vAlertButton number;
begin
vAlertButton := show_alert('NO_EMAIL');
end;
View 1 Replies
View Related
Oct 18, 2010
Scenario:
Our application is using a two instance, one for the live active data and the other for the reports data. We have a process which moves the data from the live instance to reports instance every night. In a single db environment the process is working without any issues. However when we move to the RAC environment the reports db's (insert) in large table get locked and we are unable to insert data to the reports db.
What we are performing is:
Insert into my_table_rpt select * from may_table_live@db_link_to_livedb;
Issues:
my_table_rpt get locked
We have found the workaround by disable locking in destination and subsequent to the insert enable locking
ALTER TABLE my_table_rpt DISABLE TABLE LOCK;
Insert the data to the reports database table
Then
ALTER TABLE my_table_rpt ENABLE TABLE LOCK
Question:
Why does the large destination table (my_table_rpt) get locked in the RAC environment?
View 2 Replies
View Related
Jun 15, 2012
explain v$session and gv$session ;
View 3 Replies
View Related
Dec 23, 2009
I am connecting to Oracle 9i using JDBC in my JSP/Servlets web pages. I am closing all my connections in Finally blocks.
Everything works great during the day with JDBC and Oracle.But after a Web crawler runs through our web server at 3 AM the next morning a v$session check shows several lines of JDBC Thin Client inactive status. find exactly what sql statement or program that could be causing the JDBC Thin Client to show up?
View 1 Replies
View Related
Sep 26, 2011
I just upgraded my version of my oracle from 9 to 11.2g.When I tried to execute some queries in PL/SQL i keep getting an
annoying error : "ORA-01843 not a valid month."
I realized that if I execute the following query:alter session set NLS_DATE_LANGUAGE=AMERICAN;before every query that I want to execute, then it's executed fine.
I preformed the next queries:
1. select * from nls_database_parameters;
2. select * from nls_instance_parameters;
3. select * from nls_session_parameters;
and I saw that the fields in the "nls_session_parameters" vieware not derived from "nls_database_parameters" "nls_instance_parameters".
How can I derive the parameters from the instancedatabase view into the session view?I want that the "nls_date_language" parameter will always be 'AMERICAN'.
View 3 Replies
View Related
Aug 28, 2012
i read some articals of how to trace oracle sessions and i have some question
i use database 10g
trace vs event ??? different between them ????
how to trace individual statement i hope to give me this point in ex: due to i can't get the sql_id ,how to know the sql_is of specify statement??
View 6 Replies
View Related
Jul 18, 2013
i have application where user logs and perform manipulation operation such as insert and update on database table.some time its possible that same user login twice, i just want to hold one sessionĀ until and unless dml operation perform by another session gets complete.how to accomplish this in database levelĀ .
View 6 Replies
View Related
Mar 14, 2013
How to create a new session from a pl/sql. My requirement is that i will package which should run on new session and execute it.
BEGIN
A; --Calling package
B; --Calling package and this should run on new session.
C; --Calling Package
end;
Now when I will run the this plsql block, then A,C should execute will run in this package only but B will run separate session.Whole idea to have better performance. I heard we can use PRGMA AUTONOMOUS_TRANSACTION, but this is not working.
View 3 Replies
View Related
Jan 31, 2013
I have tables SUBJECT(subject_id, name, number) and PS(ps_id, subject_id, student_id). I need to select all from SUBJECT,subject_id and student_id from SP, joined by subject_id, where student_id needs to be read from session. I'm using asp.net with oracle database. How to get the value from the session.
View 2 Replies
View Related
Nov 22, 2010
I have a user in my oracle database, I would like to know details such as, how many times and by using which tools same user has got logged for past one week.
How do I do that. I have sql which shows the current session either he is logged in, if so then which application or not logged in. But I required the information for past one week How do I get those details.
View 1 Replies
View Related