Extract schema/metadata - names for all tables and attributes

Hi, I am quite new to Oracle DB (only been doing dev mostly with sqlserver before). Is there a way to extract schema (names for all tables and attributes) for 10g and 11g in application code (either java or .net) or pl/sql?
Thank you,
-Tony

There are built in views that start with DBA_, ALL_, and USER_. All means all the user can see, user means all the user has, and dba means everything, which generally means the same as the others plus an owner. So you can desc user_tables to see what-all that view has, then select columns from the view with ordinary sql. See the doc set for all the views available, interesting ones are ...views, ...objects, ...tab_cols and so forth.
There are also built in procedures for getting metadata, google for details.
Many tools have easy GUI's for this too. EM has ways on the administration screen to get to various objects, and then you can show the ddl. Maybe sqldeveloper has something too.

Similar Messages

  • Import tables using same file name for all tables

    hi,
    We are using oracle 11.2.0.3.0, we have taken export of multiple tables in schema, unfortunately in exp command we have mention same file name for all the tables, now it has created one file for all export but the size of that file shows that all the tables included in it , when we try to import the tables only last table mention in export command is imported for other tables it hangs, example of code show below.
    Is there any way to import the remaining tables.
    exp system file =exp05042013.dmp tables=gr.table1
    exp system file =exp05042013.dmp tables=gr.table2
    exp system file =exp05042013.dmp tables=gr.table3

    Hi,
    You can use as :
    exp username@database tables=table1,table2 file=tabledata.dmpDid you have any RMAN full backup?
    Why you are not recover crash database?
    Mahir

  • Search script generator for all objects and data (!) from a user/schema ?

    Is there a way to create a script which (when run) creates all the existing
    TABLES; INDEXES, KEYS and DATA for a specified user/schema ?
    This (PL-)SQL script should contain all INSERTS for the currently existing rows of
    all the TABLEs.
    When I use e.g. export to Dumpfile I have at first find all TABLEs and components
    which I want to dump. This is rather uncomfortable.
    I just want to specify the user name similar to
    createscript user=karl@XE outfile=D:\mydata\myscript.sql
    Is this somehow possible ?

    So that I understand your requirements exactly, are you asking for your script to ...
    1/ export from database A the entire schema of a specified user
    2/ drop all objects owned by that user in database B
    3/ import the objects from database A into database B
    If so, it sounds to me that a shell script that does a schema level export as Nicholas suggested, and then drops the user from database B using the cascade keyword (e.g. drop user username cascade), recreates the user and then imports the export file into B should do the trick.
    I don't think searching for individual tables and creating the statements to recreate them is the best idea.
    Hope that helps
    Graham

  • The specified file or folder name is too long,the url path for all files and folders

    The specified file or folder name is too long,the url path for all files and folders must be 260 character or less
    can we increase this limit?
    MCTS,ITIL

    Hi,
    As I understand, you want to increase the length of URL path in SharePoint 2010.
    Per my knowledge, this limit cannot be increased. SharePoint limits URL length because all relative URL links are stored in the clear forms on the SharePoint content DB and often this links are used as primary keys to link one table with another. Fields
    which are used to store these links (for instance tp_DirName from the AllUserData table) allow storing only 256 characters.
    There are several ways that you can resolve or mitigate URL length problems in the SharePoint Server 2010 environment. The following list provides suggestions:
    1. Upgrade all the end-user browsers to Internet Explorer 8, which has a longer URL length limit.
    2. Use shorter names for sites, folders, and documents and control the depth of the site and folder structures to reduce the lengths of URLs.
    3. If possible or allowed, use ASCII names for sites, folders, and documents. This will avoid situations where the URL will be lengthened by being encoded.
    4. To reduce the risk that the SharePoint Server 2010 end-users will encounter problems because of URL length limitations, we recommend that you apply the following effective limits in the deployment:
    256 Unicode (UTF-16) Code units - the effective file path length limitation, including a domain/server name
    128 Unicode (UTF-16) Code units - the path component length limitation
    More reference:
    http://technet.microsoft.com/en-us/library/ff919564(v=office.14).aspx
    http://sharepointknowledgebase.blogspot.in/2013/04/url-path-length-restrictions-in.html#.VKJN53BJA
    Best regards,
    Sara Fan

  • M:N Relation and plural name for associative Table

    Hi,
    I'm using DM 3.1.4
    In my logical model, 2 entities and an M:N relation. I define a name for this relation
    Entity Student
    Entity Stage
    Relation Registration
    I create a glossary with plural form for these three names (entities name and relation name) :
    Student --> STUDENTS
    Stage --> STAGES
    Registration --> REGISTRATIONS
    When I generate relationnal model with "apply name translation" option, my two tables are named correctly with the plural name, but the associative table is named with the relation name (registration), not with the plural form (REGISTRATIONS)
    Is this a bug ? Is there another way to automatically define plural name for an associative table ?
    Thanks
    Fabrice.
    Edited by: FabriceC on 22 mars 2013 14:03

    Hi Fabrice,
    thanks for reporting the problem. I logged a bug for that.
    There is no another way for setting a plural name for intersection table. If you switch to 3.3 then you can set the name manually and lock it so it cannot be changed further.
    Philip

  • Hi All,How2 delete a pkey for std table and add 2 new primary keys

    Hi All,
            How2 delete a pkey for std table and add 2 new primary key fields .Please provide me the required procedure .
    Thanks&Regards.
    Bharat.

    Hi Bharat,
    First thing is you need to have the access key to change any standard dictionary object/standard programs/ standard transactions.You may get this from your basis person after getting approval from your respective manager.But changing or modifying the standard object is not recommended, but if there is no alternate to meet the business requirement then we have to follow this way only.
    Next, you need to check whether this table's primary key is being used in any other table as foreing key or not. If there is, then you must remove this relation and then you can delete the unncessary primary key field from that table.Finally you can add the two new fields and set them as primary key, save, check for any errors and activate.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • EXPORT SCHEMA 'S ALL TABLES AND PROCEDURES BY EXPDP

    how i can export schema's all tables and procedures using expdp.
    when i am giving expdp usr/pass schemas=scott directory=export_dir dumpfile=280606.DMP logfile=280606.log tables=*
    but it is giving error.
    pls help
    regards
    Prabhaker

    You only need to specify parameter USER or TABLES , no need of both
    specify USER=SCOTT then it will export all objects in SCOTT

  • How do I run sp_spaceused for all tables in a database?

    Hi,
    I am struggling to understand how to run the sp_spaceused sproc for all tables in a database.
    I know how to use it for one table but how would I replicate it automatically for each table in a given database?
    Regards,
    Ian.

    I just managed to alter the code of VidyaSagar and have pulled out all the information including Schema name. Below is what it looks like:
    set
    nocount
    on
    select
    'Database Name: ',
    db_name
    if
    exists(select
    name from tempdb..sysobjects
    where name='##tmp'
    drop
    table ##tmp
    create
    table ##tmp(TABLE_SCHEMA
    nvarchar(256),TABLE_NAME
    nvarchar(256),
    num_rows int,
    reserved_KB varchar(15),data_KB
    varchar(15),index_KB
    varchar(15),unsed_KB
    varchar(15
    go
    declare
    @tbl_schema nvarchar(256
    declare
    @tbl_name nvarchar(256
    declare
    @schema_tbl_name nvarchar(256
    declare
    tblname CURSOR
    for
    select
    TABLE_SCHEMA
    TABLE_NAME
    from
    INFORMATION_SCHEMA.TABLES
    where TABLE_TYPE='BASE
    TABLE' 
    open
    tblname
    Fetch
    next
    from tblname
    INTO @tbl_schema,@tbl_name
    WHILE
    @@FETCH_STATUS
    = 0
    BEGIN
    set @schema_tbl_name=@tbl_schema+'.'+@tbl_name
    insert
    into ##tmp(TABLE_NAME
    , num_rows
    , reserved_KB
    ,data_KB
    ,index_KB
    ,unsed_KB
    exec
    sp_spaceused
    @schema_tbl_name
    update ##tmp
    set TABLE_SCHEMA
    =@tbl_schema
    where TABLE_SCHEMA
    is
    NULL
    and TABLE_NAME=@tbl_name
    FETCH
    NEXT
    FROM tblname
    INTO @tbl_schema,@tbl_name 
    END
    CLOSE
    tblname
    deallocate
    tblname
    go
    select
    from
    ##tmp
    drop
    table ##tmp
    Warm Regards, Ajay

  • How to display name of the table and the description and the table type

    Hi,
    Can you people tell me how to display the name of the table and the description and the table type (View, structure, etc...) used in the program.
    I want to display in a list.
    Kind Regards

    use this program
    TABLES : TSTC, tstct.
    TABLES : DD03l, DD02l.
    DATA : Program like sy-repid.
    DATA : BEGIN OF I_FINAL OCCURS 0,
    tabname LIKE dd02l-tabname,
    TABCLASS LIKE dd02l-tabCLASS,
    TEXT LIKE DD02T-DDTEXT,
    END OF I_FINAL.
    DATA : BEGIN of ITAB Occurs 0,
    name like dd02l-tabname,
    END OF ITAB.
    DATA : TCD(100) TYPE C.
    DATA : var1 LIKE dd02l-tabname.
    DATA : DESC LIKE TSTCT-TTEXT.
    selection-screen skip.
    SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : r1 RADIOBUTTON GROUP r DEFAULT 'X'.
    Parameters : Tcode like sy-tcode.
    selection-screen skip.
    PARAMETERS : r2 RADIOBUTTON GROUP r.
    Parameters : Prog like sy-repid.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
    select-options : Type for dd02l-tabclass .
    SELECTION-SCREEN END OF BLOCK B1 .
    at selection-screen.
    if r1 = 'X' and Tcode is initial.
    message e001(00) with 'Enter Transaction Code' .
    elseif r2 = 'X' and Prog is initial.
    message e001(00) with 'Enter Program Name' .
    endif.
    START-OF-SELECTION.
    if r1 = 'X'.
    Prog = ' '.
    select single * from TSTC where tcode = tcode.
    if sy-subrc = 0.
    program = TSTC-PGMNA.
    select single TTEXT from tstct into desc where tcode = tcode and SPRSL = 'E'.
    else.
    Write :/ 'Invalid Transaction Code'.
    exit.
    endif.
    elseif r2 = 'X'.
    Tcode = ' '.
    program = Prog.
    endif.
    CALL FUNCTION 'GET_TABLES'
    EXPORTING
    PROGNAME = Program
    TABLES
    TABLES_TAB = itab.
    if itab is initial.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    ELSE.
    PERFORM : categorize.
    endif.
    END-OF-SELECTION.
    LOOP AT I_FINAL.
    WRITE :/4 I_FINAL-tabname COLOR 2 INTENSIFIED OFF NO-GAP HOTSPOT ON, 35 I_FINAL-TABCLASS COLOR 2 INTENSIFIED OFF NO-GAP,
    50 I_FINAL-TEXT COLOR 2 INTENSIFIED OFF NO-GAP.
    ENDLOOP.
    AT LINE-SELECTION.
    TCD = SY-LISEL.
    var1 = TCD+3(30).
    set parameter id 'DTB' FIELD VAR1.
    call transaction 'SE11' and skip first screen.
    TOP-OF-PAGE.
    WRITE :/45 'TABLE DETAILS RELATED TO THE TRANSACTION CODE' COLOR 7 .
    WRITE :/2 'DATE : ' COLOR 1, SY-DATUM COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TRANSACTION CODE : ' COLOR 1, Tcode COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TCODE DESCRIPTION : ' COLOR 1, desc COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'PROGRAM NAME : ' COLOR 1, PROGRAM COLOR 1 INTENSIFIED OFF NO-GAP.
    SKIP 1.
    WRITE :/1(140) SY-ULINE.
    WRITE :/4 'TABLE NAME' COLOR 5 INTENSIFIED OFF NO-GAP,35 'TABLE TYPE' COLOR 5 INTENSIFIED OFF NO-GAP,
    55 'DESCRIPTION' COLOR 5 INTENSIFIED OFF NO-GAP.
    WRITE :/1(140) SY-ULINE.
    *& Form categorize
    text
    --> p1 text
    <-- p2 text
    FORM categorize .
    SELECT dd02ltabname dd02ltabCLASS DD02T~DDTEXT
    FROM dd02l INNER JOIN DD02T ON dd02ltabname = dd02Ttabname
    INTO TABLE I_FINAL
    FOR ALL ENTRIES IN itab
    WHERE DD02L~TABNAME = ITAB-NAME AND TABCLASS IN TYPE AND DDLANGUAGE = 'E'.
    if sy-subrc <> 0.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    endif.

  • How to update managed metadata column for all file in document library using powershell

    Hi,
    How to update managed metadata column for all file in document library using powershell?
    Any help on it.
    Thanks & REgards
    Poomani Sankaran

    Hi TanPart,
    I have changed the code which you have give in order to get the files from SharePoint 2010 Foundation  Document Library.But i am getting below error in powershell.
    Property 'ListItemCollectionPosition' cannot be found on this object; make sure it exists and is settable.
    Could you tell me which is the issues in it?
    See the code below.
    $web = Get-SPWeb http://ntmoss2010:9090/Site
    $list = $web.Lists["DocLib"]
    $query = New-Object Microsoft.SharePoint.SPQuery
    $query.ViewAttributes = "Scope='Recursive'";
    $query.RowLimit = 2000
    $caml = '<Where><Contains><FieldRef Name="Title" /><Value Type="Text">Process Documents/Delivery</Value></Contains></Where>' +
            '<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
    $query.Query = $caml
    do
        $listItems = $list.GetItems($query)
        $spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
        foreach($item in $listItems)
            #Cast to SPListItem to avoid ambiguous overload error
            $spItem = [Microsoft.SharePoint.SPListItem]$item;
            Write-Host $spItem.Title       
    while ($spQuery.ListItemCollectionPosition -ne $null)
    Thanks & Regards
    Poomani Sankaran

  • How to find all table and views in the database

    Hi,
    I want to find all table and view name form the database can u tell me syntax.
    i.e. I am able to find out table name and view name in sql server ...like
    FOR VIEW :
    select table_name from information_schema.views where table_name not like 'sys%'
    FOR TABLE :
    select table_name from information_schema.tables where table_name not like 'sys%' and table_type='Base table'
    Thanks & Regards,
    Shirish

    Hello,
    Take a look at "dba_tables" and "dba_views" both of which are documented here:
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm
    - Mark

  • GRANT SELECT to TEMP(by procedure)..... ALL tables and views of OWNER....

    hi ,
    I want to privelege only Grant SELECT ALL tables,views....
    I have written A procedure.....given below....
    CREATE OR REPLACE PROCEDURE GRANT_SELECT_ALL_PROC
    IS
    l_obj VARCHAR2(60);
    l_obj_type VARCHAR2(60);
    CURSOR Cur_Obj IS
    SELECT OBJECT_NAME,OBJECT_TYPE
    FROM USER_OBJECTS
    WHERE USER ='OWNER';
    BEGIN
    For i in Cur_Obj Loop
    l_obj := i.OBJECT_NAME;
    l_obj_type := i.OBJECT_TYPE;
    IF l_obj_type IN ('TABLE','VIEW')
    THEN
    EXECUTE IMMEDIATE 'GRANT SELECT ON' || l_obj ||'TO TEMP’;
    ELSIF l_obj_type IN('FUNCTION','PROCEDURE','PACKAGE') THEN
    EXECUTE IMMEDIATE 'GRANT EXECUTE ON'|| l_obj ||'TO TEMP’;
    END IF;
    END LOOP;
    END GRANT_SELECT_ALL_PROC;
    procedure is working fine.....
    OWNER there are some table and views......
    But After creation of User name TEMp....
    When I m giving GRANT SELECT to TEMP(by procedure)..... ALL tables and views of OWNER....
    when I coonecte to TEMP...
    Not getting table,view List...
    not even data of table or Views.....
    can anybdy help me.......advance thanx ...
    sanjay

    hi ,
    I want to privelege only Grant SELECT ALL
    tables,views....
    have written A procedure.....given below....
    CREATE OR REPLACE PROCEDURE GRANT_SELECT_ALL_PROC
    IS
    l_obj VARCHAR2(60);
    l_obj_type VARCHAR2(60);
    CURSOR Cur_Obj IS
    SELECT OBJECT_NAME,OBJECT_TYPE
    FROM USER_OBJECTS
    WHERE USER ='OWNER';
    BEGIN
    For i in Cur_Obj Loop
    l_obj := i.OBJECT_NAME;
    l_obj_type := i.OBJECT_TYPE;
    IF l_obj_type IN ('TABLE','VIEW')
    THEN
    EXECUTE IMMEDIATE 'GRANT SELECT ON' || l_obj ||'TO
    TEMP’;
    ELSIF l_obj_type IN('FUNCTION','PROCEDURE','PACKAGE')
    THEN
    EXECUTE IMMEDIATE 'GRANT EXECUTE ON'|| l_obj ||'TO
    TEMP’;
    END IF;
    END LOOP;
    END GRANT_SELECT_ALL_PROC;
    procedure is working fine.....
    OWNER there are some table and views......
    But After creation of User name TEMp....
    When I m giving GRANT SELECT to TEMP(by
    procedure)..... ALL tables and views of OWNER....
    when I coonecte to TEMP...
    Not getting table,view List...
    not even data of table or Views.....
    can anybdy help me.......advance thanx ...
    sanjayQuery SELECT * FROM USER_TAB_PRIVS_MADE from the user from which you are executing the procedure
    and Query SELECT * FROM USER_TAB_PRIVS_RECD from the TEMP user.

  • Pkg execution session id in all tables and Session Id of each interface

    Hi
    I am have one master package executing all interfaces for Staging and Target. Each staging interface loads the data from source to staging tables and target interface loads data from staging to Target. Each table has a column named ETL Batch Id and ETL Session Id. Our designer asked us to populate the ETL Batch Id with the Pkg execution id which will be same in all tables and also the ETL Session Id with the respective interface scenario execution session id which will be different in each table.
    Question: 1. What is the purpose and advantage of storing ETL Batch Id in each table?
    2. What is the purpose and advantage of storing ETL Session Id in each table?
    3. Do I need both? (1 and 2)
    BTW the ET design is for Star Schema (Data mart)
    Thanks
    OBIEE Fan

    This is really a question for your designer - there may be valid reasons why you'd want to store the session ID - maybe to help with break analysis or data quality monitoring. If you store the session ID in a table then you should be able to work out the "batch ID" by looking at the work repository/operator. But again, whether you "need" them is a question for your designer.
    ODI may update rows as well as insert, so there may be considerations there as to how you tell the difference.
    Edited by: _Phil on Oct 9, 2012 9:45 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Just updated to itunes 12.1.0.71 - big problem - can no longer access the legacy "Get Info" where you could change multiple files, easily add artwork, add album name for TV show, and much more. In previous iTunes 12 you'd right click

    Just updated to itunes 12.1.0.71 - big problem - can no longer access the legacy "Get Info" where you could change multiple files, easily add artwork, add album name for TV show, and much more. In previous iTunes 12 you'd right click and hold shift key and be able to get to it. Anyone figured this out?

    The "legacy" metadata editors, for which there was a "back door" in iTunes 12.0, have gone from 12.1.  However, the revised editors in 12.1 provide access to (almost) all the metadata elements that were available in iTunes 11, albeit in a different layout and with some additional constraints based on media kind.  Some users have / will have an issue with the statement that "Get Info has been completely redesigned in iTunes 12 to focus your attention only on what’s necessary for the selected item" since that removes some metadata elements that people may have been using in creative ways.  iTunes 12.1 basically gives you access to the fields that Apple think are necessary ... .  Some of the things that have been excluded by this rule:
    track and disc number fields for video media kinds
    show and episode fields for music
    description tab for audiobooks made up of more than one file
    Obviously the first two examples can be regarded as "overloading" the metadata elements - i.e., using them in ways that the designers didn't intend - but given that some users do find valid cases for this it's a shame that they've been deprecated in the new UI.  There are couple of workarounds:
    in songs view (or any of the other columnar views), you can still select any fields to display, independent of media kind, and these can be edited (though only one at a time) by double-clicking in the relevant "cell"
    you can (temporarily) change the media kind of an item (or group of items) to get access to metadata elements that would otherwise be inaccessible.
    It may be worth submitting an issue via https://www.apple.com/feedback/itunesapp.html - I can't see it as a huge development task to have a user preference to switch between "show all fields" and "filter fields based on media kind".
    One other oddity/irritation is that some of the tabs don't, by default, show all the available fields - you need to scroll up/down to access them or to expand the window by dragging on one of its corners.  Fortunately, the latter seems to be persistent - once you've done this to make all the fields visible the editor will open at the same (larger) size when opened again.

  • Get the names of all tables

    First I want to tell you: I'm a amateur concerning Java Programming.
    My task is to write a java program - using JCO -, which retrieves the names of all tables (a user can access).
    Can anybody help me, please?

    Hi Michael,
    i can't help you because i don't know anything about JCO!
    It's simply funny and i'm happy to see a "known face" here!
    Perhaps this will help you:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/tips and tricks for sap java connector client programming.pdf
    And don't be so decent...you're not so bad in Java at all
    Greetings
    Florian

Maybe you are looking for

  • Actualización gratuita CS5 a CS5.5 para compras recientes

    Tengo entendido que para quienes recientemente compramos la suite design premium cs5 Adobe nos entregaría de forma gratuita el upgrade a 5.5 eso fue lo que me informaron en tienda, alguien tiene alguna referencia al respecto... hay que solicitarlo a

  • Speakerphone doesn't work post iOS7 upgrade.

    Speakerphone doesn't work, I can't hear anyone when I put them on speakerphone or when i try to listen to voicemail on speakerphone.  This happened post iOS7 upgrade.  Any idea?

  • How do we create and publish templates in SRM ?

    Good day guru's How do  we create and publish templates in SRM , for contracts management ? Your help will be appreciated

  • CC for photographers

    I bought the CC for photographers. I would acc conditions in terms not need to have photoshop already. When I try to start photoshop cc request that I enter a serial number which I do not have. Lightroom starts without problems

  • Custom tags or Custom Beans

    In a web application project using model 2 to encapsulate layers of application which one is batter jsp tags or javabeans ? What do u thing about their advantages and disadvantages. Because i think that both are reuseable and platform independent. Th