How to find out master tables and concern child tables

Hi,
my schema contains 219 tables. I got this result by using query "selct count(*) from user_tables".
Now i need to know about master tables and concern child tables from these 219 tables.
please guide me.
Thanks and Regards,
Venkat

What about this one!!!
select a.owner,a.table_name,a.column_name,
     '------------------>' as POINTS_TO,b.owner,b.table_name,b.column_name
from dba_constraints c
     join dba_cons_columns a on ( c.constraint_name = a.constraint_name and c.owner = a.owner)
     join dba_cons_columns b on ( c.r_constraint_name = b.constraint_name and c.r_owner = b.owner)
where  (a.table_name = '&table' and (a.owner='&owner'))  -- foreign key
--     and (b.table_name = '&table' and (b.owner='&owner') )  -- source key
     and ( c.constraint_type='R' )
order by a.table_namecomment and uncomment one between theese two lines to choose the direction.
     (a.table_name = '&table' and (a.owner='&owner'))  -- foreign key
--     and (b.table_name = '&table' and (b.owner='&owner') )  -- source keyBye Alessandro
Edited by: Alessandro Rossi on 22-ott-2008 10.40

Similar Messages

  • How to find out when data was deleted from table in oracle and Who deleted that

    HI Experts,
    Help me for below query:
    how to find out when data was deleted from table in oracle and Who deleted that ?
    I did that to fidn out some data from dba_tab_modifications, but I m not sure that what timestamp shows, wether it shows for update,insert or delete time ?
    SQL> select TABLE_OWNER,TABLE_NAME,INSERTS,UPDATES,DELETES,TIMESTAMP,DROP_SEGMENTS,TRUNCATED from dba_tab_modifications where TABLE_NAME='F9001';
    TABLE_OWNER                    TABLE_NAME                        INSERTS    UPDATES    DELETES     TIMESTAMP         DROP_SEGMENTS TRU
    PRODCTL                        F9001                                                     1683         46       2171            11-12-13 18:23:39             0                   NO
    Audit is enable in my enviroment?
    customer is facing the issue and data missing in the table and I told him that yes there is a delete at 11-12-13 18:23:39 in table after seeing the DELETS column and timestamp in dba_tab_modifications, but not sure I am right or not
    SQL> show parameter audit
    NAME                                 TYPE        VALUE
    audit_file_dest                      string      /oracle/admin/pbowe/adump
    audit_sys_operations                 boolean     TRUE
    audit_syslog_level                   string
    audit_trail                          string      DB, EXTENDED
    please help
    Thanks
    Sam

    LOGMiner --> Using LogMiner to Analyze Redo Log Files
    AUDIT --> Configuring and Administering Auditing

  • SQL Server 2012 Management Studio:In the Database, how to print out or export the old 3 dbo Tables that were created manually and they have a relationship for 1 Parent table and 2 Child tables?How to handle this relationship in creating a new XML Schema?

    Hi all,
    Long time ago, I manually created a Database (APGriMMRP) and 3 Tables (dbo.Table_1_XYcoordinates, dbo.Table_2_Soil, and dbo.Table_3_Water) in my SQL Server 2012 Management Studio (SSMS2012). The dbo.Table_1_XYcoordinates has the following columns: file_id,
    Pt_ID, X, Y, Z, sample_id, Boring. The dbo.Table_2_Soil has the following columns: Boring, sample_date, sample_id, Unit, Arsenic, Chromium, Lead. The dbo.Table_3_Water has the following columns: Boring, sample_date, sample_id, Unit, Benzene, Ethylbenzene,
    Pyrene. The dbo.Table_1_XYcoordinates is a Parent Table. The dbo.Table_2_Soil and the dbo.Table_3_Water are 2 Child Tables. The sample_id is key link for the relationship between the Parent Table and the Child Tables.
    Problem #1) How can I print out or export these 3 dbo Tables?
    Problem #2) If I right-click on the dbo Table, I see "Start PowerShell" and click on it. I get the following error messages: Warning: Failed to load the 'SQLAS' extension: An exception occurred in SMO while trying to manage a service. 
    --> Failed to retrieve data for this request. --> Invalid class.  Warning: Could not obtain SQL Server Service information. An attemp to connect to WMI on 'NAB-WK-02657306' failed with the following error: An exception occurred in SMO while trying
    to manage a service. --> Failed to retrieve data for this request. --> Invalid class.  .... PS SQLSERVER:\SQL\NAB-WK-02657306\SQLEXPRESS\Databases\APGriMMRP\Table_1_XYcoordinates>   What causes this set of error messages? How can
    I get this problem fixed in my PC that is an end user of the Windows 7 LAN System? Note: I don't have the regular version of Microsoft Visual Studio 2012 in my PC. I just have the Microsoft 2012 Shell (Integrated) program in my PC.
    Problem #3: I plan to create an XML Schema Collection in the "APGriMMRP" database for the Parent Table and the Child Tables. How can I handle the relationship between the Parent Table and the Child Table in the XML Schema Collection?
    Problem #4: I plan to extract some results/data from the Parent Table and the Child Table by using XQuery. What kind of JOIN (Left or Right JOIN) should I use in the XQuerying?
    Please kindly help, answer my questions, and advise me how to resolve these 4 problems.
    Thanks in advance,
    Scott Chang    

    In the future, I would recommend you to post your questions one by one, and to the appropriate forum. Of your questions it is really only #3 that fits into this forum. (And that is the one I will not answer, because I have worked very little with XSD.)
    1) Not sure what you mean with "print" or "export", but when you right-click a database, you can select Tasks from the context menu and in this submenu you find "Export data".
    2) I don't know why you get that error, but any particular reason you want to run PowerShell?
    4) If you have tables, you query them with SQL, not XQuery. XQuery is when you query XML documents, but left and right joins are SQL things. There are no joins in XQuery.
    As for left/right join, notice that these two are equivalent:
    SELECT ...
    FROM   a LEFT JOIN b ON a.col = b.col
    SELECT ...
    FROM   b RIGHT JOIN a ON a.col = b.col
    But please never use RIGHT JOIN - it gives me a headache!
    There is nothing that says that you should use any of the other. In fact, if you are returning rows from parent and child, I would expect an inner join, unless you want to cater for parents without children.
    Here is an example where you can study the different join types and how they behave:
    CREATE TABLE apple (a int         NOT NULL PRIMARY KEY,
                        b varchar(23) NOT NULL)
    INSERT apple(a, b)
       VALUES(1, 'Granny Smith'),
             (2, 'Gloster'),
             (4, 'Ingrid-Marie'),
             (5, 'Milenga')
    CREATE TABLE orange(c int        NOT NULL PRIMARY KEY,
                        d varchar(23) NOT NULL)
    INSERT orange(c, d)
       VALUES(1, 'Agent'),
             (3, 'Netherlands'),
             (4, 'Revolution')
    SELECT a, b, c, d
    FROM   apple
    CROSS  JOIN orange
    SELECT a, b, c, d
    FROM   apple
    INNER  JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    LEFT   OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    RIGHT  OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    FULL OUTER JOIN orange ON apple.a = orange.c
    go
    DROP TABLE apple, orange
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to find out peak workload and peak workload hours ?

    We have recieved a query from client.
    they want us to tell them peak work load (volume of data database manage at peak work load hours).
    now the question is how to find out peak workload and peak workload hour in live prod database?
    i do not think AWR report will give any clue on this even if when extract it for the hours when my database is into some daily planned activity with lots of transactions.
    share your findings? thanks

    The OEM portal allows you to view performance data in a chart over time, based on data in the AWR tables. If you don't have OEM configured, then you can select directly from the tables and sum by snap. Or if you are collecting data at OS level, (SAR etc) then use that.
    If they are just interested in data changes, then you could just select FIRST_TIME, blocks *block_size from v$archived_log and break it down by hour etc.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to find out the plants and storage location for a given company code

    hi
    How to find out the plants and storage location for a given company code

    Hi
    Check for Assignem,ent of Plant & compnay code in OX18
    & for Combination of Plant & Storage location in OX09
    The total org structure can be viewed in EC01 - Click on Structure  -> navigation
    & Continue, Click on the Compnay code & the wole structure can be viewed
    Thanks & Regards
    Kishore

  • How to find out relevant Infosources and Infocubes for Datasources (LO)

    Hi Gems,
    I am new to BW.
    How to find out relevant Infosources and Infocubes for Datasources for LO Cockpit
    any help site pls.
    Thanks in advance

    1. make sure that your datasources have activated (trans RSA5 in SAP Source System) from the SAP Source system (Ex: R/3 or SCM System)
    2. after that you have to run trans RSA9 in SAP Source System to transfer new datasource in to BI System.
    3. log-on into BI System, run trans RSA1, choose SourceSystem Tab in the left panel. Right click on to your SAP Source System then choose <b>Replicate</b>.
    4. in the left panel choose BI Content tab, select infoObjects by infoArea.
    5. then Click on Grouping, select in <b>Dataflow Before and afterward</b>. Click Collection Mode, select Collect Automatically.
    6.in the middle panel, expand "Supply Chain Management" infoArea, select both <b>Characteristics: Logistics General</b> and <b>Key Figures: Logistics General</b>. Right click on it and select <b>Insert Objects for Collections</b>.
    7. After the objects have been inserted into Collected Objects then choose install with option Install in Background.
    8. Wait for the result.
    <b>Pls give point if you see its helpful.</b>
    Regards,
    Chuong Hoang

  • How to find out existing Reports and sap scripts and smartforms ?

    Dear Friends ,
    How to find out existing Reports and sap scripts and smartforms ?
    ( e.g: how many existing reports and SAP scripts are available in MM or SD module , What is the procedure to find out ? )
    Thanking you.
    Regards,
    Subash.

    scripts r stored in TNAPR TABLES

  • How to find out the object and tables that belong to it

    Do you know how to find out which tables belong to which object in trans. BD66, I have a CABN table but i donot the object name so how i can find out that??

    Hi,
    Wht object u r taking about .if it's a transport object,
    Go to Utilities -> Versions -> Version Mgt ->
    The latest one which is active, is the one u have to transport .
    Rgds ,
    J
    Do Award pts by cliking the left-hand side of this info.

  • How to find out the tablename and column name

    Hi,
    I have inserted a value (say 'I am here') in a table. but i don't know which is getting inserted this value.
    Now i want to know which table and colums has this value (I am here). How to find out as without knowing the table name.
    Is there any option to get the tablename and colum??.
    Please help me.
    thanks.

    Does nobody document their code anymore?
    See my response Re: How to find out a tablename for one possible solution.
    HTH
    John

  • How to find out which field belongs to which table

    Dear all
             How to find out this "Field name:-  LFSNR" belongs to which table.
    regards
    M.Chandra mohan

    Hi
    You can go to SE84.
    ABAP Dictionary --> Fields --> Table fields
    Enter field name and execute. You will get list of table where this field is exist.
    hope it helps
    regards
    Srinivas

  • How to find out list of variants in TVARV table

    hi!
    can anybody can guide me on the following issues? plz
    How to list all variants in TVARV table?
    How to find out any Z* programs that writes to TVARV table, using the variant name?
    How to find out the programs which are  reads the TVARV data into a program variant?
    Thanks & Regards,
    vijay

    Or some help might be useful:
    http://help.sap.com/saphelp_47x200/helpdata/en/c0/98037ae58611d194cc00a0c94260a5/frameset.htm
    Regards,
    Subramanian V.

  • How to find out the primary and failover DNS name

    Hi;
    This sounds very stupid, but could some one please tell me how to find out the name/dns name of the primary and failover server without using the CDS console.
    any help is appreciated

    Is this what you want?
    $ /usr/lib/ldap/ldap_cachemgr -g
    cachemgr configuration:
    server debug level 0
    server log file "/var/ldap/cachemgr.log"
    number of calls to ldapcachemgr 12729
    cachemgr cache data statistics:
    Configuration refresh information:
    Previous refresh time: 2005/08/07 23:54:59
    Next refresh time: 2005/08/08 00:55:00
    Server information:
    Previous refresh time: 2005/08/14 15:15:00
    Next refresh time: 2005/08/15 03:15:00
    server: ldap1.example.com, status: UP
    server: ldap2.example.com, status: UP
    server: ldap3.example.com, status: UP
    Cache data information:
    Maximum cache entries: 256
    Number of cache entries: 0
    Gary

  • How to find out what is the name of table/view is being maintained in  IMG?

    Gurus,
    Any general trick to find out what is the name of table/view is being maintained
    by a given IMG item while configuring?
    Thanks,

    Hi,
    Click F1  on the table/ view you will get the table name and then go to transaction give this table name and click on Find Maintainance Dialog their you will get the views related to that table.
    Regards,
    IFF

  • UITableView section header: How to find out font size and background color

    Hi, does anyone know how to find out the default font and default background color(or image?) used in the section header of a tableView
    I'd like to create a view with the same background color/image and use the same font (with different color) used by the section header

    I don't think there are any getter methods for a section header. But I wouldn't be surprised if the header was an object. You might try setting some header text to a key string and searching recursively through all the subviews for objects that respond to a text message. It might help to also print the description of objects that don't respond to text. I haven't tried this yet, but will let you know if I get any useful results.
    I guess another approach would be to use viewForHeaderInSection to set the font and color to whatever you wanted. Then you wouldn't have any problem matching it.

  • How to find out relevant Infosources and Infocubes for Datasources

    Hi All,
    I am BIW beginner, have system installed BW 3.0B, I want to use r/3 Datasources and find out relevant Infosources and Infocubes, can any one help on this issue.
    Thanks in Advance.

    hi,
    before going to install the infocube, infosource use follwing link to find the respective infosource belong to which infocube and chara, keyfigures.
    then do the in stallion in bi content
    http://help.sap.com/saphelp_nw2004s/helpdata/en/3d/5fb13cd0500255e10000000a114084/frameset.htm
    regards
    harikrishna N

Maybe you are looking for

  • Can you have 2 apple tvs working with one computer - both active at the same time?

    Can 2 Apple TVs - Generation 3 - work off the same computer? I can't seem to get the 2nd Apple TV to find the network yet I have full signal and the Network name is correct. Can they work at the same time using different content?

  • DB13 online backup restore

    I am taking daily online backup from DB13 with the option"database backup+redolog file" on a tape medium.If I want to restore this taken backup what is the procedure and commands to be used

  • Can you save to file and edit file?

    I have this problem with a dummy site i'm working on (for learning purposes) and i have 20 form text fields with an "add extra field" button. They are for entering sales of products, but the problem i'm having is that i use a DB, but come to realize

  • How do I change audio mapping for a clip being batched in from a sequence?

    My client has cut a shorter version a feature film for his client. The client's source is a Hi-Def tape with four channels of audio. Ch.1&2 Stereo Mix and Ch.3&4 Music & Effects. He was given a DV tape with Ch.1 Mono Mix and Ch.2 Music & Effects. Whe

  • Trying to archive but keeps saying "alert-there was an error while saving"

    I have been trying to archive a dvd project in idvd6 but I get an error every time that says "Alert-there was an error while saving" The project never saves. I am trying to save this to an external hard drive. I have checked permissions and all say r