473,322 Members | 1,610 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,322 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 7005
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.