All sql within an uncommitted  transaction

Hello,
Is there any way to list the text of all sql statements inside an uncommited transaction?
I am trying to get this data joining the v$session, v$transaction and *v$session views but i can only retrieve the last sql executed.
Thanks in advance!
*Correction: v$sql
Edited by: user9087711 on 13/04/2010 05:43

You can see the user session information in v$session. You can get the row in v$session if you know the SQL in v$sql by joining
v$session.sql_address = v$sql.address AND
v$session.sql_hash_value = v$sql.hash_value
If you want to see who holds uncommitted transactions - they will be holding UNDO, so we can look there. This will show you who has which undo segments and their size.
SET termout ON
SET heading ON
SET PAGESIZE   40
SET LINESIZE   110
SET FEEDBACK   on
COLUMN pgm_notes    FORMAT a80        HEADING 'Notes'
COLUMN rbs          FORMAT a25        HEADING 'Undo Segment'
COLUMN oracle_user  FORMAT a12        HEADING 'Oracle|Username'
COLUMN sid_serial   FORMAT a12        HEADING 'SID,Serial'
COLUMN unix_pid     FORMAT a6         HEADING 'O/S|PID'
COLUMN Client_User  FORMAT a20        HEADING 'Client|Username'
COLUMN Unix_user    FORMAT a12        HEADING 'O/S|Username'
COLUMN login_time   FORMAT a17        HEADING 'Login Time'
COLUMN last_txn     FORMAT a17        HEADING 'Last Active'
COLUMN undo_kb      FORMAT 99,999,999 HEADING 'Undo KB'
TTITLE CENTER 'Who/What is Using Which Undo/RBS'  -
  skip Center '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' -
  skip 2
repfooter off
btitle    off
SELECT r.name                   rbs,
        nvl(s.username, 'None')  oracle_user,
        s.osuser                 client_user,
        p.username               unix_user,
        to_char(s.sid)||','||to_char(s.serial#) as sid_serial,
        p.spid                   unix_pid,
--        TO_CHAR(s.logon_time, 'mm/dd/yy hh24:mi:ss') as login_time,
--        TO_CHAR(sysdate - (s.last_call_et) / 86400,'mm/dd/yy hh24:mi:ss') as last_txn,
        t.used_ublk * TO_NUMBER(x.value)/1024  as undo_kb
   FROM v$process     p,
        v$rollname    r,
        v$session     s,
        v$transaction t,
        v$parameter   x
  WHERE s.taddr = t.addr
    AND s.paddr = p.addr(+)
    AND r.usn   = t.xidusn(+)
    AND x.name  = 'db_block_size'
  ORDER
     BY r.name
set feedback onEdited by: ajallen on Apr 13, 2010 9:51 AM

Similar Messages

  • See all SQL statements that have been executed in an active transaction?

    When I query v$transaction, v$session and v$sql, all I can see is the SQL statement that is currently running in an active transaction.
    How can I view all SQL statements that have been executed in a currently running transaction since that transaction began?

    Dana N wrote:
    When I query v$transaction, v$session and v$sql, all I can see is the SQL statement that is currently running in an active transaction.
    How can I view all SQL statements that have been executed in a currently running transaction since that transaction began?In the general case: impossible.
    In some special cases you can use v$sql, v$open_cursor, or "Availabilty>View and Manage Transactions" or something else.
    But be aware, transaction could be started long time ago, all cursor could be flushed from shared pool and closed, and redo (the page from Grid Control bring Log Miner) may not always be available.

  • Capture all sql statements within an hour period

    Hi there,
    Is it possible to capture all the all sql statement? When I query the v$sql view I still missed few statements. Basically I want to statements from our in house applications.
    Thanks

    Thanks for the reply.
    It really doesn't help. I have a datatbase with three schemas and the number on connections in the v$session are 55. The SID and SERIAL# constantly changed.
    I've tried the sql_trace_in_session but the sid the changed every time I query. Also I tried set sql_trace to "true" but I have open the trace files to determine the schema.
    Is there a way capture a specific schema only?
    Thanks

  • Capture all sql statements of a logical transaction

    Hi!
    How can i capture all sql statemnts of a
    logical trasaction(ALL sql stamtements before a commit) . Could somebody please
    reply...
    Thanks
    null

    Turn on tracing in that session (look in DBMS_SESSION)

  • How to query uncommited transactions

    Hi Does anyone know how to query Oracle database from SQL*Plus to view uncommitted transactions?
    Thanks

    I noticed after I posted that I had used a package I found on the web called list that includes several useful functions. So in case someone wants it, here are the package and body:
    ***PACKAGE***
    CREATE OR REPLACE PACKAGE list AUTHID CURRENT_USER IS
    -- All of these functions and procedures have the following parameters:
    -- list_in - A delimited list to be parsed.
    -- delimiter - The delimiter to be used for parsing the list. Defaults
    -- to a comma.
    -- null_item - What to do with null items in the list. A null item is created
    -- by consecutive occurances of the delimiter. Valid values are
    -- 'KEEP' to allow items in the list to be null, or 'SKIP' to ignore
    -- null items, ie. treat consecutive occurances of delimiters as a
    -- single delimiter. The default is 'KEEP'.
    -- delimiter_use - How the delimiter is to be interpreted. Valid values are
    -- 'ANY' to treat the entire delimiter string as a single occurance
    -- of a delimiter which must be matched exactly, or 'ANY' to treat
    -- the delimiter string as a set of single character delimiters, any
    -- of which is a delimiter. The default is 'ANY'.
    -- Return the first item in a list.
    FUNCTION head(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES (head,WNDS,WNPS);
    -- Return the remainder of a list after the first item and its delimiter.
    FUNCTION tail(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES (tail,WNDS,WNPS);
    -- Return the nth item in a list.
    -- The parameter, item_num, denotes which item to return.
    FUNCTION item(
    list_in IN VARCHAR2,
    item_num IN INTEGER DEFAULT 1,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES (item,WNDS);
    -- Append an item to a list and return the new list.
    -- The parameter, item_in, contains the new item to append.
    FUNCTION append_item(
    list_in IN VARCHAR2,
    item_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',') RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES (append_item,WNDS);
    -- Return the number of items in a list.
    FUNCTION num_items(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN INTEGER;
    PRAGMA RESTRICT_REFERENCES (num_items,WNDS);
    -- Search a list for an item, and give its location in the list,
    -- or zero IF not found.
    -- The parameter, item_in, gives the item to be found in the list.
    FUNCTION in_list(
    list_in IN VARCHAR2,
    item_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN INTEGER;
    PRAGMA RESTRICT_REFERENCES (in_list,WNDS);
    -- Convert an array to a delimited list.
    -- The array to be input is a DBMS_UTILITY.uncl_array so that
    -- the LIST package is compatible with the comma_to_table and
    -- table_to_comma built ins.
    -- In this function, delimiter is always treated as a single
    -- string.
    FUNCTION array_to_list(
    array_in IN DBMS_UTILITY.UNCL_ARRAY,
    arrlen_in IN INTEGER,
    delimiter IN VARCHAR2 DEFAULT ',') RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES (array_to_list,WNDS,WNPS);
    -- Print a list using DBMS_OUTPUT.
    PROCEDURE print_list(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY');
    -- Convert a list to an array and return the array and its size.
    -- This is a procedure because it returns more than one value.
    -- The array to be returned is a DBMS_UTILITY.uncl_array so that
    -- the LIST package is compatible with the comma_to_table and
    -- table_to_comma built ins.
    PROCEDURE list_to_array(
    list_in IN VARCHAR2,
    arrlen OUT BINARY_INTEGER,
    array_out OUT DBMS_UTILITY.uncl_array,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY');
    -- Sort a list
    -- Null items are always skipped when sorting lists, since they would sort
    -- to the end of the list anyway. CMPFNC is the name of a function to compare
    -- two items. The default of '>' sorts in ascending order, '<' in descending order.
    -- If you write your own function to be used for sorting, it must:
    -- 1. Take two parameters of type VARCHAR2
    -- 2. Return an INTEGER
    -- 3. Return a negative number if the first item is to sort lower than
    -- the second, a zero if they are to sort as if equal, or a positive
    -- number if the first item is to sort higher than the second.
    -- 4. Be executable by the user running the sort. Normal naming rules apply.
    FUNCTION sort_list(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    cmpfnc IN VARCHAR2 DEFAULT '>',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES (sort_list,WNDS);
    end;
    ***END PACKAGE SPEC***
    ***BEGIN BODY***
    CREATE OR REPLACE PACKAGE BODY list IS
    current_list VARCHAR2(32760) DEFAULT '';
    current_delim VARCHAR2(30) DEFAULT ',';
    TYPE list_array IS TABLE OF VARCHAR2(2000)
    INDEX BY BINARY_INTEGER;
    current_array list_array;
    current_arrlen BINARY_INTEGER DEFAULT 0;
    current_null_item VARCHAR2(4) DEFAULT '';
    current_delimiter_use VARCHAR2(3) DEFAULT '';
    -- Find the first delimiter.
    FUNCTION find_delimiter(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN BINARY_INTEGER IS
    delimiter_loc BINARY_INTEGER;
    BEGIN
    IF upper(delimiter_use) = 'ALL' THEN
    delimiter_loc := INSTR(list_in,delimiter);
    ELSIF upper(delimiter_use) = 'ANY' THEN
    delimiter_loc := INSTR(TRANSLATE(list_in,delimiter,ltrim(RPAD(' ',LENGTH(delimiter)+1,CHR(31)))),CHR(31));
    END IF;
    RETURN delimiter_loc;
    END find_delimiter;
    -- Return the first item in a list.
    FUNCTION head(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN VARCHAR2 IS
    delimiter_loc BINARY_INTEGER;
    BEGIN
    delimiter_loc := find_delimiter(list_in,delimiter,null_item,delimiter_use);
    IF delimiter_loc > 1 THEN
    RETURN SUBSTR(list_in,1,delimiter_loc-1);
    ELSIF delimiter_loc = 1 THEN
    RETURN NULL;
    ELSE
    RETURN list_in;
    END IF;
    END head;
    -- Return the remainder of a list after the first item and its delimiter.
    FUNCTION tail(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN VARCHAR2 IS
    start_ch BINARY_INTEGER;
    BEGIN
    start_ch := find_delimiter(list_in,delimiter,null_item,delimiter_use);
    IF start_ch = 0 THEN
    RETURN NULL;
    ELSE
    IF upper(delimiter_use) = 'ALL' THEN
    start_ch := start_ch + LENGTH(delimiter);
    ELSE
    start_ch := start_ch + 1;
    END IF;
    IF start_ch > LENGTH(list_in) THEN
    RETURN NULL;
    ELSE
    RETURN SUBSTR(list_in,start_ch);
    END IF;
    END IF;
    END tail;
    -- Convert a list to an array.
    PROCEDURE parse_list(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') IS
    list_to_parse VARCHAR2(32760);
    BEGIN
    IF list_in = current_list AND
    delimiter = current_delim AND
    null_item = current_null_item AND
    delimiter_use = current_delimiter_use THEN
    NULL;
    ELSE
    current_list := list_in;
    current_delim := delimiter;
    current_null_item := upper(null_item);
    current_delimiter_use := upper(delimiter_use);
    list_to_parse := list_in;
    current_arrlen := 0;
    WHILE list_to_parse IS NOT NULL LOOP
    IF current_null_item <> 'SKIP' OR
    head(list_to_parse,delimiter,null_item,delimiter_use) IS NOT NULL THEN
    current_arrlen := current_arrlen + 1;
    current_array(current_arrlen) := SUBSTR(head(list_to_parse,delimiter,null_item,delimiter_use),1,2000);
    END IF;
    list_to_parse := tail(list_to_parse, delimiter,null_item,delimiter_use);
    END LOOP;
    END IF;
    END parse_list;
    -- Convert a list to an array and return the array and its size.
    PROCEDURE list_to_array(
    list_in IN VARCHAR2,
    arrlen OUT BINARY_INTEGER,
    array_out OUT DBMS_UTILITY.uncl_array,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') IS
    BEGIN
    parse_list(list_in,delimiter,null_item,delimiter_use);
    arrlen := current_arrlen;
    FOR i IN 1..arrlen LOOP
    array_out(i) := SUBSTR(current_array(i),1,240);
    END LOOP;
    END list_to_array;
    -- Print a list using DBMS_OUTPUT.
    PROCEDURE print_list(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') IS
    BEGIN
    DBMS_OUTPUT.ENABLE(100000);
    parse_list(list_in,delimiter,null_item,delimiter_use);
    FOR i IN 1..current_arrlen LOOP
    dbms_output.put_line(SUBSTR(current_array(i),1,240));
    END LOOP;
    END print_list;
    -- Return the number of items in a list.
    FUNCTION num_items(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN INTEGER is
    BEGIN
    parse_list(list_in,delimiter,null_item,delimiter_use);
    RETURN current_arrlen;
    END num_items;
    -- Return the nth item in a list.
    FUNCTION item(
    list_in IN VARCHAR2,
    item_num IN INTEGER DEFAULT 1,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN VARCHAR2 is
    BEGIN
    parse_list(list_in,delimiter,null_item,delimiter_use);
    IF item_num NOT BETWEEN 1 AND current_arrlen THEN
    RETURN NULL;
    ELSE
    RETURN current_array(item_num);
    END IF;
    END item;
    -- Append an item to a list and return the new list.
    -- The parameter, item_in, contains the new item to append.
    FUNCTION append_item(
    list_in IN VARCHAR2,
    item_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',') RETURN VARCHAR2 IS
    BEGIN
    IF list_in IS NULL THEN
    RETURN item_in;
    ELSE
    RETURN list_in || delimiter || item_in;
    END IF;
    END append_item;
    -- Search a list for an item, and give its location in the list,
    -- or zero IF not found.
    FUNCTION in_list(
    list_in IN VARCHAR2,
    item_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    null_item IN VARCHAR2 DEFAULT 'KEEP',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN INTEGER is
    BEGIN
    parse_list(list_in,delimiter,null_item,delimiter_use);
    FOR item_num IN 1..current_arrlen LOOP
    IF current_array(item_num) = item_in THEN
    RETURN item_num;
    END IF;
    END LOOP;
    RETURN 0;
    END in_list;
    -- Convert an array to a delimited list.
    FUNCTION array_to_list(
    array_in IN DBMS_UTILITY.UNCL_ARRAY,
    arrlen_in IN INTEGER,
    delimiter IN VARCHAR2 DEFAULT ',') RETURN VARCHAR2 IS
    list_out VARCHAR2(32760):= '';
    BEGIN
    FOR item_num IN 1 .. arrlen_in LOOP
    EXIT WHEN LENGTH(list_out) +
    LENGTH(array_in(item_num)) > 32760;
    list_out := list_out||array_in(item_num);
    IF item_num < arrlen_in THEN
    list_out := list_out||delimiter;
    END IF;
    END LOOP;
    RETURN list_out;
    END array_to_list;
    -- Sort a list
    FUNCTION sort_list(
    list_in IN VARCHAR2,
    delimiter IN VARCHAR2 DEFAULT ',',
    cmpFnc IN VARCHAR2 DEFAULT '>',
    delimiter_use IN VARCHAR2 DEFAULT 'ANY') RETURN VARCHAR2 IS
    temp_array list_array;
    temp_len PLS_INTEGER := 0;
    temp_item VARCHAR2(2000);
    list_out VARCHAR2(32760);
    PROCEDURE swap (
    first_item IN OUT VARCHAR2,
    second_item IN OUT VARCHAR2) IS
    temp_item VARCHAR2(2000);
    BEGIN
    temp_item := first_item;
    first_item := second_item;
    second_item := temp_item;
    END swap;
    FUNCTION cmp (
    first_item IN VARCHAR2,
    second_item IN VARCHAR2,
    cmpfnc IN VARCHAR2 DEFAULT '=') RETURN INTEGER IS
    return_value INTEGER;
    BEGIN
    IF cmpfnc = '>' THEN
    IF first_item < second_item THEN
    return_value := -1;
    ELSIF first_item = second_item THEN
    return_value := 0;
    ELSIF first_item > second_item THEN
    return_value := 1;
    END IF;
    ELSIF cmpfnc = '<' THEN
    IF first_item > second_item THEN
    return_value := -1;
    ELSIF first_item = second_item THEN
    return_value := 0;
    ELSIF first_item < second_item THEN
    return_value := 1;
    END IF;
    ELSE
    EXECUTE IMMEDIATE 'BEGIN :I := '||cmpfnc||'(:A,:B); END;'
    USING OUT return_value, IN first_item, IN second_item;
    END IF;
    RETURN return_value;
    END cmp;
    BEGIN
    parse_list(list_in,delimiter,'SKIP',delimiter_use);
    FOR item_num IN 1..current_arrlen LOOP
    temp_item := current_array(item_num);
    FOR i IN 1..temp_len LOOP
    IF cmp(temp_array(i),temp_item,cmpfnc) > 0 THEN
    swap(temp_array(i),temp_item);
    END IF;
    END LOOP;
    temp_len := temp_len + 1;
    temp_array(temp_len) := temp_item;
    END LOOP;
    FOR item_num IN 1..temp_len LOOP
    EXIT WHEN LENGTH(list_out) +
    LENGTH(temp_array(item_num)) > 32760;
    list_out := list_out||temp_array(item_num);
    IF item_num < temp_len THEN
    list_out := list_out||delimiter;
    END IF;
    END LOOP;
    RETURN list_out;
    END sort_list;
    END;
    *** END BODY***
    Carl

  • Calling all SQL Server users! May TechNet Gurus announced!

    The results for May's
    TechNet Guru competition have been posted!
    http://blogs.technet.com/b/wikininjas/archive/2014/01/16/technet-guru-awards-december-2013.aspx
    Congratulations to all our new Gurus for May!
    We will be interviewing some of the winners and highlighting their achievements, as the month unfolds.
    Post your JUNE contributions here:
    http://social.technet.microsoft.com/wiki/contents/articles/24692.technet-guru-contributions-for-june-2014.aspx
    Read all about June's competition, hopefully in a stickied post, at the top of this forum.
    Below is a summary of the medal winners for May. The last column being a few of the comments from the judges.
    Unfortunately, runners up and their judge feedback comments had to be trimmed from THIS post, to fit into the forum's 60,000 character limit, however
    the full version is available on TechNet Wiki.
    Some articles only just missed out, so we may be returning to discuss those too, in future blogs.
     BizTalk Technical Guru - May 2014  
    Peter Lindgren
    BizTalk 2010: Call SSO from Orchestration
    TGN: "I bet a few people will love you for this, I often see this question at the forums, and you answered it well. Good work!"
    Mandi Ohlinger: "Great topic and great explanation. It also makes SSO seem less scary :)"
    Sandro Pereira: "Very useful sample, well explained with all the necessary code "
    boatseller
    BizTalk: Using an Orchestration Sync or Async
    Sandro Pereira: "Good sample provide by boatseller and well explained."
    TGN: "Hey, great work man! This is a well done article and I love it!"
    Steef-Jan Wiggers
    Exposing data through BizTalk Service Hybrid Connections
    Sandro Pereira: "Nice article with a good overview about BizTalk Service Hybrid Connections and how you can configure them."
    TGN: "Good article, well explained and good pictures. Again Steef-Jan, you know what you're doing!"
    Mandi Ohlinger: "Nice set-up overview. "
     Forefront Identity Manager Technical Guru - May 2014  
    Sheldon.Jaquay
    Forefront Identity Manager - RCDC - Regular Expression
    AM: "Great contribution! Option C is clever, and the other examples are also a useful reference. Thanks for sharing your work with the community."
    Ed Price: "Nice short article. Great topic, and great blend of code, color, and images!"
    Søren Granfeldt: "Nice with a little focus on RegEx with FIM and good help for people wanting to have the portal be just a little more company specific"
    GO: "Thanks for the article, but the images weren't clear enough."
    Scott Eastin
    Installing Oracle MA for FIM R2 on Windows 2012
    GO: "EX-CE-LL-EN-T article!"
    AM: "Very nice article with clear step-by-step instructions - thanks for putting this together. "
    Ed Price: "I love the sections with numbered bullets at the end. They're very clear and easy to read!"
     Microsoft Azure Technical Guru - May 2014  
    João Sousa
    Microsoft Azure - Remote Debbuging How To?
    GO: "Clever. Well Explained and written. Thanks! You absolutely deserve the GOLD medal."
    Ed Price: "Fantastic topic and great use of images!"
    Alex Mang
    The Move to the New Azure SQL Database Tiers
    Ed Price: "Great depth and descriptions! Very timely topic! Lots of collaboration on this article from community members!"
    GO: "great article but images are missing"
    Alex Mang
    Separating Insights Data In Visual Studio Online
    Application Insights For Production And Staging Cloud Services
    Ed Price: "Good descriptions and clarity!"
    GO: "great article but images are missing"
     Microsoft Visio Technical Guru - May 2014  
    Mr X
    How to export your Orchestrator Runbooks to Visio and Word
    Ed Price: "A basic tip, but very helpful. Good job!"
    GO: "Thanks for that!"
    SR: "Nice "How To" article explaining the basic steps."
    AH: "This article is to the point takes a simple tasks and describes it accurately.
     SharePoint 2010 / 2013 Technical Guru - May 2014  
    Dan Christian
    Build a loop workflow using SharePoint 2010
    Jinchun Chen: "Excellent article. Personally speaking, the biggest challenge is SharePoint Designer workflow is “while-loop”. Many customers had the same scene as this article set. I am sure they are like this article.
    Benoît Jester: "An AWESOME, huge, detailed article by Dan. Did I mention the videos? Thanks Dan!"
    GO: "Great article Dan! Thanks!"
    Margriet Bruggeman: "Detailed explanation which I admire, but wouldn't be using a vs workflow be more logical in this case?"
    Geetanjali Arora
    Export User Profile Properties using CSOM
    Benoît Jester: "Great article on this new SharePoint 2013 development capability. I appreciate the code explanations."
    GO: "This is a great article. Love the way how you explain it."
    Margriet Bruggeman: "I will use this piece of code in the future!"
    Jinchun Chen: "Nice. How about customized properties? It would be nice more, if a CSOM script version can be attached. "
    Inderjeet Singh
    Unable
    to restore site collection issue
    GO: "Simple. Good Written. Clear and Clever. Great article."
    Margriet Bruggeman: "Quite handy reference for this particular problem"
    Benoît Jester: "Good explanation on the site collection deletion process."
     Small Basic Technical Guru - May 2014  
    Philip Conrod
    Programming Home Projects with Microsoft Small Basic: Chapter
    1: Writing Programs Using Small Basic
    RZ: "Very systematic introduction."
    Ed Price: "Good overview article that covers all the basics!"
    Michiel Van Hoorn: "Nice introduction into the history of Basic. Needs to be updated to reflect current support for Windows version (Windows NT? LOL )"
    Philip Conrod
    Programming Home Projects with Microsoft Small Basic: Chapter 6: Flash
    Card Math Quiz Project
    Michiel Van Hoorn: "This article (or book chapter) is excellent material to learn how to envision, design and build your program. The actual example program is also very usable."
    Ed Price: "I love how this tutorial keeps building on itself as it goes!"
    Nonki Takahashi
    Small Basic: Variable
    RZ: "Very nice explanation of the concept of variables!"
    Michiel Van Hoorn: "Clear explanation and not frills"
    Ed Price: "Great article with fantastic formatting!"
     SQL BI and Power BI Technical Guru - May 2014  
    Durval Ramos
    SSIS - Event Handling with "OnError" ou "OnTaskFailed"
    Ed Price: "The images are very helpful! Could use a grammar pass. Great descriptions!"
    GO: "This article has everything. A conclusion, reference, see also, other languages section. everybody should write actually like this."
    NN: "An interesting topic and article but unfortunately a bit hard to understand due to grammar problems"
    PT: "This is a good article on a useful topic. Please have your article reviewed and edited for proper language."
    S Kamath
    Expansion of Time dimension in Analysis Service
    PT: "Your article is concise and to the point, and contains useful information. It would be good to conclude with a short summary and perhaps compare this technique to others, discussing best practices."
    Ed Price: "Good details on Time Dimension. The images help us understand as we go."
    GO: "I like this one, but something is missing. Do not know what, but I had a blast reading the other two's. Does not mean that this one is bad, but there is something missing, maybe my knowledge..."
    NN: "Good article, but seems to be missing conclusion. It will also benefit from adding See Also section"
    Sherry Li
    SSAS – Ignore unrelated dimension or not
    NN: "Good and interesting article based on the blog"
    GO: "Wonderful article!"
    PT: "This is an important topic and contains helpful information but this is a simple topic that can be explained in fewer words. I found this article to be overly detailed and hard to read. I suggest having it reviewed and edited for
    proper language."
    Ed Price: "Good descriptions. Could be shorter. Good use of images!"
     SQL Server General and Database Engine Technical Guru - May 2014  
    Shanky
    Curious Case Of Logging In Online and Offline Index Rebuild In Full Recovery
    Model
    Jinchun Chen: "Good article. Thank you!"
    GO: "One of the best Wiki Articles ever! Thanks buddy!"
    DRC: "-- This is a great article which provides in-depth information on internals of Online & Offline rebuild index and Transaction logging. -- The following statement need to be re-written for more clarity. “The less logging can be
    attributed to the fact that no information about page allocation is logged information about de-allocation is logged please see below figure 13. Also if you compare amount of record returned in this case we had output containing just 64 rows while offline
    index rebuild had ____ rows.” -- Overall, a great article, thoroughly enjoyed reading it."
    NN: "Very interesting article, another great contribution by Shanky"
    Ed Price: "Thorough descriptions and great solution! Good article!"
    Uwe Ricken
    SQL Server: Be aware of the correct data type for predicates in queries
    Ed Price: "Incredibly well formatted! Great breakdown of sections!"
    GO: "Whoo, this is a wonderful article!"
    DRC: "-- This article explains the Query execution behaviour when the Query is not optimally written which could cause increased execution time. Great article. -- This topic is clearly explained and documented using a simple example and
    sample output which is easy is understand. -- Simple, very well written and great article to read. "
    NN: "Very good, easy to understand article and important information to know to all SQL Server developers"
     System Center Technical Guru - May 2014  
    Mr X
    Central Management of DSRM password on Domain Controllers using Orchestrator
    Ed Price: "The images really carry you through this article. Great execution!"
    GO: "Great article. I like your article Mr X! Thanks for your passion!"
    Kevin Holman: "Nice to see real world examples of Orchestrator in action solving problems that all customers have. This was very simple, but provides an excellent solution."
    W P Chomak
    System Center Operations Manager 2012 R2 - Customizing E-Mail Notifications
    AB: "Easy reading info that can help many"
    Ed Price: "Short and sweet. An incredibly valuable topic and needed addition to the Wiki!"
    GO: "Clever and well written. Thanks"
    Christoffer S
    System Center Configuration Manager 2012 R2 - Install applications in a task sequence based on AD-Groups
    Ed Price: "Good mix of code, images, and information. Could use more in-depth descriptions. Great article!"
    GO: "Clear and simple! Thank you!"
     Transact-SQL Technical Guru - May 2014  
    Naomi N
    T-SQL: Random Equal Distribution
    Jinchun Chen: "Nice."
    JS: "The crucial thing about such a procedure is to check the data before the randomization and afterwards. You might encounter situations where "John Smith" and "John Meyers" might have exchanged their First names
    which is technically correct, but logically and obviously wrong. So make sure that there is one additional check afterwards that makes sure that eventual privicy concerns will not survive the random process. Normally this would not happen, but I have already
    checked this is one of my older blog entries, where we exactly had that problem obfuscating data to make that operational and live data will not be recognized afterwards. http://blogs.msdn.com/b/jenss/archive/2009/04/08/when-is-random-random-enough.aspx In
    addition to this some attributes are sticky to each other like gender and First Name. You also have to make sure that your distribution might change statistically in relation to other attributes."
    Richard Mueller: "Very instructive. Perhaps the See Also section should have more links."
    Ed Price: "Great formatting and topic! Could benefit from more descriptions. Great article!"
    GO: "Naomi, your article is nice. Simple to understand the 'problem' and execute the 'solution""
    Manoj Pandey: "Nice article with a different way to resolve a given problem. I think this can also be done by using NTILE() function. I've added the code in comments section."
    Rogge H
    Extending SYS.Geometry to Utilize Temporal Data
    GO: "Great article, I enjoyed reading it. Thank you"
    Manoj Pandey: "I like the idea, but it took me some more time to understand the overall logic as I'm new to Geo datatypes, Thanks."
    JS: "For me not using this sort of things regularly, I don't see the problem and the benefit. I have no doubt that this is a brilliant explanations how to cope with a problem, but for me this is missing yet the red line. More pictures
    would be helpful describing the problem and outlining the results produced."
    Richard Mueller: "Needs more explanation, and perhaps an example. There should be links to relevant references."
    Ed Price: "Good job on the opening descriptions! Could benefit from breaking up and explaining the code more. Images and references would be helpful. Good article!"
    Hasham Niaz
    DataCleanUp() Function Implementation in MS SQL Server
    Jinchun Chen: "Good."
    JS: "-Does actually not work for Case senstive areas where I want to remoce certain Upper/lower case characters. This might be not interesting for some people, but is extremely important and relevant to other people. The limitation is
    that I can´t pass multiple values to be removed from the string, right ? Could this be implemented as well as many people wash out their data from unused / unimportant control characters. "I have tested it on a table which has got more than 11 Million
    rows and it executed fine returning the correct results. Since this is a scalar function you will notice decrease in performance." Once you want to maintain the old data and keep the new cleaned up one seperately, you could suggest something like persisting
    the data in a computed column which could be indexed and then help improving the performance. This would not be the case for any adhoc queries though."
    Richard Mueller: "Very clever and also very useful. There should be links to references, for example to explain the PATINDEX function."
    Ed Price: "Great job on this article! Very clear and well executed! See JS's comments for some thoughts about what's possible. Great article!"
    Manoj Pandey: "A good utility Function that I can use and tweak for my future needs, Thanks."
    Jaliya Udagedara
    Calling WCF Service from a Stored Procedure in Microsoft SQL Server 2012
    GO: "Gold Winner. For sure!"
    Ed Price: "Amazing article! The depth, images, and code formatting make this fantastic!"
    NN: "Great article, thorough explanations, great interaction in the comments - very useful tutorial"
    Søren Granfeldt: "Nice work."
    João Sousa
    ASP.NET MVC 5 - Bootstrap 3.0 in 3 Steps
    GO: "Thanks for that great article"
    Ed Price: "Great formatting! Good use of images!"
    NN: "Nice introduction to Bootstrap in ASP.MVC project"
    Søren Granfeldt: "Just a little more technical explanation would be nice"
    Critical_stop
    Using 64-bit shortcuts from a 32-bit application
    NN: "Good and short article, right to the point"
    Søren Granfeldt: "Mixing and matching 32/64 bit always seems to give people a hassle. This will help those having issues."
    GO: "good one!"
    Ed Price: "Good article. Short and sweet."
     Wiki and Portals Technical Guru - May 2014  
    XAML guy
    TechNet Guru Competition: Judge System Explanation
    GO: "No one could do it beter than you Pete! Thanks!"
    Richard Mueller: "Excellent explanation of the judging system. Perhaps could use a See Also section."
    Ed Price: "Good quote from Shanky in the comments, "Awesome....Kudos to your for your beautiful work" -- Great job!"
    NN: "Very good article. It may also benefit from See Also section"
    Payman Biukaghazadeh
    TechNet Wiki Persian Council
    GO: "Go Persion GOOO!"
    Richard Mueller: "The Persian Council is an excellent idea. The link to "How to Write an Article" should be in a See Also section, along with other articles."
    NN: "Great article, missing a link to other portals and councils pages"
    Ed Price: "Thank you to Payman and the Persian community for jumping in! The Wiki is warm!"
    Durval Ramos
    Wiki: Best Practices for building TechNet Wiki Portals
    Ed Price: "Fantastic job from Durval on helping us standardize the portals!"
    NN: "Good article, but unfortunately a bit hard to read and understand due to bad grammar. "
    Richard Mueller: "Excellent and important topic. Grammar still needs work. I like the links and See Also."
     Windows Phone and Windows Store Apps Technical Guru - May 2014  
    Sara Silva
    Authentication using Facebook, Google and Microsoft account in WP8.0 App (MVVM)
    Ed Price: "Great article! Great code formatting and good use of code comments for descriptions of what your code's doing! Could be improved by breaking out the code with more descriptions in the article (in addition to
    the code comments). Very in-depth article! "
    Peter Laker: "An excellent article, pulling together all the bits you need to make this happen"
    SubramanyamRaju.B
    WindowsPhone Facebook Integration:How to post message/image to FaceBook Fan
    Page(C#-XAML)
    Ed Price: "Good topic! Code blocks would help with the formatting. Good job on this article!"
    Peter Laker: "Love this, very useful to many I'm sure, thanks!"
    Saad Mahmood
    Creating a custom control in Expression Blend with Custom Properties (WindowsPhone
    & Store)
    Ed Price: "This has a good mix of descriptions and clarity! The images help a lot!"
    Peter Laker: "A nice introduction to our beloved Blend. Great work!"
     Windows Presentation Foundation (WPF) Technical Guru - May 2014  
    Magnus (MM8)
    WPF/MVVM: Merging Cells In a ListView
    KJ: "Ah the collectionViewSource -- never used it myself but this looks like a good reference article if I ever needed to..."
    GO: "Thank you!"
    Ed Price: "Great formatting and good descriptions. Short and sweet! Another fantastic entry from Magnus!"
    Peter Laker: "Thank you again Magnus"
     Windows Server Technical Guru - May 2014  
    Mr X
    How to implement User
    Activity Recording for AD-Integrated Critical Servers by combining the use of Group Policy, Powershell and Orchestrator
    Philippe Levesque: "Really good information and detailed step."
    JH: "brilliant, love how it combines different technologies to achieve a solution, clearly written and well illustrated."
    JM: "Another excellent article, thanks again for your many great contributions"
    Richard Mueller: "Very creative solution. Great to have such detailed steps and images."
    GO: "I like the conclusion. Thanks"
    Mr X
    How Domain Controllers are located in Windows
    GO: "Super article Mr X! Merci!"
    JM: "Yet again, excellent article."
    Richard Mueller: "Good documentation. An explanation of how the priorities and weights are determined would help. A See Also section would also help."
    Philippe Levesque: "Good "In deep" information. Good to know to help diagnose computer problem in AD's site."
    JH: "another good article, great diagrams. Some repetition but it does help clarify a complex issue. "
    Mahdi Tehrani
    Detailed Concepts:Secure Channel Explained
    JH: "great article. This fills an important gap in this content space. Editing is a little rough, but diagrams and explanations are clear."
    JM: "This is a very good article, however you need to provide more detail in the section on how to fix a broken Channel."
    Richard Mueller: "Excellent topic. Grammar needs work. Good images. Could use a See Also section."
    Philippe Levesque: "Really good explanation of the secure's channel, I like the debugging step included ! "
    GO: "Thanks for this, not everybody know about secure channel."
    As mentioned above, runners up and their judge feedback were removed from this forum post, to fit into the forum's 60,000 character limit.
    A great big thank you to EVERYONE who contributed an article to last month's competition.
    Hopefully we will see you ALL again in this month's listings?
    As mentioned above, runners up and comments were removed from this post, to fit into the forum's 60,000 character limit.
    You will find the complete post, comments and feedback on the
    main post.
    Please join the discussion, add a comment, or suggest future categories.
    If you have not yet contributed an article for this month, and you think you can write a more useful, clever, or better produced wiki article than the winners above,
    here's your chance! :D
    More about the TechNet Guru Awards:
    TechNet Guru Competitions
    #PEJL
    Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to the one and only
    TechNet Wiki, for future generations to benefit from! You'll never get archived again!
    If you are a member of any user groups, please make sure you list them in the
    Microsoft User Groups Portal. Microsoft are trying to help promote your groups, and collating them here is the first step.

    Congrats to Shanky and Uwe!
     SQL Server General and Database Engine Technical Guru - May 2014  
    Shanky
    Curious Case Of Logging In Online and Offline Index Rebuild In Full Recovery
    Model
    Jinchun Chen: "Good article. Thank you!"
    GO: "One of the best Wiki Articles ever! Thanks buddy!"
    DRC: "-- This is a great article which provides in-depth information on internals of Online & Offline rebuild index and Transaction logging. -- The following statement need to be re-written for more clarity. “The less logging can be attributed
    to the fact that no information about page allocation is logged information about de-allocation is logged please see below figure 13. Also if you compare amount of record returned in this case we had output containing just 64 rows while offline index rebuild
    had ____ rows.” -- Overall, a great article, thoroughly enjoyed reading it."
    NN: "Very interesting article, another great contribution by Shanky"
    Ed Price: "Thorough descriptions and great solution! Good article!"
    Uwe Ricken
    SQL Server: Be aware of the correct data type for predicates in queries
    Ed Price: "Incredibly well formatted! Great breakdown of sections!"
    GO: "Whoo, this is a wonderful article!"
    DRC: "-- This article explains the Query execution behaviour when the Query is not optimally written which could cause increased execution time. Great article. -- This topic is clearly explained and documented using a simple example and sample
    output which is easy is understand. -- Simple, very well written and great article to read. "
    NN: "Very good, easy to understand article and important information to know to all SQL Server developers"
    Also worth a mention were the other entries this month:
    SQL Server installation error Could Not  Find Database Engine Startup Handle by
    Shanky
    Ed Price: "Wow, what an amazing article! Fantastic code formatting, great descriptions, and the images help you when you need it!"
    NN: "I read this article with great interest. The funny thing is that at the same time I was reading someone was having this exact problem in UniversalThread.com forum, so I was able to refer him to this article. UPDATE. Looks like he is still
    having problems"
    GO: "Thank you so much!"
    DRC: " -- This article -- Explains on modifying/deleting the registry keys after backup -- But it doesn't provide the level/how to back up the registry. -- We also need to warn the users that if we modify/delete the wrong registry key it might
    lead to crash of SQL or even WINDOWS -- In case there are multiple instances on the same machine following this article would cause all the SQL instance to crash. -- So it would be better to contact the support team or before trying out the action steps. "
    5 Top Features Your Company Can Use in SQL Server 2014 Standard Edition by Richard
    Douglas
    NN: "Very well written and quite interesting. Since it's originated from the blog, it has a personal touch which is more appropriate for a blog " 
    DRC: " -- Expand the word GA (General Availability) in the below sentence and correct the spelling mistake "it was written before the GA of SQL Server 2014" "SSD technology and a chunk of this session was on BPE" "who doesn't’t like playing
    with new cool stuff!" "which doesn't’t sound as impressive" "business from the likes of Oracle et al." -- This is a good article and provides all the required information and links to Microsoft website for more details. " 
    Ed Price: "Fantastic topic, but it should be made more "Wiki like" and less personalized. Anybody in the community can help us do that! " 
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Dynamic SQL within a SQL Query ?

    is there any possibility to do like this ?
    SELECT table_name, XXXXXXXX('SELECT Count(*) FROM '||table_name) tot_rows
      FROM dba_tables
    WHERE owner = 'SCOTT';or any other trick to run dynamic SQL within the SQL Query?
    Hoping....that it should be.
    Regards,
    Orapdev

    One small disadvantage: it is executing 202 SQL statements: 3 "user SQL statements" (the one above and the 2 "select count(*)..."), and 199 internal ones ...How did you get to those numbers?
    I just traced this statement and found completely different results:
    TKPROF: Release 10.2.0.3.0 - Production on Tue Jul 10 12:12:10 2007
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Trace file: diesl10r2_ora_5440.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    declare  cursor NlsParamsCursor is    SELECT * FROM
      nls_session_parameters;begin  SELECT Nvl(Lengthb(Chr(65536)),
      Nvl(Lengthb(Chr(256)), 1))    INTO :CharLength FROM dual;  for NlsRecord in
      NlsParamsCursor loop    if NlsRecord.parameter = 'NLS_DATE_LANGUAGE' then  
         :NlsDateLanguage := NlsRecord.value;    elsif NlsRecord.parameter =
      'NLS_DATE_FORMAT' then      :NlsDateFormat := NlsRecord.value;    elsif
      NlsRecord.parameter = 'NLS_NUMERIC_CHARACTERS' then     
      :NlsNumericCharacters := NlsRecord.value;    elsif NlsRecord.parameter =
      'NLS_TIMESTAMP_FORMAT' then      :NlsTimeStampFormat := NlsRecord.value;   
      elsif NlsRecord.parameter = 'NLS_TIMESTAMP_TZ_FORMAT' then     
      :NlsTimeStampTZFormat := NlsRecord.value;    end if;  end loop;end;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 50 
    SELECT NVL(LENGTHB(CHR(65536)), NVL(LENGTHB(CHR(256)), 1))
    FROM
    DUAL
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.01       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          0          0           1
    total        3      0.01       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 50     (recursive depth: 1)
    Rows     Row Source Operation
          1  FAST DUAL  (cr=0 pr=0 pw=0 time=7 us)
    SELECT *
    FROM
    NLS_SESSION_PARAMETERS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          0          0          17
    total        3      0.00       0.00          0          0          0          17
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 50     (recursive depth: 1)
    Rows     Row Source Operation
         17  FIXED TABLE FULL X$NLS_PARAMETERS (cr=0 pr=0 pw=0 time=124 us)
    select PARAMETER,VALUE
    from
    nls_session_parameters where PARAMETER in('NLS_NUMERIC_CHARACTERS',
      'NLS_DATE_FORMAT','NLS_CURRENCY')
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          0          0           3
    total        3      0.00       0.00          0          0          0           3
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 50 
    Rows     Row Source Operation
          3  FIXED TABLE FULL X$NLS_PARAMETERS (cr=0 pr=0 pw=0 time=57 us)
    select to_char(9,'9C')
    from
    dual
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          0          0           1
    total        3      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 50 
    Rows     Row Source Operation
          1  FAST DUAL  (cr=0 pr=0 pw=0 time=2 us)
    SELECT table_name,
           DBMS_XMLGEN.getxmltype ('select count(*) c from ' || table_name).EXTRACT
                                                                    ('//text').getstringval
                                                                          () tot
      FROM dba_tables
    WHERE table_name IN ('EMP', 'DEPT') AND owner = 'SCOTT'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.01       0.02          0         48          0           2
    total        3      0.01       0.02          0         48          0           2
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 50 
    Rows     Row Source Operation
          2  HASH JOIN  (cr=42 pr=0 pw=0 time=2952 us)
          2   MERGE JOIN CARTESIAN (cr=42 pr=0 pw=0 time=1206 us)
          2    NESTED LOOPS OUTER (cr=42 pr=0 pw=0 time=478 us)
          2     NESTED LOOPS OUTER (cr=36 pr=0 pw=0 time=421 us)
          2      NESTED LOOPS OUTER (cr=30 pr=0 pw=0 time=379 us)
          2       NESTED LOOPS OUTER (cr=30 pr=0 pw=0 time=365 us)
          2        NESTED LOOPS  (cr=22 pr=0 pw=0 time=312 us)
          2         NESTED LOOPS  (cr=16 pr=0 pw=0 time=272 us)
          2          NESTED LOOPS  (cr=8 pr=0 pw=0 time=172 us)
          1           TABLE ACCESS BY INDEX ROWID USER$ (cr=2 pr=0 pw=0 time=56 us)
          1            INDEX UNIQUE SCAN I_USER1 (cr=1 pr=0 pw=0 time=30 us)(object id 44)
          2           INLIST ITERATOR  (cr=6 pr=0 pw=0 time=111 us)
          2            TABLE ACCESS BY INDEX ROWID OBJ$ (cr=6 pr=0 pw=0 time=87 us)
          2             INDEX RANGE SCAN I_OBJ2 (cr=4 pr=0 pw=0 time=54 us)(object id 37)
          2          TABLE ACCESS CLUSTER TAB$ (cr=8 pr=0 pw=0 time=98 us)
          2           INDEX UNIQUE SCAN I_OBJ# (cr=4 pr=0 pw=0 time=26 us)(object id 3)
          2         TABLE ACCESS CLUSTER TS$ (cr=6 pr=0 pw=0 time=39 us)
          2          INDEX UNIQUE SCAN I_TS# (cr=2 pr=0 pw=0 time=13 us)(object id 7)
          2        TABLE ACCESS CLUSTER SEG$ (cr=8 pr=0 pw=0 time=37 us)
          2         INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=4 pr=0 pw=0 time=21 us)(object id 9)
          0       INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=4 us)(object id 36)
          2      TABLE ACCESS BY INDEX ROWID OBJ$ (cr=6 pr=0 pw=0 time=33 us)
          2       INDEX UNIQUE SCAN I_OBJ1 (cr=4 pr=0 pw=0 time=23 us)(object id 36)
          2     TABLE ACCESS CLUSTER USER$ (cr=6 pr=0 pw=0 time=28 us)
          2      INDEX UNIQUE SCAN I_USER# (cr=2 pr=0 pw=0 time=12 us)(object id 11)
          2    BUFFER SORT (cr=0 pr=0 pw=0 time=716 us)
          1     FIXED TABLE FULL X$KSPPI (cr=0 pr=0 pw=0 time=661 us)
       1436   FIXED TABLE FULL X$KSPPCV (cr=0 pr=0 pw=0 time=1449 us)
    select count(*) c
    from
    EMP
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          0          1          0           1
    total        4      0.00       0.00          0          1          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 50     (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=1 pr=0 pw=0 time=96 us)
         14   INDEX FULL SCAN EMP_IDX (cr=1 pr=0 pw=0 time=46 us)(object id 61191)
    select metadata
    from
    kopm$  where name='DB_FDO'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          2          0           1
    total        3      0.00       0.00          0          2          0           1
    Misses in library cache during parse: 0
    Optimizer mode: CHOOSE
    Parsing user id: SYS   (recursive depth: 1)
    Rows     Row Source Operation
          1  TABLE ACCESS BY INDEX ROWID KOPM$ (cr=2 pr=0 pw=0 time=42 us)
          1   INDEX UNIQUE SCAN I_KOPM1 (cr=1 pr=0 pw=0 time=22 us)(object id 365)
    select count(*) c
    from
    DEPT
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          0          1          0           1
    total        4      0.00       0.00          0          1          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 50     (recursive depth: 1)
    ALTER SESSION SET sql_trace=FALSE
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
    Parsing user id: 50 
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        5      0.00       0.00          0          0          0           0
    Execute      5      0.00       0.00          0          0          0           1
    Fetch        3      0.01       0.02          0         48          0           6
    total       13      0.01       0.03          0         48          0           7
    Misses in library cache during parse: 0
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        5      0.00       0.00          0          0          0           0
    Execute      5      0.01       0.00          0          0          0           0
    Fetch        7      0.00       0.00          0          4          0          21
    total       17      0.01       0.00          0          4          0          21
    Misses in library cache during parse: 0
        9  user  SQL statements in session.
        1  internal SQL statements in session.
       10  SQL statements in session.
    Trace file: diesl10r2_ora_5440.trc
    Trace file compatibility: 10.01.00
    Sort options: default
           1  session in tracefile.
           9  user  SQL statements in trace file.
           1  internal SQL statements in trace file.
          10  SQL statements in trace file.
          10  unique SQL statements in trace file.
         132  lines in trace file.
           0  elapsed seconds in trace file.I only see a ratio of 1:9 for user- to internal SQL statements?
    michaels>  select * from v$version
    BANNER                                                         
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production                         
    CORE     10.2.0.3.0     Production                                     
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production        
    NLSRTL Version 10.2.0.3.0 - Production  

  • How to find out all SQLs executed by a procedure

    I need to find out all SQLs executed by a procedure. I can trace and check but in my case the issue happened 4 hours back and i know what procedure was causing it. There are multiple dynamic queries fired from this procedure. I need to track down all SQLs fired by this procedure constructed dynamically during the time issue was happening.
    I have the sql_id of the statement which was executing the procedure. How do I track down all "child" SQLs using this sql_id?
    Will appreciate any pointers.
    -ravi

    Thanks for your suggestion and looking into this.
    We already have that functionality built in. Version is 10.2.0.3...But the issue is the proc is called thousands of time in a day and we can not keep the tracking of sqls and parameters passed on all the time. When the issue happened we were not tracking. The bind variables are not captured as the SQL is constructed within the proc by looking up the values dynamically from secondary tables dynamically based on the parameters passed to the procedure. Now the SQLs which are generated from the proc will have the bind variables captured as they will come as predicates and will have no clob types (condition for the binds to be captured).
    I need a query to track down all "child" SQLs by using the sql_id of the parent process which is the procedure's sql_id.

  • How to fill combo box with list of all SQL server

    Ok, I know how to find all SQL servers that I need, I have code for that task, and I have Array of all servers.
    My problem is ...
    I made setup project and do a huge work, and in the end this task appear!
    I used ORCA tool to change TextBox (A) template in visual studio (2008 by the way), and I transform first TextBox to ComboBox.
    Now, the little part that I'am missing is how to fill this combo box with a result of my function for listin SQL servers?
    Can I somehow send combobox object to myMethod:
    private void FillCombo(ComboBox cmb)
          // do the job
    or
    instanceOfThisCombo.Items.Add(listOfSQLServers);
    please help me to solve this... thanksc#

    Hi Valerij,
    The ComboBox control in an MSI dialog uses the ComboBox table to populate the items in it. To get what you want, you need to update the ComboBox table in the MSI package with your application and run the MSI package. The following KB article describes how to dynamically populate a ListBox control in Windows Installer:
    http://support.microsoft.com/kb/291329
    This method introduced in the above KB article also applies to populating a ComboBox control in Windows Installer.
    I don't think it's possible to run the application as a Custom Action from within the MSI package because the application will modify the content of the MSI package which is currently running. So you need to launch the MSI package from within your application after updating the ComboBox table. In short, when installing, just run your application which updates the ComboBox table and install the MSI package.
    Hope this helps.
    If you have any question, please feel free to let me know.
    Sincerely,
    Linda Liu

  • Uncommited transactions remain after Instance Recovery

    After Instance Recovery, the database seems to contain uncommitted transactions. Please provide an explanation for the following:
    create table t1
    as
    select *
    from all_objects;
    commit;
    create table t2
    as
    select *
    from all_objects;
    update t2
    set object_id = 1 where rownum = 1;
    shutdown abort;
    Neither table t2 nor the update to it were committed (right?), therefore, once the database starts up t2 should not be there. On the contrary, it is still there. In the Oracle Database Backup and Recovery Advanced Guide 10g Release 2, page 11-9, explains how the uncommitted transactions are removed (rolled back) in the Roll Backward step (transaction recovery) of the Instance recovery process.
    Any insight on this is highly appreciated. Thanks.

    Note also following scenario run with SYSDBA privileges:
    bas002> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
    PL/SQL Release 10.2.0.2.0 - Production
    CORE    10.2.0.2.0      Production
    TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    bas002>
    bas002> drop table t2;
    drop table t2
    ERROR at line 1:
    ORA-00942: table or view does not exist
    bas002> create table t2
      2  as
      3  select *
      4  from all_objects;
    Table created.
    bas002>
    bas002> update t2
      2  set object_id = 1 where object_id=258;
    1 row updated.
    bas002>
    bas002> shutdown abort;
    ORACLE instance shut down.
    bas002> startup
    ORACLE instance started.
    Total System Global Area  192937984 bytes
    Fixed Size                  1288484 bytes
    Variable Size             130025180 bytes
    Database Buffers           54525952 bytes
    Redo Buffers                7098368 bytes
    Database mounted.
    Database opened.
    bas002>
    bas002> select count(*) from t2 where object_id=1;
      COUNT(*)
             0
    bas002>Message was edited by:
    Pierre Forstmann

  • SQL query to get transaction detail from DEFERRED_TRAN_ID

    Hi,
    I'm using Oracle Advance Replication and get the transaction detail from Enterprise Manager Console.
    So instead of using the console.
    Is there a way any SQL query which get transaction details like SQL query fired, old and new column value etc from DEFERRED_TRAN_ID.
    thanks

    quote:
    Originally posted by:
    lucapac
    I have two tables: tblWorkers and tblSkills. tblWorkers has a
    column, Skills, which is populated from a multiple-checkbox form
    field with one or more skill_IDs from tblSkills, so each
    tblWorkers.Skills consists of a list of one or more comma-delimited
    values. For any Skill_ID, I need to generate a listing of all
    Workers with the corresponding skill, so I have tried to do
    something along the lines of SELECT WorkerName FROM tblWorkers
    WHERE Skills IN (Skills, #FORM.Skill_ID#) ... or WHERE Skills IN
    (ListFind(Skills, #FORM.Skill_ID#)) ... etc. ??? My results (once I
    got data type mismatches out of the way) return all Workers, not
    just those with the desired Skill. There must be an easy way to do
    this ... How do people with a bit more CF/SQL experience than I
    have do this???
    As Kronin implied, we normalize our databases. If you don't
    understand that answer, the book "Database Design for Mere Mortals"
    is often mentioned on this forum.

  • Report / Query to show all texts within all customer master records

    Hi,
    Can anyone let me know if there is a report or a query to show all texts within all customer master records?
    Many Thanks
    Aries

    Hello Aries,
    I don't believe there is a standard SAP report that does this. 
    But,...
    You can see all the customer text types (Customer SD) using transaction VOTX. 
    Table TTXID contains the same info using Text Object "KNVV". 
    If you decide to have a custom ABAP developed use function READ_TEXT.  SE37 can be used to validate a test.
    Regards,
    Jim

  • Trace all sql statements

    Hi,
    Is it possible to trace all the SQL's into one trace file or any other alternative to capture all the SQL statements.

    1. Export will take some time or a long time to run.
    You will have to either
    a. Use CONSISTENT=Y (and hope that you are able to get a consistent export)
    b. Stop Transactions for the duration.
    In option a. if you do allow transactions those transactions will appear neither in the Export NOR in the "trace file" that you will be generating later !! You WILL lose transactions.
    2. There's no way to get a "trace file" to capture all SQL statements and bind values across multiple database sessions such that they are properly synchronised in time.
    a. You can't get a trace file that you can simply run to reapply transactions.
    b. You can't sequence transactions from multiple sessions running concurrently.
    3. How fast do you REALLY think you will be able to apply that "trace file" (which, in any case, you CANNOT generate) ? It will take noticeable to considerable time.
    4. How do you propose to transfer the Export dump to the remote location ? When you have no network connectivity ? Via tapes, transfered by courier ? Then why can't you transfer a Database Hot Backup and ArchiveLogs via tapes, transferred by courier ?
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Capture all SQL statements and archive to file in real time

    Want to Capture all SQL statements and archive to file in real time?
    Oracle Session Manager is the tool just you need.
    Get it at http://www.wangz.net
    This tools monitor how connected sessions use database instance resources in real time. You can obtain an overview of session activity sorted by a statistic of your choosing. For any given session, you can then drill down for more detail. You can further customize the information you display by specifying manual or automatic data refresh, the rate of automatic refresh.
    In addition to these useful monitoring capabilities, OSM allows you to send LAN pop-up message to users of Oracle sessions.
    Features:
    --Capture all SQL statement text and archive to files in real time
    --Pinpoints problematic database sessions and displays detailed performance and resource consumption data.
    --Dynamically list sessions holding locks and other sessions who are waiting for.
    --Support to kill several selected sessions
    --Send LAN pop-up message to users of Oracle sessions
    --Gives hit/miss ratio for library cache,dictionary cache and buffer cache periodically,helps to tune memory
    --Export necessary data into file
    --Modify the dynamic system parameters on the fly
    --Syntax highlight for SQL statements
    --An overview of your current connected instance informaiton,such as Version, SGA,License,etc
    --Find out object according to File Id and Block Id
    Gudu Software
    http://www.wangz.net

    AnkitV wrote:
    Hi All
    I have 3 statements and I am writing some thing to a file using UTL_FILE.PUT_LINE after each statement is over. Each statement takes mentioned time to complete.
    I am opening file in append mode.
    statement1 (takes 2 mins)
    UTL_FILE.PUT_LINE
    statement2 (takes 5 mins)
    UTL_FILE.PUT_LINE
    statement3 (takes 10 mins)
    UTL_FILE.PUT_LINE
    I noticed that I am able to see contents written by UTL_FILE.PUT_LINE only after statement3 is over, not IMMEDIATELY after statement1 and statement2 are done ?
    Can anybody tell me if this is correct behavior or am I missing something here ?Calling procedure must terminate before data is actually written to the file.
    It is expected & correct behavior.

  • How can i add css styling to all elements within a symbol.

    How can i add css styling to all elements within a symbol.
    For instance.
    If i have a symbol call "data" and within this i have 4 elements called 1,2,3,4 how do i add styling to all these elements without having to re-write code for each element.
    I know i can style a symbol called "data" by :
    sym.$("data").css("font-family", "baumans, sans-serif", "font-size", "15px");
    ...But this does not style the content of the elements 1,2,3 and 4
    If i were using standard CSS and HTML then all div's within a div called "data" would be styled the same.
    help "my friends of the code"

    Hi Justin,
    1) You have a syntax error here: sym.$("data").css("font-family", "baumans, sans-serif", "font-size", "15px");
    sym.$("data").css({ "font-family": "baumans, sans-serif", "font-size": "15px"} ); // correct
    sym.$("data").css( "font", "15px baumans, sans-serif" ); //correct
    2) Then, loading the jQuery file is not required. You can create a class or change tags.
    How to add a class:
    Changing tags:
    You've got 2 demo files (Edge 5.0) here: class or tag.zip - Box

Maybe you are looking for