Question on SQL_TEXT from v$sqlarea

Windows 2003
Oracle 9.2.0.6.0
I have a number of DML statements I want to run dynamically. I have a PLSQL proc which generates the statements and populates a tracking table with them. It then selects from the tracking table and executes each statement dynamically with a status field against each statement. a pretty simple cursor loop.
All the statements are deletes with a bitmap index hint to delete where delete_flag = Y.
delete /*+ INDEX(<bitmap index name on delete_flag>) */ table_name WHERE delete_flag = 'Y'
several hundred of these. before it runs for each statement I update the tracker table with "running" for that statement so I know which table its running against. 1 of the tables seems to be hung for a long time. hours. I would have expected the delete of this particular table to run in minutes tops. Theres maybe 1 mill rows in the table with 300k rows to be deleted.
explain plan for that statement is good, uses the index as expected with a low costing.
So I started to dig around.
Looking at the waits for this session every few seconds, it seems to be progressing through the blocks so no waits in partiuclar to worry about.
I then happen to check the SQL for that session (nothing else running on the DB while this procuedre is running)
select sesion.sid,
       sesion.username,
       optimizer_mode,
       hash_value,
       address,
       cpu_time,
       elapsed_time,
       sql_text
  from v$sqlarea sqlarea, v$session sesion
where sesion.sql_hash_value = sqlarea.hash_value
   and sesion.sql_address    = sqlarea.address
   and sesion.username is not null And the SQL_TEXT returned is not the SQL that was submitted dynamically. the table is correct but its using the primary key to delete.
DELETE FROM hung_table_name WHERE PK_FIELD = :B1
Can anyone explain why Im seeing that delete statement and not the one submitted dynamically?

I can understand guys saying I cant be absolutely sure nothing else is running based on the SQL, but I am sure.
its a small shop, no apps coming in, 1 other dba, 2 developers, no scheduled jobs in the database, no scheduled job on the OS, no other users on.
The tracker table that Im populating has a few hundred statements in it, dynamically generated from a cursor theyre all
step, command, status
1, delete /index hint/ from table1 where delete_flag=Y, Pre
2, commit, Pre
3, delete /index hint/ from table2 where delete_flag=Y, Pre
4, commit, Pre
5, delete /index hint/ from table3 where delete_flag=Y, Pre
and so forth....
Theres no room for anything else to get in, let alone a well constructed command to delete by the primary key.
In the PLSQL, the cursor is select command from tracker_Table order by step
for i in cur
update tracker_table set status ='running' where command = i.command
execute immediate 'i.command';
update tracker_table set status ='complete' where command = i.command
As the entire job takes 2 days (yes, Im trying to come up with a better way and I didnt write this one), this method works for tracking where the job is. At the time this particualr table is getting stuck, the status is set to 'running' for the same table that I see the 2 statements for the in sql_text.
1 which is the statement with the index hint and a non matching hash value in v$session. And 1 statement which Ive shown deletes by the PK where the hash value matches the hash value of the session thats running the delete statement.
Ive never seen that before in a view (sql area)I would have queried many times over the years.
So, unless I can see otherwise, Im going with my earlier instinct that the query is being rewritten to delete by PK based on what sybrand said about the 9i explain. Still doesnt explain for me the other SQL with the non matching hash value though.
Or better turn on sql trace in 1-st session as it was already advised and then look into trace file.see earlier post, its taking hours and not returning so cant get a good trace.

Similar Messages

  • Extracting info from v$sqlarea

    Hi,
    I use Oracle 9i and I am trying to extract what a session is exactly doing in a certain moment.
    So, on sqlplus I execute
    select a.sid,a.username,b.sql_text
    from v$session a inner join v$sqlarea b
    on a.sql_address=b.address and
    a.sql_hash_value=b.hash_value
    where sid=&sid;
    but sql_text column is just 1000 characters size and I want the whole statement.
    Is there any way to extract this information using sqlplus? I know that Enterprise Manager shows me this information, but to get sql text at the right moment, I would like to use a script.
    Thanks in advance
    Alex

    Hi Arup,
    I am writing a linux shell script that will automatically logmine information from the archivelogs in the database,
    I want to try to build a shell script that will make information from the archivelogs aceesible to users i.e automating logminer with either shell scripting or set of
    pl/sql procedures so that a user can use his reporting tool to specify the start date , end date and all other parameters to spool the information.
    You could also help with any ideas you have.
    Best Regards

  • Im having trouble changing my security questions, they are from years ago so i do not remember them and the reset email is no longer active,and i dont know how i can use the account because i added money to it but it asks for the questions. anybody help??

    im having trouble changing my security questions, they are from years ago so i do not remember them and the reset email is no longer active.., and i dont know how i can use the account because i added money to it but it asks for the questions. anybody help??
    this says it all..

    Welcome to the Apple Community.
    Contact Apple through iTunes Store Support, and explain that you have forgotten your 3 security questions, that you can reset your password, but doing so doesn't reset your security questions.
    Remember, support will receive hundreds, if not thousands of requests per day, some from people trying it on, others with little explanation and others that are written extremely poorly. Take the time to explain your situation properly, be precise and concise, brief but comprehensive.

  • Transport Questions and Questionnaires from Dev to QAS or to PRD

    Question
    How do we transport questions and questionnaires from dev to QAS or to PRD. Do you type all them again or there is process no. What is best process others do
    Answer
    As you must be aware, Questionnaires are updated from a Recruiter start page in the front end which cannot be saved in a change request.
    At least Iu2019m not aware of any other way to move the Questionnaire details across clients.
    I know that it is quite a bit of a task to repeat the activity of maintaining questions and response in questionnaire/s across clients, particularly When you have to maintain big questionnaires (with lots of questions & multiple responses).But As it is , Process templates, Questionnaires have been considered as a recruiters day-to-day administration task in SAP which has to be done from the front end even in live environment
    Any body has soloution ?
    Thanks.
    Saquib
    http://aspirehr.com/HCM_solutions/hcm_solutions.asp

    Hi Vishal,
    As you must be aware, Questionaires are updated from a Recruiter start page in the front end which cannot be saved in a change request.
    Atleast i'm not aware of any other way to move the Questionnnaire details across clients.
    i know that it is quite a bit of a task to repeat the activity of maintaining questions and response in questionnaire/s across clients, particularly When you have to maintain big questionnaires (with lots of questions & multiple responses).But As it is , Process templates, Questionnnaires have been considered as a recruiters day-to-day administration task in SAP which has to be done from the front end even in live environment.
    So if you are a part of the Implementation Consulting team, it is your responsibility to train the core team in doing the activity in live environment. Hope this information helps.
    Best regards
    G Raj

  • Interview Questions for MTO from SD point of view

    Dear SAP Experts,
    I would like to know in detail the Interview Questions for MTO from SD point of view.
    Thanks
    Bhushan

    Hi,
    Since MTO is more a conceptually driven scenario first you need to understand what exactly happens in a business.
    1) Be clear on the strategy groups.
    2) Be clear on the cost center assignments since sales order is cost object in case of MTO
    3) So you need FI interface idea to execute MTO process.
    4) Understand how the SD is informed after the production is completed for an MTO order.
    5) Understand the movement types involved, since sometimes it may be required that this special stock may be needed to sent to unrestricted or perhaps assign it to some other sales order.
    6) Know clearly about requirement type since thats the key which identifies an MTO order.
    Make sure you als read the library. Hope it helps.
    regards
    sadhu kishore

  • Paleolithic question : I went from Photoshop Elements 1 to 12 !

    Hello,
    I went from Photoshop Elements 1 with a MacOS 9 Imac to Photoshop Elements 12 with a Macbook under Maveriks.
    Some images made with Photoshop Elements 1 does not open in Photoshop Elements 12. images taken one month apart there several years may or may not open.
    In "Get Info" from the Macbook, the system nevertheless recognizes these images as type "Adobe Photoshop Elements file". 
    But in the "More info" Macbook, those which open in Photoshop Elements 12 displayed: Dimensions: 591x886 / Space color: RGB / Alpha Channel: No / Opening: yesterday. 
    Those that do not open with Photoshop Elements 12 displayed nothing (only the opening time).
    How to open these photos which are nevertheless in .psd format ? 
    Thank you in advance for any information,
    Michel

    1) In the Finder Get Info dialog under General, is there a size listed
    for the images that won't open in pse 12?
    Yes, I have a size listed for the images that won't open in pse 12,
    about 2,5 Mo, below info "Type" : Adobe Photoshop Elements file.
    2) Did you recently copy the images from os 9 or were they stored on an
    cd/dvd or external drive?
    I transferred all my documents to an external disk "Aluslim 2.5",
    FireWire 400 and USB 2.0, format : "Mac OS Extended"
    On the external drive Aluslim (where I kept the photos of trasfert) I
    find the same corrupt files: In "Get Info" from the Macbook, the system
    recognizes all images as "Adobe Photoshop Elements file". But in the
    "More info" Macbook, those that open in PSE12 displayed: Dimensions:
    591x886 / Space color: RGB / Alpha Channel: No / Opening: yesterday.
    Those that do not open with PSE12 display nothing (only opening time)
    Le 13/02/2015 23:40, R_Kelly a écrit :
          Paleolithic question : I went from Photoshop Elements 1 to 12 !
    created by R_Kelly <https://forums.adobe.com/people/R_Kelly> in
    /Photoshop Elements/ - View the full discussion
    <https://forums.adobe.com/message/7192995#7192995>

  • Backed up using i-cloud now can not restore because security questions are different from apple account?

    i just purchased a new i-touch for my son becasue he smashed th old one. I purchased it at the apple store and the tech told me to back info up utilizing i-cloud. I did that inside the store. I am trying to set the i-touch up using the i-cloud backup but when i get to the security question part, the questions are different from my apple account. I then get an error message saying server error. I called apple and they did not seem to be much help.

    Welcome to the Apple Community.
    Contact Apple through iTunes Store Support, and explain that you have forgotten your 3 security questions, that you can reset your password, but doing so doesn't reset your security questions.
    Explain that after resetting your password, you are still asked for the answers you have forgotten, before you can gain access to My Apple ID > Manage your account > Password & security, which is where you need to be to change your answers.
    Remember, support will receive hundreds, if not thousands of requests per day, some from people trying it on, others with little explanation and others that are written extremely poorly. Take the time to explain your situation properly, be precise and concise, brief but comprehensive.

  • HT1491 Don't remember the answers to security questions to download from iTunes Store?

    Don't remember the answers to security questions to download from iTunes Store?

    Click here and search the article for '2 out of 3' without the quotes; in the case of forgotten answers, this generally involves either a message being sent to your rescue email address or contacting the iTunes Store staff directly.
    (74900)

  • Hello how do I get the question mark away from my tracks. The songs can be played against the

    Hello how do I get the question mark away from my tracks. The songs can be played against the

    You have to find the songs on your computer. If you have deleted them then you will not be able to add them. Check the backup of your computer.

  • ADDRESS and HASH_VALUE from v$SQLAREA

    "The two columns ADDRESS and HASH_VALUE can be used to join with V$SQLAREA to add the cursor-specific information." taken from http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2120.htm
    My question is :
    The 2 columns must be used together ?
    thanks,
    P.

    Yes.
    If a statement is executed by multiple sessions, it will have multiple addresses.
    My question is: if this wouldn't have been necesssary, why would it be explicitly stated?
    Sybrand Bakker
    Senior Oracle DBA

  • Interview questions on upgrades from 4.7 to ECC

    Hi,
    Can any one please post some potential areas/questions that will be asked for upgrade projects from 4.7 to ECC6.0
    Points will be awarded.
    Thanks

    Hi Frank,
      this is good question,  why because sap upgrades from 4.6b to ecc 6.0 is very risky.
      take one example , in 4.5b , me21n application having 620 screen where as in ecc 6.0 having 9000 screen . that time we will take care of it.
       check the obsolete function modules ,  4.5b , having ws_upload, ws_download.... use cl_gui_frontend_services , under these having differnt type of methods.
      once you change the code in ecc , go to tranx : SLIN check the error where it is exact.

  • Several questions on Fireworks from absolute beginner

    Hello!
    At the moment I'm in the very beginning of web-designing process and I've been using Fireworks trial for several days only. Before that I've created only one website in Joomla! and that's all. I've got several questions and I would be glad if masters of Fireworks will post full answers on them.
    I've read the official manual, but didn't check any additional materials, because I feel better when learning myself with help in form of answers to concrete questions.
    Here is how I see process of making simple website in Fireworks: draw website and then make it to work. I did first part and I've prepared my website. It of course looks ugly, but I want to start from it, as I'm learning. Here it is:
    Okay, what is the next thing I should do? Right, I should slice it. And here goes the question: how should I slice my menu? I want it to be simple menu, so when you move mouse over "About me" it lightens in some other color and some content should appear in right part of this structure. How would I implement it using Fireworks? Then in what format should I export my webpage? HTML and CSS? How do I write styles in CSS through Fireworks? And final question is how can I make my website be in center of page (I've tried to add <center></center> inside "index.htm" file, but no luck)? I would also like to know what do I need to do with all images so you can't select them with mouse and move all around in your browser? How do I stick them:
    Thanks and sorry for too many questions at one time,
    Aleks.

    Looking at your mockup, that navbar could probably be created 
    completely using CSS and HTML, rather than slice up the "button areas" 
    but if you want to go that route, I'd recommend creating button 
    symbols. The slicing is done for you and you can create up to four 
    states for the button.
    If you want to export the graphics only, choose File > Export.
    Browse to your site folder
    Set the Export option to Images only
    Make sure you are exporting slices
    Deselect the option to export areas without slices
    Click Save (Windows) or Export (Mac)
    Use DW to create your page, insert your images and add your rollover 
    behaviors.
    HTH
    Jim Babbage
    NewMedia Services
    http://www.newmediaservices.ca
    Community MX Partner -
    http://www.communitymx.com/author.cfm?cid=1036
    Adobe Community Expert
    http://www.adobe.com/communities/experts/members/206.html
    Author - Lynda.com
    http://movielibrary.lynda.com/authors/author/?aid=188
    Author: Peachpit Press
    http://www.peachpit.com/store/product.aspx?isbn=0321562879

  • More questions on printing from internet

    While I was waiting for an answer to my original question (why my printer won't print from the internet) I found the following two preconditions:
    -  Requires an Internet connection to the printer
    - Requires HP Web Services Account Registration
    So now I also need to know if I have the above qualifications. How do I find this information?
    I shall continue to pursue the ansswers but I appreciate any help.
    Thanks!
    SALLYANNC

    Hi SALLYANNC,
    Just to clarify, you are able to print from the computer but not from the internet?
    I would try printing from another browser to see if you have the same results.
    Try a different browser.
    If you are using Google Chrome as a web browser, please do the following steps:
    Run the updates for Chrome, to make sure you have the latest version.
    Then open the Chrome's browser, go to settings, tools, clear browsing data, clear the cache and site date if listed.
    Close and reopen the browser again.
    Try printing again.
    If you are still having issues, try The Ctrl+Shift+P to see if it will print.
    Update the Java on the computer.
    Go to start, control panel, Java, click on the Update tab and select Update Now.
    I suggest that you to try these steps to resolve this issue if you are using Internet Explorer.
    Method 1: Look at the Security settings for Internet Explorer.
    1. Open the Internet Explorer. Click on Tools.
    2. Click on Internet Options->Under the Security Tab->Security Level Zone->Click on Default Level->Drag the Scroll button and set the Security as Medium level.
    Method 2: You can also add the sites from which you are trying to print to the Trusted Zone which will restore the functionality of these sites.
    1. Open Internet Explorer and go to Tools-Internet Options-Security.
    2. Click the "Security" tab and choose the "Trusted Sites" icon.
    3. Then click on the button "Sites". A window will open, where you can add any sites that you wish to be in the Trusted zone.
    4. Enter the site of interest in the line provided. Site URLs can be typed in directly or entered by copying and pasting. After entering a site click the "Add" button.
    5. The site is now added to the list of trusted sites.
    6. Enter the next site and repeat the procedure.
    Method 3: Also check the following settings:
    1. Open Internet Explorer.
    2. Click Tools, and then click Internet Options.
    3. Click the Advanced tab.
    4. Under Browsing check the option “Enable third party Browser Extensions”.
    If you are using Firefox, then take a look at this document. Fix printing problems in Firefox.
    What web browser are you using? (Chrome, Firefox, Safari, Internet Explorer)
    Are you printing a email or a webpage?
    Let me know how you make out.
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Simple question: sending data from as file to a swf

    hi,
    I'm new to AS3 language, so maybe this is a silly question.
    I'm using a Flash 3D visualization tool (Flare3D) to display 3D contents in flash.
    the project consist of a blank fla project and a .as file (main.as) that manage the creation and the diplay of 3D contents.
    Now I want to display the name of the 3D object that I select in a text box created in the fla.
    I wrote:
    in main.as
         var selectedMesh:String = e.target.name                //the 3D object I select
    in step1.fla, frame 1
         root.infoBox.infoBoxText.text = selectedMesh;          //where I want to display the name of the object I've selected
    When I publish the swf file, it report two errors:
    1180: Call to a possibly undefined method addFrameScript.
    1119: Access of possibly undefined property infoBox through a reference with static type flash.display:DisplayObject.
    what's the problem with that? maybe I nedd to extend movieClip class in main.as or something else?
    thank you

    First, you need to post more verbose errors with line numbers - figuring what lines of code from which object throw errors and will help you to pinpoint the source. Then post these offensive lines.
    Otherwise it is practically impossible to give you any suggestions (this is unless one has a christal ball)

  • A few questions. Opinions from the community would be appreciated.

    I briefly touched over this in the introduction thread. Assuming you did not read that though.
    I am more or less entirely new to Linux, I put Ubuntu on my system no more than a week ago being recommended it as a beginners Linux. I have little to no experience with Linux at all.
    That being said..
    I am extremely interested in learning Linux inside and out. Computers, hardware and software both are a huge passion of mine.
    After some reading I've found very mixed opinions from others about Arch, many describe it as a Linux for experienced "geek" users. While I've been told by others that if I want to use Arch I should just jump into it because they used "insert distro here" for "insert number of years here" and when making the move they realized all of the years spent on other simpler distros didn't really teach them anything anyway. So I would like the communities opinion on the matter, if Arch users agree with the former or latter.
    Now the second, possibly more important question. I don't have Internet on the computer I will be installing Arch on at the moment. I haven't really been able to find a whole lot over the matter and I wasn't sure if that would be an issue when I get Internet back and I'm possibly stuck with just a terminal. I don't want to screw myself over or anything so I wanted to ask here first.
    I hope my questions weren't too annoying, and appreciate any help I get.
    -x0r

    Trilby wrote:
    x0r.h4 wrote:I love the "you get what you want and nothing more" attitude
    Yes, but with arch that may be made more explicit as "you have to go get what you want, it will not be brought to you."
    Indeed. No fancy software centers or GUI package managers here. You want something? Find the package, install it and configure it. Fortunately, the wiki works great both for installation of the OS and in almost every post-install matters. But anyway x0r.h4, you'll need an internet connection on a rolling release distro.
    x0r.h4 wrote:Fully understandable. I've noticed most people who move to a new distro have been using other distros for years already.
    Ive ran across far less people who are new to Linux entirely.
    I've used Ubuntu long enough now to know that although I dont hate it by any means like so many others have expressed that they do, I don't necessarily "love" it per say. It's a great OS in my opinion, but like you already stated its very much like Windows. I still felt most of the same restrictions you get from Windows along with a generally Windowy feel to it. I didnt really feel like a Linux user using Ubuntu and Unity.
    That's mainly why I stopped using *buntu and Mint. I wanted an OS which gave me total freedom to add, remove and create; and even though *buntu and Mint are not bad OS they are pretty restrictive. I tried openSUSE and had the same problem, but although I was running Debian for a couple months and I learnt a lot it still wasn't what I wanted. In that way, Arch is just what the doctor ordered for me. I allows me to build my "own OS" from scratch and set it up my way.
    x0r.h4 wrote:I know I want a more "free" distro, I love the "you get what you want and nothing more" attitude. I just wasnt sure if it was a bad place to start seeing as Arch has a bit of a reputation for being a more difficult distro.
    That's the spirit All you need is the will to learn. You will have a better knowledge of how Linux works "behind the scenes", it'll give you more flexibility as an user and a bit of a sense of what is to really administrate an OS. The distro it's pretty easy to use, but the first hours for an unexperienced user (by first hours I mean installing the system, configuring it and run the basic post-install routines) can be pretty rough. Still, if you follow the wiki you should have no problem.
    Again, my advice is to not install Arch on a computer without internet connection, but if you can solve that then if I were you I would go right for it.

Maybe you are looking for