Sqlplus and explainplan output

when I set autotrace on and run a sql statement , the output gets wrapped on to the next line once it hits a certain length. The output then becomes muddled.
I have tried playing around with the linesize , wrap and truncate parameters in sqlplus but the output is still a mess.
how can I fix this.
any ideas guys?

COLUMN plan_plus_exp FORMAT A80

Similar Messages

  • Sqlplus and error output

    Hi,
    I have a problem, I open a sqlplus session on a bash script and I have to catch the error output.
    I try to redirect the error output in this way:
    sqlplus $DBCONN_STRING <<! 1>>$MSG_FILE 2>>$ERR_FILEBut in this way I have the ERR_FILE (that have to contain the errors) blank! The error is in the MSG_FILE (that contains other information, but I need only error.
    How can I put the error messages in ERR_FILE?
    Thanks, bye bye.

    Dear Abdujaparov!
    SQL*Plus writes it's output through stdout. Even ORA-XXXX errormessages are written through stdout. The stderr channel is only used if SQL*Plus is suffering an error and terminates abnormaly so you won't get ORA-XXX errormessages into your error file with 2>>.
    I think that's not the answer you wanted to hear but I hope that it could be of any help to you.
    Yours sincerely
    Florian W.

  • What is the difference between tkprof and explainplan

    Hi,
    what is the difference between tkprof and explainplan.

    Execution Plans and the EXPLAIN PLAN Statement
    Before the database server can execute a SQL statement, Oracle must first parse the statement and develop an execution plan. The execution plan is a task list of sorts that decomposes a potentially complex SQL operation into a series of basic data access operations. For example, a query against the dept table might have an execution plan that consists of an index lookup on the deptno index, followed by a table access by ROWID.
    The EXPLAIN PLAN statement allows you to submit a SQL statement to Oracle and have the database prepare the execution plan for the statement without actually executing it. The execution plan is made available to you in the form of rows inserted into a special table called a plan table. You may query the rows in the plan table using ordinary SELECT statements in order to see the steps of the execution plan for the statement you explained. You may keep multiple execution plans in the plan table by assigning each a unique statement_id. Or you may choose to delete the rows from the plan table after you are finished looking at the execution plan. You can also roll back an EXPLAIN PLAN statement in order to remove the execution plan from the plan table.
    The EXPLAIN PLAN statement runs very quickly, even if the statement being explained is a query that might run for hours. This is because the statement is simply parsed and its execution plan saved into the plan table. The actual statement is never executed by EXPLAIN PLAN. Along these same lines, if the statement being explained includes bind variables, the variables never need to actually be bound. The values that would be bound are not relevant since the statement is not actually executed.
    You don’t need any special system privileges in order to use the EXPLAIN PLAN statement. However, you do need to have INSERT privileges on the plan table, and you must have sufficient privileges to execute the statement you are trying to explain. The one difference is that in order to explain a statement that involves views, you must have privileges on all of the tables that make up the view. If you don’t, you’ll get an “ORA-01039: insufficient privileges on underlying objects of the view” error.
    The columns that make up the plan table are as follows:
    Name Null? Type
    STATEMENT_ID VARCHAR2(30)
    TIMESTAMP DATE
    REMARKS VARCHAR2(80)
    OPERATION VARCHAR2(30)
    OPTIONS VARCHAR2(30)
    OBJECT_NODE VARCHAR2(128)
    OBJECT_OWNER VARCHAR2(30)
    OBJECT_NAME VARCHAR2(30)
    OBJECT_INSTANCE NUMBER(38)
    OBJECT_TYPE VARCHAR2(30)
    OPTIMIZER VARCHAR2(255)
    SEARCH_COLUMNS NUMBER
    ID NUMBER(38)
    PARENT_ID NUMBER(38)
    POSITION NUMBER(38)
    COST NUMBER(38)
    CARDINALITY NUMBER(38)
    BYTES NUMBER(38)
    OTHER_TAG VARCHAR2(255)
    PARTITION_START VARCHAR2(255)
    PARTITION_STOP VARCHAR2(255)
    PARTITION_ID NUMBER(38)
    OTHER LONG
    DISTRIBUTION VARCHAR2(30)
    There are other ways to view execution plans besides issuing the EXPLAIN PLAN statement and querying the plan table. SQL*Plus can automatically display an execution plan after each statement is executed. Also, there are many GUI tools available that allow you to click on a SQL statement in the shared pool and view its execution plan. In addition, TKPROF can optionally include execution plans in its reports as well.
    Trace Files and the TKPROF Utility
    TKPROF is a utility that you invoke at the operating system level in order to analyze SQL trace files and generate reports that present the trace information in a readable form. Although the details of how you invoke TKPROF vary from one platform to the next, Oracle Corporation provides TKPROF with all releases of the database and the basic functionality is the same on all platforms.
    The term trace file may be a bit confusing. More recent releases of the database offer a product called Oracle Trace Collection Services. Also, Net8 is capable of generating trace files. SQL trace files are entirely different. SQL trace is a facility that you enable or disable for individual database sessions or for the entire instance as a whole. When SQL trace is enabled for a database session, the Oracle server process handling that session writes detailed information about all database calls and operations to a trace file. Special database events may be set in order to cause Oracle to write even more specific information—such as the values of bind variables—into the trace file.
    SQL trace files are text files that, strictly speaking, are human readable. However, they are extremely verbose, repetitive, and cryptic. For example, if an application opens a cursor and fetches 1000 rows from the cursor one row at a time, there will be over 1000 separate entries in the trace file.
    TKPROF is a program that you invoke at the operating system command prompt in order to reformat the trace file into a format that is much easier to comprehend. Each SQL statement is displayed in the report, along with counts of how many times it was parsed, executed, and fetched. CPU time, elapsed time, logical reads, physical reads, and rows processed are also reported, along with information about recursion level and misses in the library cache. TKPROF can also optionally include the execution plan for each SQL statement in the report, along with counts of how many rows were processed at each step of the execution plan.
    The SQL statements can be listed in a TKPROF report in the order of how much resource they used, if desired. Also, recursive SQL statements issued by the SYS user to manage the data dictionary can be included or excluded, and TKPROF can write SQL statements from the traced session into a spool file.
    How EXPLAIN PLAN and TKPROF Aid in the Application Tuning Process
    EXPLAIN PLAN and TKPROF are valuable tools in the tuning process. Tuning at the application level typically yields the most dramatic results, and these two tools can help with the tuning in many different ways.
    EXPLAIN PLAN and TKPROF allow you to proactively tune an application while it is in development. It is relatively easy to enable SQL trace, run an application in a test environment, run TKPROF on the trace file, and review the output to determine if application or schema changes are called for. EXPLAIN PLAN is handy for evaluating individual SQL statements.
    By reviewing execution plans, you can also validate the scalability of an application. If the database operations are dependent upon full table scans of tables that could grow quite large, then there may be scalability problems ahead. On the other hand, if large tables are accessed via selective indexes, then scalability may not be a problem.
    EXPLAIN PLAN and TKPROF may also be used in an existing production environment in order to zero in on resource intensive operations and get insights into how the code may be optimized. TKPROF can further be used to quantify the resources required by specific database operations or application functions.
    EXPLAIN PLAN is also handy for estimating resource requirements in advance. Suppose you have an ad hoc reporting request against a very large database. Running queries through EXPLAIN PLAN will let you determine in advance if the queries are feasible or if they will be resource intensive and will take unacceptably long to run.

  • Sharpener Pro 3 has problems in Aperture as the Pre sharpener continually asks one to buy or activate and the Output Sharpener causes Aperture to hang. Have removed all duplicate fonts and tried using a new user account. Any ideas?

    I am experiencing problems with Sharpener Pro 3 as an Aperture 3 plug-in. These are:  the Pre sharpener continually asks one to buy or activate and the Output Sharpener causes Aperture to hang. Following discussions with Nik Software I have removed all duplicate fonts and tried using a new user account. Neither of the courses of action worked. Have other users experienced these difficulties? Can you suggest an alternative remedy?

    I am experiencing problems with Sharpener Pro 3 as an Aperture 3 plug-in. These are:  the Pre sharpener continually asks one to buy or activate and the Output Sharpener causes Aperture to hang. Following discussions with Nik Software I have removed all duplicate fonts and tried using a new user account. Neither of the courses of action worked. Have other users experienced these difficulties? Can you suggest an alternative remedy?

  • Simultaneously read more than one input and generate output

    Is it possible To simultaneously read more than one input and generate outputs depending on these inputs? If this isn't possible what is the best way to go about making some sort of timed loop that will read an input, read the next input, decide whether or not to output and so on. Hope someone can help. Thanks.Message Edited by Esmith13 on 05-25-2005 01:36 PM

    Hi,
    You should look at the synchronized examples for analog input and output that can be found in the example finder under:
    Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Synchronization>>Multi-Function
    These will get you started to being able to handle multiple tasks at the same time.
    I hope this helps. Have a Great Day!
    George

  • ORA-12535 TNS:operation timed out from SQLPlus and Enterprise Manager Conso

    I keep getting a ORA-12535 TNS:operation timed out error, when I try to start my Database.
    I know its a timeout error, but I would like to know what is timing out and why. All I want is the database its self to run to allow me to connect to it via SQLPlus and JDBC.
    Is there any information on what the following services do and which ones I need to have running to use the database.
    Oracle OLAP 9.0.101
    Oracle OLAP Agent
    Oracle oraHome90Agent
    Oracle oraHome90ClientCache
    Oracle OraHome90PagingServer
    OracleOra90SNMPPeerEncapsulator
    OracleOra90SNMPPeerMasterAgent
    OracleOra90STNSListener
    Thanks for any help Tony

    Either reconfigure CONNECT_TIMEOUT to be 0, which means wait indefinitely, or reconfigure CONNECT_TIMEOUT to be some higher value. Or, if the timeout is unacceptably long, turn on tracing for further information.
    If you have oracle metalink, then read the following note;
    Note:119706.1 - Troubleshooting Guide TNS-12535 & ORA-12535 Errors

  • Bug in PDF and print output with gradients?

    I've got a document that makes use of a gradient fill in a table, and I find that (at least for the < 2pt border widths) the border has a thin white line to either side. It shows up readily in both the print and PDF outputs. Is this a known issue? Where can I file a bug for it? I'm using iWork 6.0 with the latest patches applied. This all worked and looked fine under iWork 5.0. :-(
    <br>
    PowerMac G5   Mac OS X (10.4.7)  

    What are you using to view/print the pdf's?
    Make sure you have the latest Adobe Reader, found
    here:
    Adobe - Adobe Reader - Download
    I'm using Preview. I did check it using Acrobat reader on Windows, and the problem still exists. I suspect there was an error made (by Pages) computing the edge of the rectangle for the gradient. It renders correctly in iWork '05.
    -John

  • Mac user, PS CC 2014 latest version. When using "Save for Web" I bring my 900 x600px @72 ppi in to SFW and the output becomes 300ppi. The only way it stays at 72ppi is if I check "none" for metadata. I know to should not matter much, but I would prefer to

    Mac user, PS CC 2014 latest version. When using "Save for Web" I bring my 900 x600px @72 ppi in to SFW and the output becomes 300ppi. The only way it stays at 72ppi is if I check "none" for metadata. I know to should not matter much, but I would prefer to keep all my web jpgs @ 72ppi. Any solutions?

    It opens up as 900x600 @300ppi
    Here's a screenshot-

  • PDF and RTF output differences

    Hi All
    I'm having some issues when previewing labels in PDF and RTF output. I have created a RTF template that outputs labels - 5 address lines per label, 2 X 10 labels per page. Each label is contained in a table and each address line is contained in a table row.
    - When I preview the RTF output long address lines are not being truncated even though I uncheck the wrap option on the table cell properties.
    - When I preview the RTF output I can get 2x10 labels on the page (if no wrapping occurs) but when I preview in PDF I can only get 2x9 labels on the page. I have checked the font size of both the PDF and RTF outputs and they are the same size. It looks like the header and footer is taking up more space on the PDF version compared to the RTF version when I visually inspect the output but I cannot be sure.
    Does anyone have any ideas how to resolve these issues?
    regards
    Brad

    Always its better to use different templates for individual output types as the template designed with perfection for pdf output type dosen't comply with rtf or any other type and vice versa.
    Cheers!
    Vishnu T Ramakrishnan

  • Internal speakers and audio output gone from System preferences

    i can't get macbookpro 2010 to recognize internal speakers and audio output. only optical OUTPUT. CAN'T GET ANY SOUND EXCEPT FOR OPTICAL PORT

    yes it is on, i have tried reinserting headphone plugs to possibly release micro switch but no avail. i tried resetting PRAM and that also did not work. this just happened over the last day or so. can't figure out what made it do this. i have no optical device, so the switch shouldn't have triggered.

  • How to push a button, run a report, and open output in new windows?

    I have an application where I want to present the user with a form, have them enter their report parameters, and then press a go button. I would then like to display a progress bar. The report will generate both a PDF and HTML output. When the report is complete, I want to display each one of these outputs in their own browser window.
    How do I do this?

    You want to retrieve two responses? Then you'll have to invoke two requests simultaneously. You can make this possible with a Javascript window.open call in the onclick attribute of the commandButton. E.g.
    <h:commandButton
        value="submit"
        action="#{myBean.submit}"
        onclick="window.open('pdfServlet?param1=value1&param2=value2');" />Where the bean action just returns the HTML (JSF) result and the onclick fires a servlet, if neccessary supplied with request parameters so that it knows what PDF it need to generate.

  • Execute command and save output in a HTML File

    Hello Guys,
    I have a requirement and for that i have to do following. a) read a file in an array and then execute a command for each value in that array. after that i want to store the output of command and value of array in another array.
    i am doing something like below.
    set objtextfile = objfso.opentextfile _
    ("c:\temp\aaaa.txt", forreading)
    j=0
    Do until objtextfile.atendofstream
    redim preserve arr123(j)
    arr123(j) = objtextfile.readline
    j = j+1
    Loop
    for each server in arr123
    chk_status = "command" &" "& server
    set objexecobject = objshell.exec(chk_status)
    'Here i am not sure how to proceed further to achieve what i described above.
    Next
    Can someone help me with this?
    -KAKA-

    Thank you for your response.
    So here is what i want to do.
    Query a database using odbc from my management server (odbc is configured and connection is tested) and based on the query it will result out few list of servers. then from the same management server i want to execute a command against all the resulted server
    (management server has a binary which can execute remote action). this remote action will get output back.
    then i would like to store the name of server and resulte output in a html file which should look like below.
    which i will later host on apache.
    YOu do not need to move things in and out of arrays and files.
    >>>> You are right but as i stated, i am not a core programmer and due to nature of my job i have to work on perl, shell and VB Script, apart from my actual technology so it becomes difficult to write it with perfection.
    I hope you understand.
    -KAKA-
    -KAKA-

  • Remoting and localized output from executables

    Hello all, I am in need of a bit of assistance.
    We have client computers which have non-English Windows 7, and thus any executable that produce output produce non-English output. This is not a problem when using PowerShell locally, all localized output is displayed properly.
    Problems arise when using PowerShell remoting, where output does not display non-English characters correctly. Examples of native executables which produce incorrect output: ipconfig, ping, wingmmt.
    Host's output encoding:
    IsSingleByte      : True
    BodyName          : ibm850
    EncodingName      : Western European (DOS)
    HeaderName        : ibm850
    WebName           : ibm850
    WindowsCodePage   : 1252
    IsBrowserDisplay  : False
    IsBrowserSave     : False
    IsMailNewsDisplay : False
    IsMailNewsSave    : False
    EncoderFallback   : System.Text.InternalEncoderBestFitFallback
    DecoderFallback   : System.Text.InternalDecoderBestFitFallback
    IsReadOnly        : True
    CodePage          : 850
    Remoting output encoding:
    IsSingleByte      : True
    BodyName          : iso-8859-1
    EncodingName      : Western European (Windows)
    HeaderName        : Windows-1252
    WebName           : Windows-1252
    WindowsCodePage   : 1252
    IsBrowserDisplay  : True
    IsBrowserSave     : True
    IsMailNewsDisplay : True
    IsMailNewsSave    : True
    EncoderFallback   : System.Text.InternalEncoderBestFitFallback
    DecoderFallback   : System.Text.InternalDecoderBestFitFallback
    IsReadOnly        : True
    CodePage          : 1252
    Following command can be run to change console output encoding to UTF8:
    [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
    However, running this on remote session will result in "Exception setting "OutputEncoding": "The handle is invalid." Running this on host works, but has no effect on remote session.
    Apparently $OutputEncoding only works for input, not output. But I tried to set it to UTF8 anyway, with no effect.
    This problem does not affect PowerShell cmdlets, as Write-Host and Write-Output produce correct output even in remote session.
    Previously host had PowerShell 3 and client had PowerShell 2, now both have PowerShell 4 and problem still persists.
    Anyone know how I can receive correct output from localized native executables? Thanks in advance.

    Actually I am using PS remoting from server to client workstations.
    I have provided several examples of commands that produce incorrect characters in place of non-English characters in the first post. Likewise I have provided encoding info in the first post.
    As for culture info, info below.
    Get-Culture on host:
    LCID             Name             DisplayName
    1035             fi-FI            Finnish (Finland)
    Get-Culture in remote session:
    LCID             Name             DisplayName
    1035             fi-FI            Finnish (Finland)
    Get-Culture locally on client:
    LCID             Name             DisplayName
    1035             fi-FI            Finnish (Finland)

  • HDMI and VGA output adaptors?

    i have sony series laptop with HDMI and VGA outputs are there any adabtors to use this display?

    AppleTV is not a display, it plays media to an HDMI equipped TV.

  • Recording and soud output

    Hi,
    I'm having troubles hearing my recording. I've seen many posts in this forums about "no sound" topics but I didn't find a solution to my problem yet, so my post. I have the impression Logic is using the same audio unit for output than for input.
    I've been using the configuration wizard to setup my external audio unit, a digital preamp (on which I can connect a mic or a guitar) connected by USB to the Mac. The setup has selected one input and two outputs. However I don't want Logic to use these outputs, but the internal outputs of my Mac.
    I've got an audio object, which I used for recording, configured to use CoreAudio as peripheral, "Track 1" as track, "Output 1-2" as output. These outputs seem to be those of my external audio unit, but this is not what I want, I want the internal Mac outputs. I've has a look at the environment window but without much success.
    -fred
      Mac OS X (10.4.3)  

    ok, had to create an aggregate, saw this in an another post in this forum. Problem solved.
    -fred

Maybe you are looking for