How can I find out which table/tables are behind a view?

I tried following with scott/tiger:
SQL> select text from all_views where view_name = 'TAB';
TEXT
select o.name,
decode(o.type#, 2, 'TABLE', 3, 'CLUSTER',
4,
The text after "4," is not displayed in SQL*Plus-Editor. The attribut TEXT with datatype long is not displayed fully on the screen. How can I correct it? Thank You!

"set long 8000" before you run the query I tried it. Thank You for this correct and fast answer!

Similar Messages

  • How can I find out which tables are having DDL locks?

    I can see related information by querying DBA_DDL_LOCKS view, but it doesn't give me the information which tables are having DDL locks.
    Is there a way I can find out which tables are having DDL locks?
    Thanks!

    Here's a long script written back in 2001. Still works:
    BREAK on sid on serial# on username
    COL sid        for 9999
    COL serial#    for 99999
    COL username   for a20
    COL type       for a20    trunc
    COL lmode      for a5     trunc
    COL lrequest   for a4     trunc
    COL detail     for a75    trunc
    SELECT   s.sid
           , s.serial#
           , s.username
           , DECODE(
                  l.TYPE
                -- Long locks
                , 'TM', 'dml/data enq (TM)'
                , 'TX', 'transac enq (TX) '
                , 'UL', 'pls usr lock (UL)'
                -- Short locks
                , 'BL', 'buf hash tbl (BL)'
                , 'CF', 'control file (CF)'
                , 'CI', 'cross inst f (CI)'
                , 'CU', 'cursor bind (CU) '
                , 'DF', 'data file (CF)   '
                , 'DL', 'direct load (DL) '
                , 'DM', 'mount/strtup (DM)'
                , 'DR', 'reco lock (DR)   '
                , 'DX', 'distrib tran (DX)'
                , 'FI', 'sga opn file (FI)'
                , 'FS', 'file set (FS)    '
                , 'IN', 'instance num (IN)'
                , 'IR', 'instce recvr (IR)'
                , 'IS', 'get state (IS)   '
                , 'IV', 'libcache inv (IV)'
                , 'JQ', 'job queue (JQ)   '
                , 'KK', 'log sw kick (KK) '
                , 'LS', 'log switch (LS)  '
                , 'MM', 'mount def (MM)   '
                , 'MR', 'media recvry (MR)'
                , 'PF', 'pwfile enq (PF)  '
                , 'PR', 'process strt (PR)'
                , 'RW', 'row wait (RW)    '
                , 'RT', 'redo thread (RT) '
                , 'SC', 'scn enq (SC)     '
                , 'SM', 'smon lock (SM)   '
                , 'SN', 'seqno instce (SN)'
                , 'SQ', 'seqno enq (SQ)   '
                , 'ST', 'space transc (ST)'
                , 'SV', 'seqno value (SV) '
                , 'TA', 'generic enq (TA) '
                , 'TD', 'dll enq (TD)     '
                , 'TE', 'extend seg (TE)  '
                , 'TS', 'temp segment (TS)'
                , 'TT', 'temp table (TT)  '
                , 'UN', 'user name (UN)   '
                , 'WL', 'write redo (WL)  '
                , 'TYPE = ' || l.TYPE) AS type
           , DECODE(l.lmode, 0, 'none', 1, 'null', 2, 'RS', 3, 'RX', 4, 'S', 5, 'SRX', 6, 'X', TO_CHAR(l.lmode)) A
    S lmode
           , DECODE(l.request, 0, 'none', 1, 'null', 2, 'RS', 3, 'RX', 4, 'S', 5, 'SRX', 6, 'X', TO_CHAR(l.request
    )) AS lrequest
           , DECODE(
                  l.TYPE
                , 'JQ', 'Job #' || j.job || ' (' || j.what || ') owned by: ' || j.username
                , 'MR', DECODE(s.user_type, 'BG', 'DICTIONARY OBJECT', LOWER(obj.owner) || '.' || LOWER(obj.name))
    || ' (' || LOWER(obj.TYPE) || ')'
                , 'RT', 'thread #' || LOWER(l.id1)
                , 'RW', 'file#' || LOWER(SUBSTR(l.id1, 1, 3)) || ', block#' || LOWER(SUBSTR(l.id1, 4, 5)) || ', ro
    w#' || LOWER(l.id2)
                , 'TD', 'object: ' || LOWER(obj.owner) || '.' || LOWER(obj.name) || ' (' || LOWER(obj.TYPE) || ')'
                , 'TM', 'object: ' || LOWER(obj.owner) || '.' || LOWER(obj.name) || ' (' || LOWER(obj.TYPE) || ')'
                , 'TS', DECODE(l.id2, 0, 'enqueue', 'new block allocation')
                , 'TX', DECODE(
                             lo.object_name
                           , NULL, 'rbs #' || TRUNC(l.id1 / 65536) || ', slot #' || LOWER(l.id1)
                           , 'rbs #' || TRUNC(l.id1 / 65536) || ', slot #' || LOWER(l.id1) || ', object: ' || LOWE
    R(lo.object_name))
                , 'UL', 'lock name: ' || la.name || ', expiration date: ' || TO_CHAR(la.expiration, 'DD-MON-RR HH2
    4:MI:SS')
                , 'WL', 'redo log file#' || LOWER(l.id1)
                , 'id1 = ' || l.id1 || ', id2 = ' || l.id2) AS detail
        FROM sys.v_$lock l
           , (SELECT a.sid
                   , a.serial#
                   , NVL(a.username, 'SYS (' || LOWER(b.name) || ')') AS username
                   , DECODE(a.username, NULL, 'BG', 'USER') AS user_type
                FROM sys.v_$session a
                   , sys.v_$bgprocess b
               WHERE a.paddr = b.paddr(+)) s
           , (SELECT o.obj#
                   , u.name AS owner
                   , o.name
                   , 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'
                        , 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'
                        , 39, 'LOB PARTITION'
                        , 40, 'LOB SUBPARTITION'
                        , 43, 'DIMENSION'
                        , 44, 'CONTEXT'
                        , 47, 'RESOURCE PLAN'
                        , 48, 'CONSUMER GROUP'
                        , 51, 'SUBSCRIPTION'
                        , 52, 'LOCATION'
                        , 'UNDEFINED') AS type
                FROM sys.obj$ o
                   , sys.user$ u
               WHERE o.owner# = u.user#) obj
           , (SELECT vlo.xidusn
                   , vlo.xidslot
                   , vlo.xidsqn
                   , vlo.process
                   , o.owner || '.' || o.object_name AS object_name
                FROM sys.v_$locked_object vlo
                   , sys.dba_objects o
               WHERE vlo.object_id = o.object_id) lo
           , (SELECT job
                   , schema_user AS username
                   , what
                FROM dba_jobs) j
           , sys.dbms_lock_allocated la
       WHERE l.sid = s.sid
         AND l.id1 = obj.obj#(+)
         AND l.id2 = j.job(+)
         AND TRUNC(l.id1 / 65536) = lo.xidusn(+)
         AND LOWER(l.id1) = lo.xidslot(+)
         AND l.id2 = lo.xidsqn(+)
         AND l.id1 = la.lockid(+)
         AND l.TYPE != 'MR'
    UNION ALL
                      /*** LATCH HOLDERS ***/
    SELECT   s.sid
           , s.serial#
           , s.username
           , 'latch'
           , 'X'
           , 'none'
           , h.name || ' addr=' || LOWER(RAWTOHEX(laddr)) AS object
        FROM sys.v_$process p
           , sys.v_$session s
           , sys.v_$latchholder h
       WHERE h.pid = p.pid
         AND p.addr = s.paddr
    UNION ALL
                      /*** LATCH WAITERS ***/
    SELECT   s.sid
           , s.serial#
           , s.username
           , 'latch'
           , 'none'
           , 'X'
           , name || ' latch=' || p.latchwait AS object
        FROM sys.v_$session s
           , sys.v_$process p
           , sys.v_$latch l
       WHERE latchwait IS NOT NULL
         AND p.addr = s.paddr
         AND p.latchwait = l.addr
    ORDER BY sid
           , serial#
           , username
           , 4
           , 5
           , 6
           , 7;

  • How can I find out whitch table are used in whitch document?

    How can I find out whitch table are used in whitch document?
    In the table EUL5_DOCUMENTS are stored the Documents and in the table EUL5_OBJS are stored the tables. How can I query these tables together?
    Are there other possiblities?
    Thanks

    Hi Dierk
    Please take a look at this thread: Re: An EUL query to list out All the Columns  (Fileds) for each Workbook
    I think you may well find what you are looking for in the answer that I gave there.
    Best wishes
    Michael

  • How can I find out which vi's are dynamic?

    I am working on a project made up of hundreds of VIs. I have to make an standalone executable version of it. I was not the original developer. Is there a way I can scan the vi's to find out which of them are dynamic? What should I be looking for as a telltale sign of being dynamic (What makes a vi dynamic?)
    Are all vit's dynamic? (I was told by my senior developer to include all vit's in the dynamic section of the build dialog box.)
    Message Edited by rashid19672008 on 02-27-2008 03:25 PM

    This is not a property of a VI, but rather a way of using it. You can call any VI either way (or both ways), so whether a VI is called dynamically depends on your code.
    One way of finding whether a VI does not have static calls is to open all the VIs in the hierarchy at the same time and then go over each of them in a loop, open a reference to it and check its "Callers" property. If the array is empty, it means that this VI is not called by any other VI currently in memory and might be called dynamically. It might also mean that it is an old VI and is not used any more.
    Another option is to create a copy of the hierarchy using File>>Save With Options. LabVIEW will only copy the VIs which are called statically and you can then compare the hierarchies for files which are only found in the original.
    Try to take over the world!

  • How can i find out which apple ids are associated with my ipad

    When I sync my iPad I get the message that some songs cannot be updated because only 5 Apple IDs can be associated with an iPad. I am aware of three that we use in my family - mine and my two sons. How can I find out what other Apple IDs are associated with my iPad?

    Itunes limit includes computers. 
    http://www.ilounge.com/index.php/articles/comments/managing-devices-in-your-itun es-store-account/

  • How can I find out which portal users are logged in portal?

    Hi
    I need to know where can i find information about which portal
    users are currently logged in to portal. Are there any api or
    built-in functions which will help me find out this information?
    Thank you for your immediate help!!

    I too would like to find out which users are loggeg on. We need
    to restrict users to one login or session if possible.
    Thanks,
    Tom Henricksen

  • How can i find out the table hierarchy

    Hi experts,
    I have one doubt. how can i find out the table hierarchy in the particular schema.
    Let me explain my requirement in detail.. In my Database i have nearly 250 table each table have it's own temporary table(for authorization purpose we are maintaining the temporary tables) for each day i have to clear the temporary table data.
    All temporary table connected with each other. i mean all the table having foreign key relationship.. while i attempt the delete the data from the temporary table it showed ORA-02292: integrity constraint  violated - child record found.
    So can any one please tell how can i delete the child table record first and then parent record table record.
    Thanks in advance
    Arun

    CREATE OR REPLACE FUNCTION get_child_tables (
    ptable VARCHAR2,
    powner VARCHAR2 DEFAULT 'SCOTT',
    plevel NUMBER DEFAULT 10
    RETURN stringarray
    -- -- create this ON SQL*PLUS "CREATE OR REPLACE TYPE STRINGARRAY AS TABLE OF VARCHAR2(50);"
    -- AUTHID CURRENT_USER
    PIPELINED
    AUTHOR DATE VERSION COMMENTS
    ======================================================================================
    [email protected] 26-OCT-2009 1.0 Developed to ease developers effort to find Nth level of Referential integrity
    ======================================================================================
    -- PURPOSE -> To find PARENT=> CHILD relational TABLE(S) in Oracle upto a depth max N Level.
    --SYNTAX TO USE
    SELECT * FROM TABLE( get_child_tables('DEPT','SCOTT',3)); Store this query in a file for your use
    SELECT * FROM TABLE( get_child_tables('EMPLOYEE')); Store this query in a file for your use
    -- RESULTS looks as below
    --1 => DEPT
    --2 => EMP
    --2 => EMP2
    --3 => EMP_CHILD
    --3 => EMP2_CHILD
    -- and so on
    --This can be leveraged to use in any oracle database REGION 10g having and above.
    --This FUNCTION gives formatted result of the Oracle 10g Hierarchical query result coded in the cursor
    --to find MASTER => CHILD relational TABLE(S) upto a depth max 10 Level.
    --The result of the PIPELINED function can be retrieved using Oracle new operator
    --TABLE(array name) in SQL query.
    --Due to the AUTHID CURRENT_USER compiler directive any user can use based on his/her access privileges on the database.
    --GRANT EXECUTE ON SCOTT.get_child_tables TO PUBLIC;
    --CREATE OR REPLACE PUBLIC SYNONYM get_child_tables FOR SCOTT.get_child_tables;
    IS
    atname stringarray := stringarray ();
    -- create this ON SQL*PLUS CREATE OR REPLACE TYPE STRINGARRAY AS TABLE OF VARCHAR2(50);
    vlevel NUMBER;
    vtname VARCHAR2 (50);
    nindex NUMBER := 0;
    bprocessed BOOLEAN := FALSE;
    CURSOR c1 (powner_in IN VARCHAR2, ptable_in VARCHAR2, plevel_in NUMBER)
    IS
    SELECT LEVEL, LPAD (' ', (LEVEL - 1) * 2, ' ') || pt AS "TNAME"
    FROM (SELECT a.owner w1, a.table_name pt, a.constraint_name c1,
    a.r_constraint_name r1, b.owner w2, b.table_name ct,
    b.constraint_name c2, b.r_constraint_name r2
    FROM all_constraints a, all_constraints b
    WHERE a.constraint_name = b.r_constraint_name(+)
    AND a.owner = b.owner(+)
    AND a.owner =
    UPPER (powner)
    -- Change Owner here while testing
    --AND A.r_constraint_name IS NULL
    AND a.constraint_type IN ('P', 'R')) v1
    START WITH pt =
    UPPER
    (ptable)
    -- Change your master table here while testing the QUERY
    CONNECT BY PRIOR ct = pt AND LEVEL <= plevel;
    -- Change lavel here while testing
    BEGIN
    atname.EXTEND;
    atname (1) := 'NOTHING';
    OPEN c1 (powner, ptable, plevel);
    LOOP
    bprocessed := FALSE;
    FETCH c1
    INTO vlevel, vtname;
    IF nindex > 1 AND atname (atname.LAST - 1) = vtname
    THEN
    --DBMS_OUTPUT.PUT_LINE('2 ==== vtname  ' ||vtname || '   '|| atname.count|| '   '||atname.last ||  '   '||atname( atname.last-1));
    bprocessed := TRUE;
    END IF;
    IF NOT bprocessed
    THEN
    nindex := nindex + 1;
    atname.EXTEND;
    atname (nindex) := vtname;
    PIPE ROW (vlevel || ' => ' || vtname);
    DBMS_OUTPUT.put_line ( ' **** nindex - atname( nindex) '
    || nindex
    || ' - '
    || atname (nindex)
    DLOG('ADDING ',vTname); A LOGGING ATONOMUS PROCEDURE FOR DEBUG PURPOSE
    END IF;
    EXIT WHEN c1%NOTFOUND;
    END LOOP;
    CLOSE c1;
    FOR i IN 1 .. atname.COUNT
    LOOP
    DBMS_OUTPUT.PUT_LINE('atname (i) ' ||atname (i));
    END LOOP;
    RETURN;
    EXCEPTION
    WHEN no_data_needed
    THEN -- THIS EXCEPTION HAS TO BE THERE TO GET THE FUCTION WORKABLE
    DBMS_OUTPUT.put_line (SQLERRM);
    RETURN;
    --SELECT * FROM TABLE( get_child_tables('TB_XOP_LETR_TEMPLATE','OPS$CMS',5));
    END get_child_tables;
    Edited by: user3066657 on Jul 21, 2011 8:42 AM
    Edited by: user3066657 on Jul 21, 2011 11:26 AM

  • How can I know in which Tables are the fields stored

    Hi,
    In transaction FSE3 Display Financial Version
    Statement Version, if I drilldown in details, I can
    see Item No, Chart of Acc, From Accountm To Account D,
    C.
    when I do a F1 on the fields, I can see that it is a
    structure. How can I know in which Tables are the
    fields store?

    Hi Ankit,
    There are no rules or guidelines for finding the table but i will share some of the tips used generally.........but i am not sure if we can do it for a tree structure..but try anyways....
    Double click on the structure name seen on the F1 pop up window...
    in the structure screen, try to analyse the field which is very important something like a key in that set of fields or do the same for the fields which we feel are more important,then click on the domain for that field....once in the domain..click on the "where used list for the domain" on the top...
    it will display a pop up -> select only "table" and then press "Tick/OK"..A list will be displayed with the data element and table name ..from this we need to find out the right one we need either by going for text of the table or going through each and every one
    It takes time but does the job.....
    Regards
    Byju

  • I want to update my phone, but i purchased many apps and music on the phone. it won't let me authorize my computer so i cannot update. i don't want to deauthorize all my computers. how can i find out which 5 computers i have authorized?

    i want to update my phone, but i purchased many apps and music on the phone. it won't let me authorize my computer so i cannot update. i don't want to deauthorize all my computers. how can i find out which 5 computers i have authorized? also how can i update the software?

    This is a tedious solution, which is stupid!  And some users report an inability to reauthorize a computer after an "en masse” deauthorization.  I can’t believe Apple doesn’t provide a list or menu to find out which computers you’ve authorized! Obviously, APPLE knows (or else they couldn’t tell us how many computers we have authorized)--so why can’t they give us access to that information about our own computers??!!!
    And for an already-authorized computer with a hard drive that’s since been replaced and upgraded from Mavericks to Yosemite, would it be recognized as a “new computer” and require authorization? Would its previous incarnation (i.e., with the old hard drive and OS) be considered a separate computer? Some users report they can’t authorize a computer after an OS upgrade because of that. Can’t believe we have to do such a bass-ackwards kludge!

  • I share an itunes account with 3 users. How can I find out which person downloaded a certain app?

    I share an itunes account with 3 users. How can I find out which person downloaded a certain app?

    Agile,
    Any of the above will work, depending how you would like to set it up.
    Given that kids tend to eventually grow up and be independent, the best long term answer for most people is to let her have her own account and her own library as soon as she can handle it.  Keep in mind that content purchased from the iTunes Store is permanently tied to the account from which it was originally purchased, so separating later is a challenge.
    If you want to sync multiple devices to the same library, that will work.  Or if you want separate libraries (as I would recommend), they can be either on separate computers or on separate Windows user accounts on the same PC.
    For the name change:  Connect the device.  When the name appears in the left sidebar of iTunes, highlight it and change it.

  • How can I find out which .pst or .ost file itunes referres to when synchronising with outlook

    I´ve switched to iphone 4S from my 3Gs and would like to "clean" my itunes Sync before I use the new phone. Problem is, that the synchronisation with Outlook 2003 doesn´t work anymore. I guess the reason is that itunes refers to an old .ost or .pst file on my computer. I ve got several outlook profiles and changed from exchange to pop3. My question: How can I find out which .pst or .ost file itunes referres to?
    Thanks a lot in advance :-)

    Select the tune and then - Get Info - in the dialog box is a note of the Apple ID used to purchase.
    MJ

  • I have my personal music (not purchased from Itunes) stored in two locations, on my PC and on an external HD. How can I find out which directory itunes uses to access this music? I am using Itunes version 11.4.0.18. Thanks

    I have my personal music (not purchased from Itunes) stored in two locations, on my PC and on an external HD. How can I find out which directory itunes uses to access this music? I am using Itunes version 11.4.0.18. Thanks

    Many thanks JEM24 for your help.  Ive just spent the best part of six hundred pounds on a new Sony Rx100m2 compact camera, so I have no interest in the Ipods camera at all really. I doubt Ill be watching many videos on it as Im very lucky in that I have a good Android tablet. Its more as a stock music player that Ill be buying the Ipod for, if indeed I do end up buying one. I dont like the idea of paying the exorbitant amount added for more memory space that Apple along with most other companies charge. In fact I read an article on this very subject just yesterday in the tech section of Flipboard. It stated in the article that in the case of the Iphone  the actual cost of each additional  gigabyte of storage  to Apple et al is something in the order of 60p.. This is certainly not reflected in the price us the customer has to pay at the till.. Its for this reason primarily that Apple in particular, because their products do not allow adding expandable memory of your own in the form of cheap to buy cards, that nobody in their right mind buys the 64gig etc Iphones..I am aware that we are discussing my potential purchase of an Ipod Touch here but you see my point. Many thanks again though for helping me.

  • How can i find out which network my iphone is locked to

    Sorry if iv posted this in the wrong section.well the question is quite simple. how can i find out which network my iphone 4s is locked to, without purchasing sim cards from every network.
    I just bought the phone second hand with no sim as a birthday present for my wife with the intention of getting it unlocked (not jailbroken)
    If any body can give me any advice it would be greatly appreciated.

    call Apple

  • HT1338 HOW CAN I FIND OUT WHICH SERVER MY MAC IS USING?

    HOW CAN I FIND OUT WHICH SERVER MY MAC IS USING, KEEP GETTING MICROSOFT SQL SERVER ERRORS
    WHEN TYPING IN ADDRESS'S?

    If your computer is tied to a network, then there is a way to check. Go to System Preferences, and click Accounts. unlock Admin
    then you can click Login Options.
    under that, Network Account Server. This should show you what server your computer is tied to. If you aren't in the tech department, you could try asking them.

  • My Library has ten more songs than my iPod. How can I find out which songs are not syncing?

    My Library has ten more songs than my iPod. How can I find out which songs are not syncing?
    I recently had to purchase a new hard drive. Because the size of my music collection exceeds 140 GB, I stored all of my music on a separate external hard drive. When I exported everything back into my new iTunes library, I found that I had about 200 more songs than I had in the previous library. After deleting most of those extraneous songs, I was able to get my library close to where it was before. However, after syncing to my iPod Classic, I noticed that only 34,853 of the 34,863 loaded. How can I figure out which of those ten songs in my library did not sync to my iPod?
    Yellow12

    It may be that the 10 songs are unchecked. To find them select songs view.
    If there is a column Heading marked with a tick then click on it to sort by this column.
    If the Column is not there then View > View Options and select the Checked column which will then display
    Check the songs by putting ticks in the empty boxes and resynch. Now those tracks should go over as well

Maybe you are looking for

  • Dynamic query with Data Access Layer

    I have a program that has a multiselect box (JSP form) to select certifications and then search to see which employee may have them. I have no issues when searching by only one, but if I select multiple certifications from the multiselect box, it doe

  • Create generic HTTPService class

    I am trying to create a generic HTTPService class. I am using this code as my starting point: import mx.controls.Alert; import mx.rpc.http.HTTPService; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private var service:HTTPService

  • SAP EHP Update for Large Database

    Dear Experts, We are planning for the SAP EHP7 update for our system. Please find the system details below Source system: SAP ERP6.0 OS: AIX DB: Oracle 11.2.0.3 Target System: SAP ERP6.0 EHP7 OS: AIX DB: 11.2.0.3 RAM: 32 GB The main concern over here

  • [Solved] pacman see's a tarball that I installed without pacman??

    Okay, before the "you need to use pacman for that" comments begin, I've aparently been doing things the hard way.  I finally read up on the ABS.  Been putting it off because I thought it was only for making new packages to add to the database.  If it

  • Flash won't finish the whole animation

    Okay so I obviously searched the whole internet tryingto find an answer but didn't stumble across one so her is my question. In Flash Pro CS5, everythime I watch a preview of the flash below, it shows the whole thing. But when I publish it/export, it