How to join sys.dm_exec_query_stats to FROM sys.sql_modules as M INNER JOIN sys.objects

0
SELECT O.Name as ProcName
,M.Definition as CreateScript
,O.Create_Date
,O.Modify_Date
FROM sys.sql_modules as M INNER JOIN sys.objects as O
ON M.object_id = O.object_id
WHERE O.type = 'P'
--Procedure
--WHERE O.type = 'V' View
--WHERE O.type = 'FN' Function
How can I join this to sys.dm_exec_query_stats to
get the execution_count?

You can join to sys.dm_exec_procedure_stats using object_id for procedures in cache and get execution count
http://msdn.microsoft.com/en-in/library/cc280701(v=sql.110).aspx
for ones not in cache you need to use logic like below
SELECT O.Name as ProcName
,M.Definition as CreateScript
,O.Create_Date
,O.Modify_Date
,QS.execution_count
FROM sys.dm_exec_query_stats AS QS
CROSS APPLY sys.dm_exec_sql_text(QS.sql_handle) t
INNER JOIN sys.sql_modules as M
ON M.object_id = t.objectid
INNER JOIN sys.objects as O
ON M.object_id = O.object_id
WHERE O.type = 'P'
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • How to call a jsp file from an servlet and access the jsp file objects??

    Hi everybody
    I have an jsp file where it contains a vector object with some data and I have a servlet that needs to access this vector object . How can my servlet call for this jsp page and get the vector object. ?
    then an applet will be calling this servlet to get some other object created with the data contained within this vector object...so each time Applet ask the servlet for the object the servlet need to call for this jsp page somehow
    My main question is the communication servlet-jsp
    please if u have any clue I will appreciate it
    thanks

    Hi
    There are several ways to share objects between JSPs/Servlets.
    You can share objects by putting them in the request-in which case the objects lifetime is limited by that of the request, Another way is to store them in the session, againg the lifetime is limited by the lifetime of the session. To have objects that have to persistent over the application life-span use the servletContext to store the objects.
    Any good tutorial should help you get started. Please see the link below for a tutorial on Servlets/JSPs
    Note: Local variables in the JSP cannot be shared with other components as their scope is limited to that particular Page/Servlet.
    Link: http://java.sun.com/docs/books/tutorial/servlets/
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

  • How to join navegational attributes with infoset

    Hi Experts,
    How to join navegational attributes with infoset? the infoset based on ODS and both having navigational attributes,
    my requirment is to join Vendor account group navigational attributes with infoset,
    or else plz
    povid stps to crete...
    In the infoset how to  join Info Object CHAR1 to the CHAR1 in the ODS object which makes all the attributes of CHAR1 accessible in the Infoset..
    plz suggest with steps,
    regards,
    Edited by: Sap-10564461 on Apr 20, 2010 11:34 AM

    Hi,
      Consider that you have a cube/ODS which has 0MATERIAL. Say you have switched on the nav attribute Material group in the cube.
    Now since an infoset acts on a table level, it cannot read nav. attributes directly. Hence you will not be able to find 0MATERIAL__MATGROUP in the infoset.
    Now if you want to get able to obtain MATGROUP, you need to add 0MATERIAL to your infoset. One you have added 0MATERIAL, you will be see the attributes of this infoobject as fields.
    Map 0MATERIAL from the cube to 0MATERIAL from the info object. Join type is inner join. Now check the MATGROUP field under the infoobject table indicating that this field needs to be fetched by the infoset.
    Now when you run a query on the infoset, you will be able to use MATGROUP from 0MATERIAL.
    Hope this helps.
    Regards.

  • Non existent table still in sys.objects, how to fix that?

    I have moved a table from one table schema to another one (dbo.MY_TABLE to RAW.MY_TABLE), using ALTER SCHEMA..., the problem is when our ETL is trying to remove all the constraints it finds 2 records (dbo.MY_TABLE), one for the user table and the other
    the PK of that table. The problem is that the sys.objects points to dbo.MY_TABLE which now doesn't exist anymore. How could I update the sys.objects table to correctly reflect that the table has moved table schema?

    Hi,
    sys.objects lists user objects. If
    select * from sys.all_objects where name='MY_TABLE'
    gives you more than 1 table (look at the "type_desc" column), you DO have more than 1 table. One in "dbo" schema and one in the "raw" schema.
    Those 2 tables should have different object_id values. Object_id is unique within a database, and all dependant objects use that object_id to refer to the object. They do not use object_name, schema name, not even schema_id. Just object_id. If you want to
    see all objects, including system objects, query sys.all_objects.
    Regards,
    Vedran

  • How to create SYS.DUAL table by own?

    Hi People,
    I removed DUAL table from SYS user by mistake.Is it possible to recreate it again similar to that?.how to restore it?.pls help me with suggestions.I use Oracle 10g
    With Regards
    Vidya.N
    Edited by: vidusnat on Sep 6, 2010 1:56 AM

    vidusnat wrote:
    Ya right.but that seems to be a normal table isn't it?.how to avoid insertion in it?.we cant create triggers on sys objects too.what else we can do?.You do not manually interfere with this table at all - via triggers or other hacks to make it a single-row-table You only need to do 4 things:
    - start the db in upgrade mode
    - create the dual table
    - insert the single row
    - create a public synonym
    Nothing else. Read the Oracle Support notes - they are your best reference.

  • How do I remove personal PC from old business domain to join Windows 7 home network?

    I brought my own laptop PC into a business I joined, and they registered the laptop to their domain and upgraded my Windows 7 Home to Ultimate. It was a temp assignment, now I've left the company fo another assignment, but will work from home. I've
    upgraded my family PCs to Windows 7 to create a homegroup network, but I can't join this homegroup with my laptop PC, as I'm prevented from doing so while the laptop is apparently still on the domain.  How can I remove my laptop from this domain, since
    it doesn't apply any more?

    Hi,
    First of all , I would like to advice you that you must need have an administrator’s permission account of this laptop. If so, You need to leave your laptop from the domain, then you need to change the Network Location to Home Network.
    About how to leave your laptop form a domain, please kindly refer to the following steps:
    Step 1. Click Start button, then point to Computer.
    Step 2. Right-Click Computer, then click Properties.
    Step 3. Under the Computer name, domain, and workgroup settings, click Change Settings.
    Step 4. Then hit Change, change the Member of Option to Workgroup, hit OK.
    Step 5. You will be prompted the administrator’s account, type it.
    Step 6. Then restart your computer.
    About how to join a Homegroup, Please kindly refer to the following steps:
    Step 1. Make sure a HomeGroup has already been created. One computer on the network must create a HomeGroup, then all the other computers can join in.
    Step 2. Make sure you know the HomeGroup password.
    Step 3. Click the Start button.
    Step 4. Click Control Panel from the Start Menu.
    Step 4. In the search box type in homegroup -> now click HomeGroup.
    Step 5. From the bottom right hand corner of the window click Join Now.
    Step 6. Select the Libraries you would like to share over the network. Pictures, Music Videos and Printers are checked by default. You can add Documents by checking the box. Now click Next.
    Step 7. Type in the HomeGroup password.
    Step 8. Click Next and wait for the computer to join the HomeGroup.
    Step 9. Click Finish and you’re done.

  • How to join  fields from different internal tables and display into one int

    hai i have one doubt...
    how to join  fields from different internal tables and display into one internal table..
    if anybody know the ans for this qus tell me......

    hii
    you can read data as per condition and then can join in one internal table using READ and APPEND statement..refer to following code.
    SELECT bwkey                         " Valuation Area
             bukrs                         " Company Code
        FROM t001k
        INTO TABLE i_t001k
       WHERE bukrs IN s_bukrs.
      IF sy-subrc EQ 0.
        SELECT bwkey                       " Valuation Area
               werks                       " Plant
          FROM t001w
          INTO TABLE i_t001w
           FOR ALL ENTRIES IN i_t001k
         WHERE bwkey = i_t001k-bwkey
           AND werks IN s_werks.
        IF sy-subrc EQ 0.
          LOOP AT i_output INTO wa_output.
            READ TABLE i_t001w INTO wa_t001w WITH KEY werks = wa_output-werks.
            READ TABLE i_t001k INTO wa_t001k WITH KEY bwkey = wa_t001w-bwkey.
            wa_output-bukrs = wa_t001k-bukrs.
            MODIFY i_output FROM wa_output.
            CLEAR wa_output.
          ENDLOOP.                         " LOOP AT i_output
        ENDIF.                             " IF sy-subrc EQ 0
    regards
    twinkal

  • How to check my job name from the database...

    I have written one job scheduler which is as follows :
    SQL> ED
    Wrote file afiedt.buf
    1 DECLARE
    2 X NUMBER;
    3 JobNumber NUMBER;
    4 BEGIN
    5 SYS.DBMS_JOB.SUBMIT
    6 (
    7 job => X
    8 ,what => 'scott.SPLITSMS;'
    9 ,next_date => SYSDATE+1/1440
    10 ,interval => 'SYSDATE+1/1440 '
    11 ,no_parse => FALSE
    12 );
    13 JobNumber := to_char(X);
    14* END;
    15 /
    PL/SQL procedure successfully completed.
    Now I want to check whether the job has been really created or not?
    so for that I have used the following command line:
    SQL> SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS';
    SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS'
    ERROR at line 1:
    ORA-00942: table or view does not exist
    how to check my job name from the database...
    what is the command used to check the job_name ????
    and how can i ensure that my job scheduler is running properly...???
    please help ........my dear friends.....!

    957029 wrote:
    Now I want to check whether the job has been really created or not?
    so for that I have used the following command line:
    SQL> SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS';
    SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS'
    ERROR at line 1:
    ORA-00942: table or view does not existYou can use DBA_* views only if the User has been Granted a DBA Privilege.
    how to check my job name from the database...
    what is the command used to check the job_name ????You can use USER_JOBS view to check. But, is it not that you have just created the Job, so you must be knowing it?
    and how can i ensure that my job scheduler is running properly...???If USER_JOBS.FAILURES is Non Zero, that means the Job has encountered a problem that needs to be Investigated. Similarly, the LAST_DATE, LAST_SEC, NEXT_DAY, NEXT_SEC can be used to determine if the Job has been running successfully.
    if you are on 11g, you should consider using DBMS_SCHEDULER.

  • How to execute a  .sql file from a batch file

    Hi all
    I've to take backup of a database weekly twice on every wednesday & Friday @ 5pm IST. I've written a hot backup script, which works every well.
    now i want to automate the script. ie i want this script to run on wednesday & friday @ 5pm without any human interfearance ie with out actually any1 executing this script.
    i created a batch file prod.bak with the following lines
    @echo off
    set oracle_sid=testdb
    set oracle_home=d:\oracle\ora92
    sqlplus /nolog
    connect sys as sysdba/oracletest@testdb
    this batch file when eexecuted connects me to sql prompt.
    Now i want to execute my backup script bkp.sql automatically when it is connected to sql prompt.
    (i tried with these lines in the above batch file...
    call bkp.sql---it just opens the bkp.sql file in notepad & displays the script
    start bkp.sql---same as call
    connect / as sysdba/pwd@[email protected] --- does not work simply remains a the sql prompt.
    At 17:00 /Every:w,f "d:\bkp.sql"---does not work simply remains at the sql promt.)
    Can any1 let me know what should i write in the batch file that will execute the bkp.sql file automatically after it gets connected to sql prompt. M using oracle 9i.
    I'll manage he time through windows utility of scheduling task.. Let me know how to execute the .sql file from a batch file.
    Thanks
    Tripti

    Try
    sqlplus "sys/oracletest as sysdba" @bpk.sql
    Working locally, and having set the ORACLE_SID, you don't need to specify the SqlNet alias (@testdb).
    Remember to put an exit at the end of the bpk.sql script.

  • How to turn a database status from "in recovery" to "online"?

    How to turn a database status from "in recovery" to "online"?
    We were trying to turn a datase to offline status using management studio - the operation was closed before it could reach the end.

    Hi Brian,
    Thanks for your feedback;
    I have completed the following actions to solve the issue:
    1. Start SQL Server in single user mode.
    2. Check database status: there i noticed that it was normal
    3. Restart SQL Server in multi-user mode
    4. Check database status: normal
    5. Check my data: ok
    Thank you again
    Lulu01
    You should have wait for an while or atleaset you need to check in the sql errorlog, what phases it is or if any issues persists that shows in the errorlog messages.
    also you would have been used sys.databases, to seewhat's the value for state_desc for your database.
    Thanks, Rama Udaya.K (http://rama38udaya.wordpress.com) ---------------------------------------- Please remember to mark the replies as answers if they help and UN-mark them if they provide no help,Vote if they gives you information.

  • PERFORMANCE PROBLEM - SYS OBJECTS

    Hi all,
    I'm having something strange here! The performance of queries that run against SYS objects like view DBA_OBJECTS , DBA_SEGMENTS, DBA_EXTENTS are VERY SLOWLY!! It's hang everytime and i need to kill the session and the PID process.
    One example is the following:
    SELECT owner, object_name, object_type FROM sys.all_objects
    WHERE object_type IN ('PACKAGE', 'PROCEDURE', 'SEQUENCE', 'TABLE', 'TYPE',
    'VIEW', 'FUNCTION') ORDER BY owner, object_name;
    The objects of schema SYS was analyzed recently.
    I have run the query with trace and nothing was found on that trace. The trace says the the query runs in few seconds but it didn't.
    Any help?
    Tks,
    Paulo Portugal

    Please take a look at the DBMS_XPLAN for the query to determine if there is a problem, and see if you are able to use DBA_OBJECTS rather than ALL_OBJECTS.
    For example, on one of my databases, querying ALL_OBJECTS:
    | Id  | Operation                                               | Name       | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    |*  1 |  TABLE ACCESS BY INDEX ROWID                            | SUM$       |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |*  2 |   INDEX UNIQUE SCAN                                     | I_SUM$_1   |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |   3 |  SORT ORDER BY                                          |            |      1 |    294 |   7329 |00:00:01.10 |     151K|   407K|   407K|  361K (0)|
    |*  4 |   FILTER                                                |            |      1 |        |   7329 |00:00:01.07 |     151K|       |       |          |
    |*  5 |    HASH JOIN                                            |            |      1 |  14668 |  14672 |00:00:00.09 |     196 |  1155K|  1155K| 1175K (0)|
    |   6 |     TABLE ACCESS FULL                                   | USER$      |      1 |    157 |    157 |00:00:00.01 |      15 |       |       |          |
    |*  7 |     TABLE ACCESS FULL                                   | OBJ$       |      1 |  14668 |  14672 |00:00:00.02 |     181 |       |       |          |
    |*  8 |    TABLE ACCESS BY INDEX ROWID                          | IND$       |   2575 |      1 |   2409 |00:00:00.04 |    5157 |       |       |          |
    |*  9 |     INDEX UNIQUE SCAN                                   | I_IND1     |   2575 |      1 |   2575 |00:00:00.02 |    2577 |       |       |          |
    |  10 |     NESTED LOOPS                                        |            |   9134 |     28 |   4291 |00:00:00.83 |     145K|       |       |          |
    |  11 |      FIXED TABLE FULL                                   | X$KZSRO    |   9134 |     26 |  68239 |00:00:00.13 |       0 |       |       |          |
    |* 12 |      INDEX RANGE SCAN                                   | I_OBJAUTH1 |  68239 |      1 |   4291 |00:00:00.55 |     145K|       |       |          |
    |* 13 |       FIXED TABLE FULL                                  | X$KZSPR    |      1 |     14 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 14 |        FIXED TABLE FULL                                 | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 15 |         FIXED TABLE FULL                                | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 16 |          FIXED TABLE FULL                               | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 17 |           FIXED TABLE FULL                              | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 18 |            FIXED TABLE FULL                             | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 19 |             FIXED TABLE FULL                            | X$KZSPR    |      1 |     11 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 20 |              FIXED TABLE FULL                           | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 21 |               FIXED TABLE FULL                          | X$KZSPR    |      0 |     14 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 22 |                FIXED TABLE FULL                         | X$KZSPR    |      1 |     11 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 23 |                 FIXED TABLE FULL                        | X$KZSPR    |      1 |     11 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 24 |                  FIXED TABLE FULL                       | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 25 |                   FIXED TABLE FULL                      | X$KZSPR    |      1 |      3 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 26 |                    FIXED TABLE FULL                     | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 27 |                     FIXED TABLE FULL                    | X$KZSPR    |      1 |     11 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 28 |                      FIXED TABLE FULL                   | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 29 |                       FIXED TABLE FULL                  | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 30 |                        FIXED TABLE FULL                 | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 31 |                         FIXED TABLE FULL                | X$KZSPR    |      0 |     14 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 32 |                          FIXED TABLE FULL               | X$KZSPR    |      0 |     11 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 33 |                           FIXED TABLE FULL              | X$KZSPR    |      0 |      6 |      0 |00:00:00.01 |       0 |       |       |          |
    |  34 |                            VIEW                         |            |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |  35 |                             FAST DUAL                   |            |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 36 |                              TABLE ACCESS BY INDEX ROWID| SUM$       |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 37 |                               INDEX UNIQUE SCAN         | I_SUM$_1   |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    Predicate Information (identified by operation id):
       1 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
       2 - access("S"."OBJ#"=:B1)
       4 - filter(((("O"."TYPE#"<>1 AND "O"."TYPE#"<>10) OR ("O"."TYPE#"=1 AND =1)) AND (INTERNAL_FUNCTION("O"."OWNER#") OR ("O"."TYPE#"<>11 AND
                  "O"."TYPE#"<>14 AND  IS NOT NULL) OR (INTERNAL_FUNCTION("O"."TYPE#") AND  IS NOT NULL) OR ("O"."TYPE#"=13 AND  IS NOT NULL) OR ("O"."TYPE#"=11 AND
                   IS NOT NULL) OR ("O"."TYPE#"=12 AND  IS NOT NULL) OR ("O"."TYPE#"=6 AND  IS NOT NULL) OR (INTERNAL_FUNCTION("O"."TYPE#") AND  IS NOT NULL) OR
                  ("O"."TYPE#"=22 AND  IS NOT NULL) OR ("O"."TYPE#"=14 AND  IS NOT NULL) OR INTERNAL_FUNCTION("O"."TYPE#") OR ("O"."TYPE#"=33 AND  IS NOT NULL) OR
                  ("O"."TYPE#"=46 AND  IS NOT NULL) OR ("O"."TYPE#"=62 AND  IS NOT NULL) OR ("O"."TYPE#"=66 AND  IS NOT NULL) OR ("O"."TYPE#"=48 AND  IS NOT NULL)
                  OR ("O"."TYPE#"=44 AND  IS NOT NULL) OR ("O"."TYPE#"=59 AND  IS NOT NULL) OR ("O"."TYPE#"=23 AND  IS NOT NULL) OR ("O"."TYPE#"=68 AND  IS NOT
                  NULL) OR (INTERNAL_FUNCTION("O"."TYPE#") AND  IS NOT NULL) OR ("O"."TYPE#"=42 AND  IS NOT NULL) OR ("O"."TYPE#"=32 AND  IS NOT NULL) OR
                  ("O"."TYPE#"=81 AND  IS NOT NULL) OR ("O"."TYPE#"=55 AND =1)) AND (DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA
                  SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER GROUP',55,'XML
                  SCHEMA',56,'JAVA DATA',57,'SECURITY PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='PACKAGE' OR DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA
                  SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER GROUP',55,'XML
                  SCHEMA',56,'JAVA DATA',57,'SECURITY PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='PROCEDURE' OR DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA
                  SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER GROUP',55,'XML
                  SCHEMA',56,'JAVA DATA',57,'SECURITY PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='SEQUENCE' OR DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA
                  SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT)
       5 - access("O"."OWNER#"="U"."USER#")
       7 - filter(("O"."NAME"<>'_NEXT_OBJECT' AND "O"."NAME"<>'_default_auditing_options_' AND "O"."LINKNAME" IS NULL))
       8 - filter(("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR "I"."TYPE#"=9))
       9 - access("I"."OBJ#"=:B1)
      12 - access("OBJ#"=:B1 AND "GRANTEE#"="KZSROROL")
           filter((INTERNAL_FUNCTION("PRIVILEGE#") AND "GRANTEE#"="KZSROROL"))
      13 - filter((((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50)) AND
                  "INST_ID"=USERENV('INSTANCE')))
      14 - filter((((-"KZSPRPRV")=(-184) OR (-"KZSPRPRV")=(-181)) AND "INST_ID"=USERENV('INSTANCE')))
      15 - filter(((-"KZSPRPRV")=(-141) AND "INST_ID"=USERENV('INSTANCE')))
      16 - filter(((-"KZSPRPRV")=(-152) AND "INST_ID"=USERENV('INSTANCE')))
      17 - filter(((-"KZSPRPRV")=(-109) AND "INST_ID"=USERENV('INSTANCE')))
      18 - filter((((-"KZSPRPRV")=(-144) OR (-"KZSPRPRV")=(-141)) AND "INST_ID"=USERENV('INSTANCE')))
      19 - filter((((-"KZSPRPRV")=(-189) OR (-"KZSPRPRV")=(-190) OR (-"KZSPRPRV")=(-191) OR (-"KZSPRPRV")=(-192)) AND "INST_ID"=USERENV('INSTANCE')))
      20 - filter(((-"KZSPRPRV")=(-181) AND "INST_ID"=USERENV('INSTANCE')))
      21 - filter((((-"KZSPRPRV")=(-200) OR (-"KZSPRPRV")=(-201) OR (-"KZSPRPRV")=(-202) OR (-"KZSPRPRV")=(-203) OR (-"KZSPRPRV")=(-204)) AND
                  "INST_ID"=USERENV('INSTANCE')))
      22 - filter((((-"KZSPRPRV")=(-251) OR (-"KZSPRPRV")=(-252) OR (-"KZSPRPRV")=(-253) OR (-"KZSPRPRV")=(-254)) AND "INST_ID"=USERENV('INSTANCE')))
      23 - filter((((-"KZSPRPRV")=(-246) OR (-"KZSPRPRV")=(-247) OR (-"KZSPRPRV")=(-248) OR (-"KZSPRPRV")=(-249)) AND "INST_ID"=USERENV('INSTANCE')))
      24 - filter(((-"KZSPRPRV")=(-265) AND "INST_ID"=USERENV('INSTANCE')))
      25 - filter(((-"KZSPRPRV")=12 AND "INST_ID"=USERENV('INSTANCE')))
      26 - filter((((-"KZSPRPRV")=(-222) OR (-"KZSPRPRV")=(-223)) AND "INST_ID"=USERENV('INSTANCE')))
      27 - filter((((-"KZSPRPRV")=(-258) OR (-"KZSPRPRV")=(-259) OR (-"KZSPRPRV")=(-260) OR (-"KZSPRPRV")=(-261)) AND "INST_ID"=USERENV('INSTANCE')))
      28 - filter((((-"KZSPRPRV")=(-177) OR (-"KZSPRPRV")=(-178)) AND "INST_ID"=USERENV('INSTANCE')))
      29 - filter((((-"KZSPRPRV")=(-268) OR (-"KZSPRPRV")=(-267)) AND "INST_ID"=USERENV('INSTANCE')))
      30 - filter((((-"KZSPRPRV")=(-265) OR (-"KZSPRPRV")=(-266)) AND "INST_ID"=USERENV('INSTANCE')))
      31 - filter((((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50)) AND
                  "INST_ID"=USERENV('INSTANCE')))
      32 - filter((((-"KZSPRPRV")=(-205) OR (-"KZSPRPRV")=(-206) OR (-"KZSPRPRV")=(-207) OR (-"KZSPRPRV")=(-208)) AND "INST_ID"=USERENV('INSTANCE')))
      33 - filter((((-"KZSPRPRV")=(-277) OR (-"KZSPRPRV")=(-278)) AND "INST_ID"=USERENV('INSTANCE')))
      36 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
      37 - access("S"."OBJ#"=:B1)Querying DBA_OBJECTS produces a much more compact plan that executes faster:
    | Id  | Operation                        | Name        | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    |   1 |  SORT ORDER BY                   |             |      1 |    814 |   7329 |00:00:00.24 |    5353 |   407K|   407K|  361K (0)|
    |   2 |   VIEW                           | DBA_OBJECTS |      1 |    814 |   7329 |00:00:00.21 |    5353 |       |       |          |
    |   3 |    UNION-ALL                     |             |      1 |        |   7329 |00:00:00.21 |    5353 |       |       |          |
    |*  4 |     FILTER                       |             |      1 |        |   7329 |00:00:00.19 |    5353 |       |       |          |
    |*  5 |      HASH JOIN                   |             |      1 |  14668 |  14672 |00:00:00.09 |     196 |  1155K|  1155K| 1209K (0)|
    |   6 |       TABLE ACCESS FULL          | USER$       |      1 |    157 |    157 |00:00:00.01 |      15 |       |       |          |
    |*  7 |       TABLE ACCESS FULL          | OBJ$        |      1 |  14668 |  14672 |00:00:00.03 |     181 |       |       |          |
    |*  8 |      TABLE ACCESS BY INDEX ROWID | IND$        |   2575 |      1 |   2409 |00:00:00.04 |    5157 |       |       |          |
    |*  9 |       INDEX UNIQUE SCAN          | I_IND1      |   2575 |      1 |   2575 |00:00:00.02 |    2577 |       |       |          |
    |* 10 |       TABLE ACCESS BY INDEX ROWID| SUM$        |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 11 |        INDEX UNIQUE SCAN         | I_SUM$_1    |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 12 |     FILTER                       |             |      1 |        |      0 |00:00:00.01 |       0 |       |       |          |
    |  13 |      NESTED LOOPS                |             |      0 |      5 |      0 |00:00:00.01 |       0 |       |       |          |
    |  14 |       INDEX FULL SCAN            | I_LINK1     |      0 |      5 |      0 |00:00:00.01 |       0 |       |       |          |
    |  15 |       TABLE ACCESS CLUSTER       | USER$       |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 16 |        INDEX UNIQUE SCAN         | I_USER#     |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    Predicate Information (identified by operation id):
       4 - filter(((("O"."TYPE#"<>1 AND "O"."TYPE#"<>10) OR ("O"."TYPE#"=1 AND =1)) AND (DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER
                  GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'SECURITY
                  PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='PACKAGE' OR
                  DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTIO
                  N',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER
                  GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'SECURITY
                  PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='PROCEDURE' OR
                  DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTIO
                  N',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER
                  GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'SECURITY
                  PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='SEQUENCE' OR
                  DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTIO
                  N',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER
                  GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'SECURITY
                  PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='TABLE' OR
                  DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTIO
                  N',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSU)
       5 - access("O"."OWNER#"="U"."USER#")
       7 - filter(("O"."NAME"<>'_NEXT_OBJECT' AND "O"."NAME"<>'_default_auditing_options_' AND "O"."LINKNAME" IS NULL))
       8 - filter(("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR
                  "I"."TYPE#"=9))
       9 - access("I"."OBJ#"=:B1)
      10 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
      11 - access("S"."OBJ#"=:B1)
      12 - filter('DATABASE LINK'='FUNCTION')
      16 - access("L"."OWNER#"="U"."USER#")Example of using DBMS_XPLAN to retrieve actual timing:
    http://jonathanlewis.wordpress.com/2006/11/09/dbms_xplan-in-10g/
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • TS4006 how do I locate my iphone from my mac.

    I went throught the steps to set up the find my iphone app and have activated the my mac icon from the sys pref in iclound. Now how do I use the app from my mac? Funny thing is I can send a ping to find my computer just dont know how to use my mac to find my phone.Thanks

    You need to log into your iCloud account online and go to the Find My iPhone section.
    OT

  • How to join GRPO with AP invoice thru query ?

    hi all,
    How to join GRPO with AP invoice in sql query ?
    Jeyakanthan

    Hi Jeyakanthan
    Are you using query in SAP Business One or outside the system? If you select the tables in SAP Business One as OPCH and OPDN then no inner join will appear, as the links sit on the line level. You will need PCH1 and PDN1. The link can be found in both directions, but bear in mind that 1 AP Invoice could be based on more than 1 Goods Receipt PO. For this reason the best approach is to start at the AP Invoice line level and use the BaseType and BaseRef fields to view which lines were pulled from which Goods Receipt PO's.
    Kind regards
    Peter Juby

  • How can I remove ASCII text from a field when I use it in a query

    How can I remove ASCII text from a field when I use it in a query?
    I am running a select statement on a table that appears to have ASCII text in some of the fields. If I use these fields in the where statement like the code below nothing returns:
    SELECT FIELD1 FROM TABLE1 WHERE FIELD1 IS NULL
    But the field looks empty if I do a straight select without the where clause. Additionally, one of the fields has text but appears to be padded out with ASCII text, which I need to strip out before I can use this field in a where or join statement. I have tried using a trim, ltrim, rtrim, to_char, nvl, decode and nothing works. When I use excel to run the same query it looks as if these ASCII fields are boxes.
    I have asked our DBA team to see what they can do to prevent these from going into the table, but in the mean time I still need to run this report.
    Do you have any suggestions?

    Can you provide an example? I've been trying (for
    example) "select translate(' test one', ascii(' '),
    'X') from dual" with no luck.
    Thank you.To replace space, you should query like this:
    select translate(' test one', chr(32), 'X') from dual instead of select translate(' test one', ascii(' '), 'X') from dual Thanks,
    Dharmesh Patel

  • How can I move a calendar from my mac to the i Cloud

    how can I move a calendar from my mac to the i Cloud.  It is an existing calendar that I publish for others to view.  It does not update through the cloud since it is not curently on the cloud.  I cannot figure out how to move it on to the cloud.

    Your signature says you have Leopard 10.5.8 - is this correct? (If it isn't please amend it). Leopard cannot access iCloud: Lion 10.7.2 is required. Have you actually opened an iCloud account (or migrated from MobileMe)?
    if you do have Lion and have joined iCloud then your calendars should have been migrated to iCloud automatically. If this hasn't happened then the method for moving them is described in the first set of numbered instructions on this page - I emphasize that this is only possible on Lion.

Maybe you are looking for

  • Format Trigger on Frames - SQL in data model

    I am working on a report that gets data from huge tables that could possibly have millions of records. I have about four different queries in my data model. Each of the queries is attributed to a Frame in my layout model. However depending on the inp

  • Distorted video

    Hi, I'm new to videocams and related software, so please be patient with me! I have just bought a sony HDR-HC3 videocam and decided to use FCE HD 3.5. When I capture the video and using the easy setup 1080i50 which the videocam supports, I notice tha

  • Write as asa one insert

    Hi, Need help to write a insert statement instead of insert and update same table. 1) this is my insert statement INSERT INTO SS_ITEM_STAT_OPN(         REP_ID, ITEM_ID, REPORT_COLUMN_DISPLAY, REPORT_COLUMN_SEQ_NO, BEGIN_VALUE, END_VALUE)         SELE

  • CSS layout, is the code done well?

    I'm thinking of using this PHP CMS for a client site. It's totally customizable, but since I'm not too big on CSS positioning, I wondered what some of you CSS layout enthusiasts think about their code. http://208.106.156.20/ Thanks in advance, Patty

  • Newbie's new next snag

    I'm doing the "first website" tutorial on Adobe for DW cs5. I'm on lesson 5 working on the Spry Widget. Yesterday, I could not get the widget to position itself properly on the page according to the directions.  I have determined that it is 16px high