2.1 EA1 - capitalizing SQL text in the worksheet

Whenever I have enter some commands SQL worksheet window and press ENTER after the semicolon, it re - formats the text and capitalizes all the keywords. So what follows:

Select * twice;

becomes

Select * From Dual;

Which is quite annoying, because the SQL Developer doesn't have to mess with my code unless I ask him to. I know there are right click-> Format (CTRL + F7), who did a great job messy fixing SQL and I love this feature, but it is never used to edit the text. It does in v2.1 EA, and it uses a system of different capitalization than the spreadsheet, which translates as:

SELECT * FROM dual;

Personally, I would prefer that he behaves this way:

1. don't mess with ANY text in the SQL worksheet, unless specifically requested to do so
2. in SQL with "Format" formatting, do not change the case of any text
3. do you have another option (or an extension to the 'Format') will change the case of text to fit a configurable standard
4. If a text block is selected when is called "Format", then only format this block, instead of the entire spreadsheet window

Published by: gclough on October 6, 2009 11:09

In the SQL worksheet, there is an icon Aa you clicked over there, look at the bottom line message of left hand in the window and you will see that scrolls a number of options/configurations of the case. You can choose the configuration you want, and then type your code, it will automatically format to this request.

You can choose NONE, in this case, no formatting occurs while you type.

Sue

Tags: Database

Similar Questions

  • SQL text of the query are output in the output of the coil-ed

    Hello

    I have s script that starts with sql * more:
    SET SERVEROUTPUT ON
    SET LINESIZE 1000
    SET ECHO OFF
    SET TERMOUT OFF
    SET FEEDBACK OFF
    
    SPOOL /home/scott/out.txt
    
    SELECT col_1||';'||col_2 FROM table1;  --and my select statement here!
    
    SPOOL OFF
    My out.txt must contain all records from table1, where the fields are separated by a semicolon.
    Unfortunately, out.txt also contains the text of the query itself:
    SELECT col_1||';'||col_2 FROM table1
    ------------------------------------
    1;one
    2;two
    
    AND SO ON!
    How can I Remove the text of the query output?

    Thank you!

    Looks like you want to delete the pages headers. VR;

    set pagesize 0
    
  • SQL submitted in the worksheet make pre-requete of the data dictionary

    Hi all

    SQL Developer version: 4.0.0.13 (Windows)

    By submitting a simple SELECT * FROM < any_app_related_table > in a worksheet query response time to return results have been awful - this is particularly evident during the execution of the query when you open the worksheet as a new connection.

    I decided to follow the activity of my session and found that by submitting the request following SQL was executed BEFORE the execution of the actual query that I wanted:

    / * + NO_SQL_TRANSLATION * /.
    Select table_owner, table_name from all_synonyms where owner (user, 'PUBLIC') and synonym_name =: 1
    and not exists (select user, object_name from user_objects where object_name =: 2 and object_type in ('TABLE', 'SEE'))

    Because a couple of our data base massive dictionarys, the SQL above takes his time in execution. We have gathered the stats before SD but this makes no difference.

    Is there a way that this kind of behavior "pré-requête" can be disabled in SQL Developer? My colleagues using tools such as TOAD laughing in my face than their queries run instantly. I tried searching for this behavior on the web but did not find anything...

    PS - I seem to think that I asked this question before that I've seen this behavior in previous versions too, but I think that the answer was simply the words to the effect of "this is how SQL Developer works I'm afraid.

    Thanks in advance

    Is the version of your RDBMS 12.1? How long

    Select * from user_synonyms where synonym_name = 'POTATO ';

    should I do?

    I'm not able to confirm your assertion that this dictionary query is triggered before the user query. It is triggered by an overview of code, or side info semantic analysis; both can be selected.

  • The addition of SQL text in the format

    I have 2 questions

    1. When you try to create new thread, I don't have the possibility to insert in SQL format, what's wrong with me.

    2. If I want to see all the question I posted so, how I can.

    Hello Malhi,

    >
    1. When you try to create new thread, I don't have the possibility to insert in SQL format, what's wrong with me.
    >

    Go to this page and scroll down a bit, you will see the description of a tag named [code] is what you want.

    http://wiki.Oracle.com/page/Oracle+discussion+forums+FAQ

    >
    2. If I want to see all the question I posted so, how I can.
    >

    Click on "Your control panel" on the upper right side, then 'Your questions' on the next screen.

    HTH,

    John.

  • Anyone wishing to share SQL that will pull the text of the business unit that is attached to a language specification?

    Anyone wishing to share SQL that will pull the text of the business unit that is attached to a language specification?

    Select s.SpecNum, s.IssueNum, SpecSummary n.name s

    inner join gsmApprovedUsage on s.SpecID = au.fkSpecID and au.fkSpecID as 5816% AU '

    gsmApprovedUsageBUJoin j j.fkApprovedUsage = au.pkid inner join

    inner join commonBusinessUnitName on n.fkSpecBusinessUnit = j.fkBusinessUnit and n.langID = 0 n;

  • How to extract the sql text with SID and SERIAL No.

    Hello

    I am new to oracle database and recently I started my journey in the optimization of the performance.
    I need to retrieve the sql text that is triggered by the user in function were SID and SERIAL No.

    Thanks in advance...
    Prabha

    Select
    a.SID,
    a.Serial #.
    b.sql_text
    Of
    session v$ a.
    v$ sqlarea b
    where
    a.sql_address = b.Address
    and
    SID = 43;

  • SELECT SQL to merge the text of different lines into a single line

    Hello

    I need to create a Select statement to merge multiple lines in a single text. I have a table with the following data:
    SQL> DESC doc_comments
     Name                                                  Null?    Type
     ----------------------------------------------------- -------- ------------------------------------
     DOC                                                            NUMBER
     COMMENTS                                                       VARCHAR2(30)
    
    SQL> SELECT * FROM doc_comments
      2  /
    
           DOC COMMENTS
    ---------- ----------
             1 Note A
             1 Note B
             2 Note C
             2 Note D
             2 Note E
             3 Note F
    
    6 rows selected.
    I need to create a query on the table to show a result like this:
    DOC          COMMENTS
    ------------ --------------------------
               1 Note A, Note B
               2 Note C, Note D, Note E
               3 Note F
    A possible solution would be to create a function to merge the text of the various lines and then use it in the query, but I'm not allowed to create any function in the database, I can use a simple SELECT statement.

    Any ideas on how I can do?

    Assuming that comments contain no vertical bar (|) character:

    with doc_comments as (
                          select 1 doc,'Note A' comments from dual union all
                          select 1,'Note B' from dual union all
                          select 2,'Note C' from dual union all
                          select 2,'Note D' from dual union all
                          select 2,'Note E' from dual union all
                          select 3,'Note F' from dual
                         )
    select  doc,
            replace(ltrim(sys_connect_by_path(comments,'|'),'|'),'|',', ') comments
      from  (
             select  doc,
                     comments,
                     row_number() over(partition by doc order by comments) rn
               from  doc_comments
            )
      where connect_by_isleaf = 1
      start with rn = 1
      connect by doc = prior doc
             and rn  = prior rn + 1
      order by doc
    /
    
           DOC COMMENTS
    ---------- ----------------------------------------
             1 Note A, Note B
             2 Note C, Note D, Note E
             3 Note F
    
    SQL> 
    

    And if the comments may contain the vertical bar (|), then replace the hose in the code above with a character that is not used in the comments.

    SY.

  • Not find search text in the source code files

    If I rename a .vb in .txt or .sql file, I CAN find the text in the file by using a not indexed search, but if I do not rename the file, simple text search CAN NOT find in the file as a "create table" or "function".  This behavior is pretty useless for a developer.  Is there a way to do this type of research, or any kind of utility "Find Classic" that works like Find in XP?  Thank you.

    Here's a FAQ on the incidence of indexation and research: http://windows.microsoft.com/en-us/windows-vista/Improve-Windows-searches-using-the-index-frequently-asked-questions.  You should read the article in full - it is instructive on how research occur in Vista which is very different from how they were in XP.  It includes how to add files and locations to the index.

    To search for the folder C: whole disk in Vista go to start / search and type in ' or '. As you type, you'll see two hyperlinks appear just above where you type and we'll search everywhere.  A click on it.  Who will do a fast indexed search and bring up a dialog box.  Click on advanced search.  Click the drop-down location and find the C: drive and click on it. Check the box "include not indexed, hidden and system files (might be slow).»  Then click on search.  You will now search your entire hard drive to the specified file.  And Yes, this isn't a very effective way to search the entire disk for a file but it is how it is done in Vista.

    Here are some tips on how to find files (and the page includes a number of hyperlinks to related articles while doing the research you can also consult: http://windows.microsoft.com/en-us/windows-vista/Tips-for-finding-files.)  There are also a lot of links to other articles on the research of Vista - but not as good as this.

    I did a search for a character in my book, and each project book came to research (well most of them - all fit in the list without go advanced).  This is because the files .doc, .docx, and Documents are all included in the Index.  I think that if you add .sql and .vb and the location of your files, you'll be able to search by content as well.

    I hope this helps.  Good luck!

    Lorien - a - MCSE/MCSA/network + / A +.

  • Dynamic action - SQL - not returning the result as expected

    Hello

    I have a dynamic Action that runs some SQL codes and must return a string to a text box...

    the sql code that the action runs when a button is reached is:

    Select REPLACE ("|: P292_QPRODUCTS |) '''', ':', ' ' || : P292_QAOPRODUCTS | ""ProductsID"(="') from DUAL "

    P292_QAOPRODUCTS = DATABASE: JAVA

    P292_QAOPRODUCTS = AND (user can also choose OR)

    In the command SQL is what I see:

    "DATABASE" AND "ProductsID" = "JAVA".

    In the text box apex that action must set the value of the use of SQL I see only:

    ''

    any ideas?

    see you soon

    t

    Hello

    Could you share the 'Settings' and 'Affected Elements' sections of the property page of DA?

    You can also try a PLSQL and Code PL/SQL type as:

    Start

    Select REPLACE ("|: P292_QPRODUCTS |) '''', ':', ' ' || : P292_QAOPRODUCTS | ""ProductsID"(="') "

    in: DOUBLE P292_TEXT_BOX;

    end;

    Don't forget to fill in the field "Page elements to return" with the name of P292_TEXT_BOX.

    Concerning

  • SQL Loader - ignore the lines with "rejected - all null columns."

    Hello

    Please see the attached log file. Also joined the table creation script, data file and the bad and throw the files after execution.

    Sqlldr customer in the version of Windows-

    SQL * Loader: release 11.2.0.1.0 - Production

    The CTL file has two clauses INTO TABLE due to the nature of the data. The data presented are a subset of data in the real world file. We are only interested in the lines with the word "Index" in the first column.

    The problem we need to do face is, according to paragraph INTO TABLE appears first in the corresponding CTL lines file to the WHEN CLAUSE it would insert and the rest get discarded.

    1. statement of Create table : create table dummy_load (varchar2 (30) name, number, date of effdate);

    2. data file to simulate this issue contains the lines below 10. Save this as name.dat. The intention is to load all of the rows in a CTL file. The actual file would have additional lines before and after these lines that can be discarded.

    H15T1Y Index | 2. 19/01/2016 |

    H15T2Y Index | 2. 19/01/2016 |

    H15T3Y Index | 2. 19/01/2016 |

    H15T5Y Index | 2. 19/01/2016 |

    H15T7Y Index | 2. 19/01/2016 |

    H15T10Y Index | 2. 19/01/2016 |

    CPDR9AAC Index | 2. 15/01/2016 |

    MOODCAVG Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    3. the CTL file - name.ctl

    DOWNLOAD THE DATA

    ADD

    IN THE TABLE dummy_load

    WHEN (09:13) = "Index".

    TRAILING NULLCOLS

    (

    COMPLETED name BY ' | ',.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    IN THE TABLE dummy_load

    WHEN (08:12) = "Index".

    TRAILING NULLCOLS

    (

    COMPLETED name BY ' | ',.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    invoke SQL loader in a file-> beats

    C:\Oracle\product\11.2.0\client\bin\sqlldr USERID = myid/[email protected] CONTROL=C:\temp\t\name.ctl BAD=C:\temp\t\name_bad.dat LOG=C:\temp\t\name_log.dat DISCARD=C:\temp\t\name_disc.dat DATA=C:\temp\t\name.dat

    Once this is run, the following text appears in the log file (excerpt):

    Table DUMMY_LOAD, charged when 09:13 = 0X496e646578 ('Index' character)

    Insert the option in effect for this table: APPEND

    TRAILING NULLCOLS option in effect

    Column Position Len term Encl. Datatype name

    ------------------------------ ---------- ----- ---- ---- ---------------------

    NAME                                FIRST     *   |       CHARACTER

    RATE                                 NEXT     *   |       CHARACTER

    EFFDATE NEXT * |       CHARACTER

    SQL string for the column: ' TO_DATE (: effdate, "MM/DD/YYYY").

    Table DUMMY_LOAD, charged when 08:12 = 0X496e646578 ('Index' character)

    Insert the option in effect for this table: APPEND

    TRAILING NULLCOLS option in effect

    Column Position Len term Encl. Datatype name

    ------------------------------ ---------- ----- ---- ---- ---------------------

    NAME                                 NEXT     *   |       CHARACTER

    RATE                                 NEXT     *   |       CHARACTER

    EFFDATE NEXT * |       CHARACTER

    SQL string for the column: ' TO_DATE (: effdate, "MM/DD/YYYY").

    Record 1: Ignored - all null columns.

    Sheet 2: Cast - all null columns.

    Record 3: Ignored - all null columns.

    Record 4: Ignored - all null columns.

    Sheet 5: Cast - all null columns.

    Sheet 7: Discarded - failed all WHEN clauses.

    Sheet 8: Discarded - failed all WHEN clauses.

    File 9: Discarded - failed all WHEN clauses.

    Case 10: Discarded - failed all WHEN clauses.

    Table DUMMY_LOAD:

    1 row loaded successfully.

    0 rows not loaded due to data errors.

    9 lines not loading because all WHEN clauses were failed.

    0 rows not populated because all fields are null.

    Table DUMMY_LOAD:

    0 rows successfully loaded.

    0 rows not loaded due to data errors.

    5 rows not loading because all WHEN clauses were failed.

    5 rows not populated because all fields are null.


    The bad file is empty. The discard file has the following

    H15T1Y Index | 2. 19/01/2016 |

    H15T2Y Index | 2. 19/01/2016 |

    H15T3Y Index | 2. 19/01/2016 |

    H15T5Y Index | 2. 19/01/2016 |

    H15T7Y Index | 2. 19/01/2016 |

    CPDR9AAC Index | 2. 15/01/2016 |

    MOODCAVG Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |


    Based on the understanding of the instructions in the CTL file, ideally the first 6 rows will have been inserted into the table. Instead the table comes from the line 6' th.

    NAMERATEEFFDATE
    H15T10Y Index2January 19, 2016



    If the INTO TABLE clauses were put in the CTL file, then the first 5 rows are inserted and the rest are in the discard file. The line 6' th would have a ""rejected - all columns null. "in the log file. "


    Could someone please take a look and advise? My apologies that the files cannot be attached.

    Unless you tell it otherwise, SQL * Loader assumes that each later in the table and what clause after the first back in the position where the previous left off.  If you want to start at the beginning of the line every time, then you need to reset the position using position (1) with the first column, as shown below.  Position on the first using is optional.

    DOWNLOAD THE DATA

    ADD

    IN THE TABLE dummy_load

    WHEN (09:13) = "Index".

    TRAILING NULLCOLS

    (

    name POSITION (1) TERMINATED BY ' | '.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    IN THE TABLE dummy_load

    WHEN (08:12) = "Index".

    TRAILING NULLCOLS

    (

    name POSITION (1) TERMINATED BY ' | '.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

  • OracleException "ORA-01008: not all variables ' what SQL text contains both '-'and':'

    We have stumbled into what seems to be a similar bug as @user4111944 and Alex Keh - Product Manager-Oracle in ManagedDataAccess - bug in the drive when you use '-'and':' SQL text .


    We use Oracle.ManagedDataAccess v. 12.1.2400 (last NuGet package) and get an OracleException with the message


    ORA-01008: not all variables


    When we try to run the following code:


    var l_connectionString = "a connection string.

    var l_commandText = "UPDATE table_test SET col_description = '-test', col_time =: param WHERE col_id = 42 ';

    using (IDbConnection l_connection = new Oracle.ManagedDataAccess.Client.OracleConnection(l_connectionString))

    {

    l_connection. Open();

    var l_command is l_connection. CreateCommand();

    l_command.CommandText = l_commandText;

    var l_parameter is l_command. CreateParameter();

    l_parameter. ParameterName = "param";

    l_parameter. Value = DateTime.Now;

    l_command. Parameters.Add (l_parameter);

    l_command. ExecuteNonQuery());

    }

    The code runs perfectly if the omission of the '-' OR the side of a parameter value assignment (i.e. omitting ', col_time =: param').

    The stack for the OracleException trace is as follows:

    at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution (OracleConnectionImpl connectionImpl, Int32 & cursorId, bThrowArrayBindRelatedErrors Boolean, OracleException & exceptionForArrayBindDML, Boolean hasMoreRowsInDB, Boolean bFirstIterationDone)

    at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution (OracleConnectionImpl connectionImpl, Int32 & cursorId, bThrowArrayBindRelatedErrors Boolean, OracleException & exceptionForArrayBindDML, Boolean bFirstIterationDone)

    at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery (String queryString, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, longFetchSize of Int32, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64 [] scnFromExecution, OracleParameterCollection & bindByPositionParamColl, Boolean bBindParamPresent, OracleException & exceptionForArrayBindDML, Boolean isFromEF)

    at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery)

    UPDATE 1:

    Now, I have tested with older versions of Oracle.ManagedDataAccess.dll thus:

    • ODAC 12 c Release 4 (12.1.0.2.4 - released October 5, 2015) -fails with ORA-01008: not all variables
    • ODAC Release 3 (12.1.0.2.1 - published December 23, 2014) 12 c - fails with ORA-01008: not all variables
    • ODAC 12 c Release 2 (12.1.0.1.2 - released on December 20, 2013) - successful!

    Therefore, changes in driver management Oracle introduced between December 20, 2013 and December 23, 2014 has caused this problem.

    UPDATE 2:

    I dug some more in the question and after decompilation December 2013 and December 2014 versions, I found the piece interesting next to the code in the implementation of the ExecuteNonQuery()) method in the inner class OracleInternal.ServiceObjects.OracleCommandImpl. The code in red was added in the version of December 2014:

    ...

    else if (commandType! = CommandType.TableDirect)

    {

    OracleCommandImpl.TrimCommentsFromSQL (ref str);

    this.m_sqlStatementType = OracleCommandImpl.GetSqlStatementType (str);

    this.m_bHasReturningClause = OracleCommandImpl.HasReturningClause (str, this.m_sqlStatementType);

    }

    ...

    Take OracleCommandImpl.TrimCommentsFromSQL () method for a test ride easily reveal its weaknesses. It does not take into account the sequence '-' may appear in a quoted string, treating them as a comment and deletes the rest of the line...

    Could you please address this issue?

    Best regards

    Bernt

    Yes, the cause seems exactly the same thing as Bug 22308527. Once fix us this bug, please fix your problem as well.

  • CSS file remote - how do italicize the text in the cell

    I added this rule remote CSS file

    . FTR {}

    text-align: center;

    .   make-style: italic! important;

    }

    Tried applying class TR, TD and same P, but it will not display italic.

    Prefer not to use an inline style.

    Test page is here: Peattie Capital Management: invested in the individual

    This is the table of "Notes" at the bottom of page

    Your lawyer will be much appreciated.

    Remove the illegal character

    . FTR {}

    text-align: center;

    . make-style: italic! important;

    }

  • Need of SQL to display the password

    I am trying to write a SQL statement that show all changes to password successfully.  I came up with this one that successful action "ALTER USER" registered in DBA_AUDIT_TRAIL against the $ USER_HISTORY via a together pirated key, you will see controls labeled "SLINK".  It works well except when we moved per hour that there is a difference of one hour between DBA_AUDIT_TRAIL. TIMESTAMP and USER_HISTORY$. PASSWORD_DATE.  Some documents show also some second difference.  I'm not really happy with my approach at all because is a kluge, so if anyone has anything else that would be great too.

    We run on Oracle 10.2.0.4

    WITH PH

    AS (SELECT U.USER_ID,

    U.USERNAME,

    H.PASSWORD_DATE,

    U.USERNAME

    || TO_CHAR (H.PASSWORD_DATE, "MM/DD / YYYYHH:MI:SSPM '")

    AS SLINK

    OF SYS. USER_HISTORY$ H, U DBA_USERS

    WHERE H.USER # = U.USER_ID).

    A

    AS (SELECT USERNAME AS CHANGED_BY,

    OS_USERNAME,

    USERHOST,

    TERMINAL,

    OBJ_NAME | TO_CHAR (TIMESTAMP, "MM/DD / YYYYHH:MI:SSPM '")

    AS SLINK

    OF SYS. DBA_AUDIT_TRAIL

    WHERE ACTION = 43 AND RETURNCODE = 0)

    SELECT THE PH. USER_ID,

    PH. USER NAME,

    PH. PASSWORD_DATE,

    A.CHANGED_BY,

    A.OS_USERNAME,

    A.USERHOST,

    A.TERMINAL

    PH, HAS

    WHERE PH. SLINK = A.SLINK (+);

    You can analyze superior (DBA_AUDIT_TRAIL. SQL_TEXT) for something like 'ALTER USER IDENTIFIED BY % %.

    You will need your audit_trail parameter value DB, EXPANDED to capture the SQL text.

    See configuration and administration audit

  • Shows SQL ID, OEM, but says: * SQL text not available *.

    I'm a bit confused on this and was hoping that someone can help you.

    I use DBConsole to an Oracle 11.2 (on Solaris 10) database.

    I see really high momentary ' * + tips + * ' in an activity greater than about 20 to 30 minute intervals.
    When I try to understand which SQL is causing the Spike, I drag the section shaded the area containing the Spike and look at all the SQL statements during this period.
    I first try to look the SQL statements by highlighting, or by clicking on the entries in the column of ID of SQL in SQL from the top (bottom left of the page).
    Then I copy and paste the statements in my sqlplus session and see if it causes any sort of spike that I followed in another window OEM looking at key activities.
    Usually, I don't not even a blip on the radar, so I'm not find the SQL statement that causes the spikes.
    Sometimes, however, when I hover over an ID of SQL, it does not show the SQL statement and instead of it shows just the words: [SQL ID].

    Then, I run a report of ASH for the 5 minute window of the shaded area containing the Spike.
    When I look at the "full list of SQL text" ASH report, I found an entry or the Scriptures have to say: * SQL text not available *.

    So then I try to select sql_text from v$ sqlarea where sql_id = «...» "(whatever this sql_id is), and I get no rows found.
    for example,.
    SQL> select sql_text from v$sqlarea where sql_id = '99mjdv0hkh5km';
    
    no rows selected
    In fact, when I try other sql_id, I don't get them either and I guess that's because they are already old v $ sqlarea.
    If I check the v$ sqlarea for up-to-date notifications, they work fine.
    So, the first thing, what controls the duration of v$ sqlarea (pool size)?

    Then I chose to DBA_HIST_ACTIVE_SESS_HISTORY and it displays the information related to the ID of SQL, but of course, it does not show the sql text.
      1* select * from DBA_HIST_ACTIVE_SESS_HISTORY where sql_id = '99mjdv0hkh5km'
    SQL> /
    
    ---------------------------------------------------------------------------------------------------------------------------------------------------
         19242 1311231241               1   68759345
    21-MAR-13 07.24.50.524 AM                                                          394            2337 FOREGROUND
            16         65 99mjdv0hkh5km Y                0          3
    SELECT                                                                         6.2052E+18 99mjdv0hkh5km
                       3          2792326754                4
    TABLE ACCESS
    FULL                                                                16777216 21-MAR-2013 07:24
    Note above FULL TABLE SCAN. That's what I'm trying to dig into who I think is the culprit causing the spikes.

    If your application uses literals, SQL is simply disappeared from sqlarea until you know.

    Although it will certainly be when it is running, then maybe you should look at the right time :)

    the alternative is a 10046 trace to capture the SQL...

  • ORA-13786: lack of SQL text

    Hello
    11g R2, connected sysdba, I got the following errors. Any idea? Any help? Thanks before.
    SQL> select sql_id, sql_text from v$sql where sql_text like '%SELECT A.BUSINESS_UNIT, D.DESCR FROM PS_SP_RECV1_NONVW%' and sql_text not like '%v$sq
    ;
    
    SQL_ID
    -------------
    
    6d66jzkkyg2sw
    SQL_TEXT
    --------------------------------------------------------------------------------
    SELECT A.BUSINESS_UNIT, D.DESCR FROM PS_SP_RECV1_NONVW A, PS_SP_RCV1_NONVWLN D W
    
    
    
    HERE D.BUSINESS_UNIT LIKE 'IFP%' AND D.BUSINESS_UNIT=A.BUSINESS_UNIT AND D.LANGU
    AGE_CD='FRA' UNION SELECT  BUSINESS_UNIT, DESCR FROM PS_SP_RECV1_NONVW A WHERE B
    USINESS_UNIT LIKE 'IFP%' AND NOT EXISTS (SELECT 'X' FROM PS_SP_RCV1_NONVWLN D WH
    ERE  D.BUSINESS_UNIT=A.BUSINESS_UNIT AND D.LANGUAGE_CD='FRA') ORDER BY 1
    
    
    SQL> variable stmt_task VARCHAR2(64);
    SQL>
    SQL> EXEC :stmt_task := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => '6d66jzkkyg2sw');
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> EXEC DBMS_SQLTUNE.EXECUTE_TUNING_TASK(:stmt_task);
    
    PL/SQL procedure successfully completed.
    
    SQL> EXEC dbms_sqltune.accept_sql_profile(:stmt_task);
    BEGIN dbms_sqltune.accept_sql_profile(:stmt_task); END;
    
    *
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "TASK_2767"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16442
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7568
    ORA-06512: at line 1
    SQL> DECLARE
      2    l_sql_tune_task_id  VARCHAR2(200);
      3  BEGIN
      4    l_sql_tune_task_id := DBMS_SQLTUNE.accept_sql_profile (
      5                            task_name => ':stmt_task',
      6                            name      => 'TEST_PROFILE',
      7                            force_match  => TRUE,
      8                            profile_type => DBMS_SQLTUNE.PX_PROFILE);
      9  END;
     10  /
    DECLARE
    *
    ERROR at line 1:
    ORA-13605: The specified task or object :stmt_task does not exist for the
    current user.
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.PRVT_ADVISOR", line 5878
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 28
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
    ORA-06512: at line 4

    I think you forgot the taskname-online setting "TaskName":

    DECLARE
    stmt_task VARCHAR2 (64);
    BEGIN
    stmt_task: = dbms_sqltune.create_tuning_task (sql_id-online '6d66jzkkyg2sw', task_name-online 'task_name');
    END;
    /

    SQL > EXEC dbms_sqltune.accept_sql_profile ('task_name');

Maybe you are looking for