473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

assotiating SQL text from the V$%SQL% views with sessions

Hi,
Is there any way to associate SQL text from the V$%SQL% views with
sessions.

A piece of code in our application locks up a critical table about
once a month. I suspect that the code is not committing one or more
transactions on that table.

I can find out which session is locking that specific table and I can
detect the locking of the table about 2 min after it happens. I tried
looking at V$%SQL% views but couldn't associate code with sessions.

I'm not permitted to trace changes to that specific table (or any
other table).

Is there a way of associating code with SID or time/timestamp via the
V$%SQL% views (or any other views).

Thanks,
Doron
Jul 19 '05 #1
1 7011
do*********@msn.com (Doron) wrote in message news:<99**************************@posting.google. com>...
Hi,
Is there any way to associate SQL text from the V$%SQL% views with
sessions.

A piece of code in our application locks up a critical table about
once a month. I suspect that the code is not committing one or more
transactions on that table.

I can find out which session is locking that specific table and I can
detect the locking of the table about 2 min after it happens. I tried
looking at V$%SQL% views but couldn't associate code with sessions.

I'm not permitted to trace changes to that specific table (or any
other table).

Is there a way of associating code with SID or time/timestamp via the
V$%SQL% views (or any other views).

Thanks,
Doron


hash_value and address appear in v$open_cursor. V$open_cursor links to
v$session. If the statement is current sql_address and sql_hash_value
of v$session point to v$sqlarea, v$sqltext etc.

To 'trace changes' you could of course use dbms_logmnr. No extra
overhead associated!

Hth

Sybrand Bakker
Senior Oracle DBA
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: dbuchanan52 | last post by:
Hello, I am building an application for Windows Forms using. I am new to SQL Server 'Views'. Are the following correct understanding of their use? 1.) I believe a view can be referenced in a...
11
by: Bob | last post by:
I am in the process of upgrading an Access database to SQL Server (and climbing that learning curve!). The wizard happily upgraded all the tables and I can link to them OK using ODBC. The...
4
by: Frank Villasenor | last post by:
Hello Everyone, Regarding stored procedures and views, I know that stored procedures cause SQL Server to create a cached execution plan. Is the same thing done for views? Also, how bad is the...
3
by: Lauren Quantrell | last post by:
I use the code below to generate a text file containing every stored procedure and view in my SQL Server backend database, but I can't figure out how to generate text of the User Defined Functions....
2
by: JoeSep | last post by:
Hello, I know that when the SessionState is set to SQL Server (ASP.NET 1.1) these counters in PerfMon are not valued: - Sessions Abandoned - Sessions Active - Sessions Timed Out - Sessions...
1
by: TGEAR | last post by:
I am using MS SQL Server management studio. I treid to see some system tables which are sysobjects, syscolumns, systypes, etc.., but i don't see the list under the system tables folder. There is...
2
by: colabus | last post by:
Hi guys, I've been asked to re-write a sql view. The view itself contains several calls to other views (embedded). Is there a way to get around using embedded views. I've written the same query...
1
by: Doron | last post by:
Hi, Is there any way to associate SQL text from the V$%SQL% views with sessions. A piece of code in our application locks up a critical table about once a month. I suspect that the code is not...
16
by: Wayne | last post by:
I've read that one method of repairing a misbehaving database is to save all database objects as text and then rebuild them from the text files. I've used the following code posted by Lyle...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.