Question about running explain plan

I tried to run explain plan for a simple query, just to familiarize myself with how to do it. (I have another query that's taking a long time, and I've never run explain plan before). I got an error, googled it, and discovered I had to run the file at @%ORACLE_HOME%\rdbms\admin\utlxplan.sql first, to create the Plan_Table. Well, I tried to run that file and I get the error that I don't have priveleges on the tablespace. This really doesn't surprise me, as my access is read-only. Is there any way around this? I don't know a whole lot about databases, so forgive me if these following questions are dumb, but...
1) is that file basically trying to create a table (called Plan_Table) within the schema I'm in (the only schema I have access to)?
2) can my company's DBA run that file for me to create the Plan_Table?

What version of the database are you on?
You can get run-time execution plans from V$SQL_PLAN. You will need permission to read the V$ views. First find your query in V$SQL_PLAN (you can do a text search; putting a comment in like '--my_query' can help), then join to V$SQL_PLAN to find the query plan that that query used - join by the ADDRESS and HASH_VALUE columns.
Otherwise, see if you can get insert/update/delete access on just that one table when your DBA creates it
Good luck.

Similar Messages

  • What are the permissions needed to run explain plans via sql develeper?

    Are the permissions the same in Sql Developer to run explain plans like they are when you run them via sql*plus?

    Yes same permission because the explain plan does not tie to the tools.

  • Running explain plan on a prepared statement

    I'm using IBatis to run queries against an Oracle database. IBatis runs the queries as prepared statements. I want to run explain plan on the prepared statements.
    I already have a shim -- a proxy java.sql.Connection object -- that takes the SQL used to create a prepared statement (e.g., "select a, b, c from table d where c = ?"), returns a proxy java.sql.PreparedStatement, and then on the PreparedStatement's execute(), interpolates the bound parameters into the SQL statement, and runs Explain Plan on that (e.g, preparedStatement.setInt(5) is called, followed by preparedStatement.execute(), which results in my proxy running "explain plan for select a, b, c from table d where c = 5;")
    Using Spring configuration, I can transparently insert the shim and get explain plans for all queries run through that Connection.
    The problem is this: I'm explaining the plan for the SQL with the bound parameters, not necessarily the SQL run for the prepared statement.
    Assume that in the above example, there exists an index on column c in table d, and that 5% of d's rows have the value 1, 15% have the value 2, and 80% have the value 3.
    For "select a, b, c from table d where c = 1", Oracle will use the index. But for "select a, b, c from table d where c = 3", Oracle will do a full table scan.
    What I want to know is what Oracle will do for "select a, b, c from table d where c = ?" when "?" is an unknown, arbitrary value subsequently bound to 1 or to 3.
    As I understand it, the query plan for a prepared statement is done once, when the prepared statement is created. At execute time (as I understand it), the query plan is not reformulated based on the actual bound values (though partition pruning is recalculated).
    So how can I find out what query plan is actually be used for prepred statement?
    Thanks.

    I already have a shim -- a proxy java.sql.Connection object -- that takes the SQL used to create a prepared statement I believe explain plan is part of PL/SQL rather than external to it.
    As such you can pass it via a prepared statement. It is just a matter of getting the syntax correct. And of course collecting the result.
    The syntax is going to be be something like the following. You would use it just like you use the existing sql.
    begin
       select ... from ... where c = ?;
    endThe result might be returned a result sets (plural). If so you would need to code appropriately for that.

  • How to run Explain Plan for SP?

    Can we run Explain Plan for SP??

    EXPLAIN PLAN creates an execution plan for SQL statements. PL/SQL is not SQL.
    PL/SQL procedures can contain SQL, yes. These SQLs can be copied and pasted from PL/SQL into something like TOAD and execution plan determined.
    However, if the aim is to see the "execution/performance plan" for PL/SQL code, then you need to profile the PL/SQL code using the DBMS_PROFILER package. This will tell you the execution path and elapsed time to execute a line of PL/SQL.
    Details can be found in the [url http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_profil.htm#sthref5502]Oracle® Database PL/SQL Packages and Types Reference guide.

  • Questions About Verizon EDGE Plan???

    So, me and my guy went into what we thought was a regular Verizon Store to ask about combining our accounts to save some money (we are engaged).  My guy was having major issues with his Pantech Maruader and the sales person convinced him to get on the EDGE plan and get a Samsung Stratosphere II (he wanted a keyboard smartphone).  I asked about when we could combine our accounts and he said any time.  He suggested we do it on the 1st of next month though so the bill won't be huge.  Well, I called up Verizon today to try to get a quote again since I had forgotten.  They told me and also told me I didn't have to wait to get my guy on my plan.  So I proceeded on the website to try to "add a line" and it wouldn't let me.  We called customer service and they said an EDGE plan couldn't get under a non-EDGE plan and there was this"assumption of liability" phrase getting thrown around.  I said I accept the assumption of liability and they said they still couldn't do it.  If I wanted to connect to HIS plan I could but not vice-versa.
    So I have heard all these different things and stories.  And I wonder if he can just pay the balance off the phone and quit this EDGE plan and go back to the normal plan he had before, I believe the MORE EVERYTHING plan?  Another guy at the "Verizon" store said we can't combine the accounts and that the EDGE plan just came available two days before he got the new phone and the plan.  This was March 12, 2014.  He also stated that they were very uninformed about the EDGE plan as employees and that the "Assumption of Liability" bit was told to them last week.
    But from what I'm reading up here is that EDGE rolled out August last year????  So did I just get blantantly lied to so I wouldn't go off on the guy?  I didn't act angry towards him or anything just went in there asking what were th options so we can combine our accounts.  I want him under my account cause my job discount is bigger than his.  He also stated that we could just pay off the phone and there would be no early termination fee and he could go back to his regular plan...then transfer to myaccount, is this true??
    Please someone shed some light on these questions!!

    We tried to go into the Verizon store on N. Main St. in Suffolk, VA. yesterday to pay off the phone balance and get out of the EDGE plan, do the AOL and get him under my plan.  The Rep said we couldn't do that until it's been 30 days since he signed up for the plan.  That will be on Saturday, but she said wait until Sunday just to make sure.  So AGAIN I am getting a run-around.  I am tired of this situation.  Does Verizon not want $335 out of my pocket immediately??  I will be printing out this conversation and bringing it to the store again today.  Also, I hope you are a real representive and not a robot, since the other store told me the other responses from a chat I had on this site was from a robot and basically blew off any of it's answers...
    The original store btw is on Portsmouth Blvd. in Chesapeake, VA.  They "state" they are an authorized Verizon dealer but they are NOT an official store.  The REAL name of the store is WeRWireless and the address is 4300 Portsmouth, Blvd. #196, Chesapeake, VA. 23321
    The store I will be going to tomorrow will be Verizon Wireless, 1202 N. Main St. #200, Suffolk, VA. 23434.

  • ORA-01745 when running Explain Plan

    Hello everybody,
    I would like to know what is the best way to report a bug. In fact I believe just found one and I would like it fixed. I am using the latest version of SQLDeveloper on WinXP that uses its own JDK.
    To replicate the bug it's very easy, just try to do an explain plan of the following query:
    SELECT * FROM scott.emp
    where empno = &&emp_nr;and the "*ORA-01745: invalid host/bind variable name*" error appears. Since the query executes properly, but the Explain plan errors out, I believe this could be a bug.
    Thanks,
    Paolo

    Gary,
    thanks a lot for your feedback.
    I have found this weird behaviour, because I was trying to avoid another one. In fact I tried using the substitution variable syntax instead of the bind variable syntax in SQLDeveloper, especially to avoid the issues coming from automatic data conversions.
    For example, if I run the following query using the bind variable syntax (passing SYSDATE as the parameter value):
    SELECT *
       FROM scott.emp
      WHERE hiredate BETWEEN TRUNC(:p_eff_date,'yyyy')
                         AND TRUNC(add_months(:p_eff_date,12),'yyyy') - 1;it will go in error with "*ORA-00932: inconsistent datatypes: expected DATE got NUMBER*", because the filter predicate will be converted automatically as follows:
    TRUNC(TO_NUMBER(:P_EFF_DATE),TO_NUMBER('yyyy'))<=TRUNC(ADD_MONTHS(:P_EFF_DATE,12),'fmyyyy')-1This behaviour is visible by running the explain plan on the above query. Isn't that TO_NUMBER(:P_EFF_DATE),TO_NUMBER('yyyy') a little bit too wrong? Note that the second occurrence of the P_EFF_DATE parameter does not get converted. Can't this "automatic conversion" behaviour be disabled somehow?
    Due to this weird issue I tried to use the substitution variable syntax, but the main issue with the single ampersand is that you have to enter the value of the parameter as many times as the parameter is referenced in the query and you can imagine that with big queries written by other people this is not so easy.
    Is there another way to pass parameters to a query in the SQL Worksheet? How can I "use literals rather than variables" as you suggest? Do you mean NOT using parameters at all?
    Thanks,
    Paolo

  • How does SQL Developer run EXPLAIN PLAN?

    Hello,
    I noticed that SQL Developer can do an EXPLAIN PLAN even though I don't have a PLAN_TABLE available for the user that I use to connect in SQL Developer.
    I was always wondering whether there was a way to do an EXPLAIN PLAN without a PLAN_TABLE, apparently this seems to be possible.
    Thomas

    If I try an explain plan when I do not have a plan table available, I get the message "A PLAN_TABLE is required to access the explain plan, but it does not exist. Do you want to create a PLAN_TABLE?". Unfortunately, as that user does not have create table privs, if I say Yes I get the following error "ORA-01031: insufficient privileges".
    Given this, if you are doing an explain plan, you either have access to a plan table or you have create table privs and SQL Developer has created the plan table for you.

  • Question about "run application once" semantics...

    Hi to anyone still out there. We're still using ZfD 3.0SP1a with the
    latest NAL patch (10.4.2002). Things basically are working but we're
    redoing our software distribution strategy to try and streamline things
    and squeeze a bit more life out of the platform. As part of the process, I
    moved away from force run MSI installs by user for basic stuff to force
    runs which call msiexec /i some.msi (or setup or whatever...) and
    associating these to OUs. I was planning to use the app version number to
    force redistribution whenever I put up newer MSIs or installer files. In
    testing, I noticed that msiexec was running on each login for each package
    and that wasn't what I wanted. I want the installers to fire off once,
    then again whenever I bump the version number. So I checked off "Run
    application once". Now the apps run only once but do not redistribute when
    I up the version number. If I use nlist to query eDir, I can see the
    attribute "zenappDisconnectedVersionNumber" has been incremented in the
    directory but looking at HKLMSoftwareNetWareNAL1.0Distribute*, the version
    number for that app never moves and the software isn't redistributed. The
    apps are all set to "wait on force run".
    Am I misunderstanding the use of this attribute? I suppose I could leave
    "run application once" off and set up some registry flags to control
    distribution or even just let them run on each login but I want to do this
    in the cleanest fashion. Any suggestion about what I might be doing wrong
    or how to work around/troubleshoot this issue? Thanks in advance!
    Michael

    Thanks, guys. I have a follow up question/issue related to this
    environment. I am pushing out a handful of apps associated with
    workstations via OUs (force runs which call msiexec or a setup). I've
    tested this a hundred or more times in my own OU but in several other OUs,
    I've now run into this issue when NAL kicks off the first app install. I
    get a WMRUNDLL.EXE error and no software distribution occurs. The text of
    the Dr Watson error is:
    The application, WMRUNDLL.exe, generated an application error The error
    occurred on 11/07/2007 @ 12:54:26.495 The exception generated was c0000005
    at address 004AED14 (NWAPPCreateFullObjectName)
    In setting up a few machines today, the first ran fine, the next 3 got
    this error. I've synched up everything in PUBLIC across all servers; all
    NAL related files that I'm aware of (that show via NAL's "more" button)
    are from the last update for ZfD 3, dated 10-04.2002.
    I did some searching and the little I was able to find seemed to point at
    a particular version of wsreg.dll. Wasn't able to find any particulars
    though. Fwiw, wsreg32.exe and wsreg.dll in PUBLIC were dated 6.26.2001. I
    swapped in a wsreg.dll from 10.22.2002 which I believe was part of the
    49SP2 client. That apparently hasn't helped. Worst of all, it seems
    intermittent or arbitrary - I can't really see what's different between
    the environment I'm currently in that is experiencing the error and the
    one in which it's working. It's the exact same base image, exact same
    PUBLIC dir... the only difference is that it's not my home OU. I checked
    workstation policies in the other OU and they appear to be the same as in
    mine.
    I thought I was past this as the PUBLIC sync seemed to clear things up at
    another location but now I'm seeing it again. Have you seen this before?
    Any suggestions? Thanks a lot!

  • Question about running EverQuest on a Boot Camp MacMini

    Hey all,
    I'm trying to get EverQuest working on my MacMini running Windows 7 via Boot Camp. Browsing through the archives of the internet, I've found many posts from 2007-2010 of people having success with this on a MacBook Pro (a few posts of which I found in these community archives), and I'm 99% certain that my MacMini hardware is more than sufficient. Anyway, I haven't even got to loading the game yet so performance my question isn't about performance.
    My issue is that I'm trying to run the EverQuest LaunchPad to start patching the game, and it won't connect right from the outset. I've followed all of SoE's EQ LaunchPad Troubleshooting tips (here: http://help.soe.com/app/answers/detail/a_id/29017 ) and I've also gone in to my router settings and opened/forwarded all of the necessary EQ ports to this computer's IP address. I was hoping that would do it but no luck.
    I also contacted the SOE Support staff and they were categorically unhelpful as usual. I used to play EQ a decade ago and I wasn't surprised to see that their customer service hasn't changed one bit. Well, here's to hoping that the Mac community is much more positive and helpful than SOE Support.
    Has anyone experienced similar problems getting EverQuest to run on a Windows Boot Camp machine like this? How did people get their LaunchPad client to connect? I'm hoping there's some really dumb, obvious fix that I'm missing here because it really does seem like many have gotten this to work successfully and I'm a bit stumped at the moment..
    Any advice would be greatly appreciated. Thanks!

    the hardware of macs today and windows computer is pretty much the same
    so when one use bootcamp it's really just a bootloaded which collects the windows partition from the harddisk and then let it take over and apart from one having to install the apple drivers and software to get it running well
    it's the same as any windows computer
    I do all my my gaming on windows on my imac and face no different challenges then I did when I had a windows computer really
    so If I were you I would broaden my googling for solutions not just to include bootcamp but all windows issues with newer windows versions and everquest could as easy be a issue there with newer video card drivers and the likes

  • Question about running RMIDemo

    Hello everyone.
    I tried running the RMIDemo by converting my own CAP files and generating the script files for loading into the script.
    My question is, must the Generated RMI STUB which i generate using rmic command be converted together with the CAP files?
    The problem now is that when i run the RMIDemo in the CREF simulator, it gives me a
    java.rmi.RemoteException: Applet selection failed sw = 6d00.
    It works fine in the JCWDE simulator though.
    Does the problem lie in the rmi stub file or something else?
    Can someone help me pls? been stuck at this for hours.... thanks in advance.

    The RMI STUB file must NOT converted! There are only for the client application.
    That means that the stub file must be visible to the client application.
    In addition i think that you are not able to convert stub files
    Now for the applet selection, I can't understand why you have that response, but I will try to guess:
    After the conversion, you must add before RMIDemo.scr the Header.scr
    and after the Footer.scr.
    You will find them into JC_HOME\samples\src\demo\misc, try to make them txt to view the content.
    ALSO you must add a line between RMIDemo.scr and Footer.scr, to create the applet like:
    // create RMIDemo
    0x80 0xB8 0x00 0x00 0x0c 0x0a 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0xc 0x5 0x01
    The general patern is:
    0x80 0xB8 0x00 0x00 0x0c (AID Bytes) 0x00 0x7F; (If i remember well)
    try it and tell me if you need more help.
    Friendly, Bill ;)

  • Doesn't it get very old, same question about running dos command?

    To everyone who is tooo lazy to search.
    Process p = Runtime.getRuntime().exec("progname arg1 arg2");
    What a wast of everyone's time responding to the same question on how to run a dos command.

    I think you'll find it's
    Runtime.getRuntime().exec(new String[]{"progname", "arg1", "arg2"});

  • Question about Run-Time Shortcut Menus example

    I am looking at the Run-Time Shortcut Menus.vi that ships with LabVIEW2011. There is an event case "Test List":Mouse Down that does nothing but generate a Val(Sgnl) event for the "Test List" control if the right mouse button was pressed. There is no value change event for that control.
    Is there an obscure reason to do that? One thing I have learned about many of the examples is not to strictly use them as examples.
    =====================
    LabVIEW 2012
    Solved!
    Go to Solution.

    Nevermind - I found the obscure reason. Even though there is not a value change event, generating the value change event is required to change the value on right-click.
    At least NI could have documented this in the example
    =====================
    LabVIEW 2012

  • Basic PL/SQL Question about running context

    We are trying to create some generalized tools with PL/SQL procedures that would be used by a number of different Oracle Users/Schema. The idea was to store them in an administrative schema (call it ADMIN), create public synonyms for them, and grant execute to public. Then we could run them from the user schema (call it USER) to do the work.
    It was my assumption, that while the procedures were stored in ADMIN, when they were run by USER they would run in the USER context. EG, a table (call it MYTABLE) that was referenced in the procedure without a schema reference (SELECT * FROM MYTABLE) would expect to find MYTABLE in the context of the schema which called the procedure. In other words, call the procedure from USER, I expected the procedure to look for MYTABLE in USER. However, we are getting errors that indicate that even though the procedure is called from USER, it is looking for the table in ADMIN (the procedures creation context), no in USER (the running context).
    QUESTIONS: How is PL/SQL supposed to operate in this situation? Are there any options/parameters that can be set so the procedure will use the runtime context for table lookup, or do we have to write dynamic SQL which will fully qualify the table with the owner schema?
    Thanks for your help
    John Conroy

    Hy,
    from the manual:
    The AUTHID clause is allowed only in the header of a stand-alone subprogram, a
    package spec, or an object type spec. The header syntax is
    -- stand-alone function
    CREATE [OR REPLACE] FUNCTION [schema_name.]function_name
    [(parameter_list)] RETURN datatype
    [AUTHID {CURRENT_USER | DEFINER}] {IS | AS}
    -- stand-alone procedure
    CREATE [OR REPLACE] PROCEDURE [schema_name.]procedure_name
    [(parameter_list)]
    [AUTHID {CURRENT_USER | DEFINER}] {IS | AS}
    -- package spec
    CREATE [OR REPLACE] PACKAGE [schema_name.]package_name
    [AUTHID {CURRENT_USER | DEFINER}] {IS | AS}
    -- object type spec
    CREATE [OR REPLACE] TYPE [schema_name.]object_type_name
    [AUTHID {CURRENT_USER | DEFINER}] {IS | AS} OBJECT
    where DEFINER is the default option. In a package or object type, the AUTHID
    clause applies to all routines.
    Note: Most supplied PL/SQL packages (such as DBMS_LOB, DBMS_PIPE, DBMS_
    ROWID, DBMS_SQL, and UTL_REF) are invoker-rights packages.

  • Another question about running ejbs

    Hi people,
    I'm getting this error when I try to run a EJB:
    Error instantiating application at file:/C:/TEMP/jdev/system/oc4j-config/applications/bc4j.ear: Unable to find/read assembly info for C:\TEMP\jdev\system\oc4j-config\applications/bc4j (IO error: unable to find bc4j)
    Somebody knows the reason or what should I do to fix it?
    thanks,
    Edilson

    Welcome to Apple Discussions!
    1. Buy an older PowerPC Mac used or refurbished as my FAQ* explains how to do:
    http://www.macmaps.com/usedrefurbished.html
    2. Contact the developer of the said software and ask a Mac OS X version be published of their software.
    3. Politely ask Apple develop a virtualization program through AppleCare's Customer Relations department, http://www.apple.com/macosx/feedback/ and if you want a free developer account go to http://bugreporter.apple.com/ and submit it as an enhancement request.
    4. Tell us what software you want to run that you found is 9 only, and maybe we can tell you an alternative that can open the same documents, play the same style game that is Mac OS X native, or will run under Windows or Linux on your Mac?
    - * Links to my pages may give me compensation.
    Message was edited by: a brody

  • Two question about running speed in Labiview RT and FPGA

    hi All
    Right now I am working on a project, which need to be developed on Labview RT and FPGA
    Here I have two quick question.
    1. Why sampling rates of RTD (9217) module is very slow, it is just aroud 1/sec? even I just tried to run Labview example.
    2. We would like to develop another HMI, which can be used for monitoring the program running in CompactRIO.  In my project, i want to use network publish varible to implement this function. but the running speed become very slow, when I put these variable into my codes. (Shown in attachment) 
    Thanks
    Regards
    Attachments:
    RT_Question.doc ‏172 KB

    Nope, those modes can be selected when using 9217. Drop an I/O property node to your FPGA block diagram and select correct module from the list and you should be able to set conversion time.
    Answer to your second question is that your shared variables update only when there's data available from FPGA. This means that if you use high resolution mode (800ms/4ch) they update once every ~800ms. Changing your conversion time to high speed should give you a faster update rate.

Maybe you are looking for

  • Suddenly I'm not authorized for purchased content & apps

    Hi, Please forgive me if this issue has been raised over and over again or if I come across bone-headed in general. I recently migrated from my old Ti-Book to a new 15" Macbook Pro with Retina Display.  I've had various little glitches with the new u

  • Cannot get 16 X 9 aspect ratio on NTSC monitor

    Just installed a Radeon 9800 pro Mac edition to replace the original GeForce 5200 that came with the computer. The new card is great and gives 30 fps on the main LaCie electron blue 19" monitor when "Full screen" mode is selected. Problem is ... when

  • Opening a particular pdf

    I have lots of PDFs on my computer and they all open easily. However yesterday I had to open a really important application for which the deadline is the middle of next week. It 'appears' to be there but when i try to open it it is 'grey' and one pag

  • How to upload a file using java bean?

    hi, i need a code simple how to upload a file from jsp form to a java bean file (not a servlet) thank,s zik

  • Fm transmitting and charging in car

    i used to have a 20gb b/w ipod w/ click wheel. i used a griffin iTrip to broadcast on my car stereo while charging with a dock connector car charger. I have upgraded to a 5G 30gb ipod, and to my dismay, my old iTrip is not compatible. i have been loo