Dict View name and column names

Hi,
Oracle 11.2.0.1
Windows XP
I wish to get the output of all the dictionary views with their name and column names something like this :
VIEW NAME
Name                                      Null?    Type
VIEW NAME
Name                                      Null?    Type
...Please tell me how do I get the above output for all the dict view from dict table.
Thanks.

Step 1:
set serveroutput on;
set feed off;
set head off;
set pages 200;
spool dict.sql;
declare
tn varchar2(50);
cursor c is select table_name from dict order by table_name;
begin
open c;
loop
fetch c into tn;
dbms_output.put_line('begin');
dbms_output.put_line('dbms_output.put_line(' ||chr(39) || tn ||chr(39) ||');');
dbms_output.put_line('end;');
dbms_output.put_line('/');
dbms_output.put_line('desc ' || tn || ';');
exit when c%NOTFOUND;
end loop;
close c;
end;
Step 2:
Just edit dict.sql to remove top and bottom lines.
spool dictcols.txt
@dict.sql;
spool off;
But, this is not a good way to obtain your desired output. I am sure, other members can do it very smartly and efficiently.
Regards
Girish Sharma

Similar Messages

  • How Both View Selector and Column Selector in one report dashboard section

    Can we use a view selector and column selector inside a report in one section of the dashboard?
    env: obiee 10g
    Appreciate any links and pointers
    Thanks in Advance
    Kris
    Edited by: user566193 on Mar 22, 2011 10:18 PM

    hi kris,
    Can we use a view selector and column selector inside a report in one section of the dashboard?Here view selector is nothing but having multiple views and selecting depends on what end user want to see.You are saying in a single report in once section only.
    If it is a single report you can go with using a column selector.
    Note:-View selector and column selector combination can be used.....but it looks wierd as you need to select view at the same time the corresponding column.
    UPDATED POST
    Yes you can have it by creating different compound layouts with pivots in it.
    Cheers,
    KK
    Edited by: Kranthi.K on Mar 22, 2011 11:27 PM

  • View selector and column selector one row

    Hi Kings,
    Thanks in first.
    im having view selector v1,column selector c1
    user requiremet is to show the view selector and column selector in single row like,
    V1 pivot1 c1 usd
    rownumber Company currency
    1 abc USD
    2 def INR
    is there ay posibilities to show view selector ad column selector in a single row?
    Please help on this..its going nearly a week..
    Regards,
    Junior........

    Hi Sai,
    Thank you.
    My need is to show (from your example) like,
    chart along with Region,market,currentdate in top of results..
    more clear ..
    viewselector V1 column selector C1
    rownum company
    1 abc
    2 def
    ie,column selector and view selector should be appear top of the results.
    please remeber im using 2 pivot tables in view selector.
    if i select pivot1 then all details are coming left side .
    column selector is coming right side of all results.
    any ideas...please...
    regards,
    Junior...

  • List view threshold and columns manage metadata problems

    Hi
    We have problem in our company since we have more files in library than is set in List view Threshold.
    I have created index on column "year" and create view filter: Year is equal 2015.
    and I get famous error: this view cannot be displayed because....
    I haven`t find any limitations on column type: manage metadata?

    Hi,
    As I understand, you encountered the issue after you created view filter.
    Every column type has the default number that can be created. You should go to check the number of your column created is less than the number by default.
    Per my test, I can achieve it without exceeding list view threshold.
    Check things below:
    1. You can increase the number of the list view threshold, and after that, you can try again to see the same situation will occur.
    2. Go to create another managed metadata column “year”, and create index on column "year", and create view filter in the same list to see the issue will occur.
    3. Check ULS log to see the details about the cause of the issue.
    Best regards,
    Sara Fan

  • HELP remembering VIEW names and USAGE - any tips?

    Hi
    Ive got my 1Z0-031 exam comming up this friday and after each topic section self review i do, im finding that i cant answer the questions which quiz me on the use of either V$ and regular DD views.
    Remembering the actual names will be OK, but then i strugle trying to remember within WHICH contexts they are be used. If it were to ask a definition of a particular view i would be OK with that also, but i know the exam will not be like that...and from practice questions, there are quite a few questions on views within each section!!
    For example, Which VIEW could you use to query users with the ALTER ANY ROLE privilege?
    Now i know the answer is DBA_SYS_PRIVS, but from remembering the defintion of this view, it did not help me - in that I find it hard to relate the VIEW name and its usage in conjunction with the definition...(DEF: DBA_SYS_PRIVS - lists SYSTEM PRIVILEGES granted to USERS and ROLES)
    Any tips or adivce would be really appriciated! :)
    Thanks again!
    Amanjit

    Remembering the actual names will be OK, but then i
    strugle trying to remember within WHICH contexts they
    are be used. If it were to ask a definition of a
    particular view i would be OK with that also, but iYou remember view definitions just like that? Wow.
    >
    For example, Which VIEW could you use to query
    users with the ALTER ANY ROLE privilege?
    Well.... you need to find your own "method" but some tips that might help:
    - since you dont have much time, write down the names of the views related to this exam (narrow down the number of views) and try to create some structure from there
    - try to think in objects: tables, columns, views, synonyms and indexes. Tablespaces, data files, segments and extents. Users, privileges and roles.
    - use the views and learn from it; do describe on them, and select from them to see what info each view delivers
    - dba/all/user views ends very often with an s, v$ does not (dba_tablespaces and v$tablespace)
    - v$ has dynamic performance/"run-time" info e.g. processes, sessions, sql, statistics, memory, etc. and you can use some fixed tables/views already when the instance is in nomount (v$system_parameter, v$session, ...) or mount (v$controlfile, v$datafile, v$log, ...).
    Hth,
    Fredrik
    btw, I suck at remembering such details, I use the describe command and know where to find the docs ;-)
    Message was edited by:
    orafad

  • List tables and column names a stored procedure is querying

    Hello,
    Is there a way to list tables and column names that a stored procedure is querying, i.e, selecting from, using T-SQL?  If yes, is there a way to also show data types for the columns that a stored procedure is querying, i.e, selecting from?
    Thank you,  
    Lenfinkel

    One way to view the dependencies of an object is to use SSMS; navigate to the object, right click and select "view dependencies".  However this does not tell you what columns are being referenced by the Stored Procedure.
    One way to view what is being referenced by a stored procedure is to run something like
    select
    text
    from syscomments
    where
    id in
    (select id
    from sysobjects
    where
    name
    =[Your Object Name]
    And xtype
    in
    ('p','P')
    Please click "Mark As Answer" if my post helped. Tony C.

  • How to get table and column names thats being used in SQL , that's generating all my reports on SSRS.

    Good day,
    I searched through the forum and cant find anything.
    I have around 300 published reports on SSRS and we are busy migrating to a new system.
    They have already setup their tables on the new system and I need to provide them with a list of table names and column names that are being used currently to generate the 300 reports on SSRS.
    We use various tables and databases to generate these reports, and will take me forever to go through each query to get this info.
    Is it at all possible to write a query in SQL 2008 that will give me all the table names and columns being used?
    Your assistance is greatly appreciated.
    I thank you.
    Andre.

    There's no straightforward method for that I guess. There are couple of things you can use to get these details
    1. query the ReportServer.dbo.Catalog table
    for getting details
    you may use script below for that
    http://gallery.technet.microsoft.com/scriptcenter/42440a6b-c5b1-4acc-9632-d608d1c40a5c
    2. Another method is to run the reports and run sql profiler trace on background to retrieve queries used.
    But in some of these cases the report might be using a procedure and you will get only procedure. Then its upto you to get the other details from procedure like tables used, columns etc
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to insert data into datagrid dynamically and also programatically with data and column names being retrived from a xml file..

    iam not able to insert data into datagrid corresponding to the column names..as iam inserting both data and column names programatically..ie iam not able to co relate the data with the column names.plzzz help me asap

    A DataGrid is row-based rather than cell-based with each row
    corresponding to an item in an underlying collection (specified in the
    dataProvider property). In order to add data to a DataGrid you
    manipulate the underlying collection, rather than the grid directly.
    Based on the limited description of your problem I would imagine you
    would need to create dynamic objects with property names that correspond
    to the dataFields of your dynamically created datagrid columns.
    So if you had created columns with dataFields "alpha", "beta" and
    "gamma" on your datagrid, you could create an item in your grid by
    adding the following object to your dataProvider:
    var gridItem : Object = new Object();
    gridItem.alpha = "alphaValue";
    gridItem.beta = "betaValue";
    gridItem.gamma = "gammaValue";

  • How to find out the Target Component name and Target view name

    Hi All Expert,
                      I want to know ,how to find out the target component and target view in WEB UI,when i click on a field which shows as a hyper link in WEB UI .At GUI level ,i know the how it will work.Any way to find out the component name and view name which is show the details of that field at GUI level .IF you go to transaction CRMD_ORDER then open the service contract id .then goto the item level value .there is 1 service data tab is available at item level.there is two button is available.first one is available time and second one is response time .if i click on any button then one popup is open which is shows the details of that button.I dont know how to find out the component name and view name from GUI level.
    Thanks in Advance....
    Vishwas Sahu

    Hi Vishwa,
                 The control would be something like this for navigation in Get_p_xxx method u mention as link and u mention a event name which gets triggered on the click of this hyperlink. So your GET_P_XXX method would have the following code:
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.
        WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
          rv_value = 'EXAMPLE'.
    Now you have to create a method as EH_ONEXAMPLE at your IMPL class and within which you would give an outbound plug method. Within the outbound plug the target data would be filled in the collection and window outbound plug would be triggered.
    This is a huge topic and  i have just mentioned you basic things.
    Regards,
    Bharathy.

  • Table name input. and output i need  all rows and columns  using procedures

    hi,
    question: table name input. and output i need all rows and columns by using procedures.
    thanks,
    To All

    An example of using DBMS_SQL package to execute dynamic SQL (in this case to generate CSV data in a file)...
    As sys user:
    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /As myuser:
    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;This allows for the header row and the data to be written to seperate files if required.
    e.g.
    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    PL/SQL procedure successfully completed.Output.txt file contains:
    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
    Adapt to output different datatypes and styles are required.

  • Case sensitive table names and column names in 8i or 9i databases

    Hi everybody,
    I've got a couple of business-side colleagues who insist that Oracle table and column names are case sensitive. That is, there is a setting in the set up of a database that lets you pick if table and column names are case sensitive. For example, this would mean that there could be a table named EMP in a given schema schema plus a table named emp in that same schema.
    Can this be true? I'd be surprised of course, but I've been surprised before.
    Thanks for any direction.
    -- Bill Loggins

    You can do it, but I would avoid it like the plague.
    SQL> create table "a" (b date);
    Table created.
    SQL> create table "A" (b date);
    Table created.
    I think I would refuse to work on a database where this has been used !

  • How to compare index names and columns from different user?

    I am using below query to compare two indexes from 2 different users but even though index name and columns are same... result shows me they are different.. what I am doing wrong? Thanks
    WITH t AS
            (SELECT COUNT (DISTINCT index_owner || index_name || indexed_cols)
                       cnt
               FROM (  SELECT index_owner,
                              index_name,
                              listagg (column_name, ',')
                                 WITHIN GROUP (ORDER BY column_position)
                                 indexed_cols
                         FROM dba_ind_columns
                        WHERE index_name='XPKTBL_A'
                     GROUP BY index_owner, index_name))
    SELECT CASE
              WHEN cnt > 1 THEN 'Indexes are different'
              WHEN cnt = 0 THEN 'Indexes dont exist'
              WHEN cnt > 1 THEN 'Indexes are identical'
           END
              commnt
      FROM t
    Result:
    Indexes are different
    but Actually if you check below they are same After when I run this query:
    SELECT index_owner,
             index_name,
             listagg (column_name, ',') WITHIN GROUP (ORDER BY column_position)
                indexed_cols
        FROM dba_ind_columns
       WHERE index_name='XPKTBL_A'
    GROUP BY index_owner, index_name;
    Result:
    Index_owner
    Index_name
    Index_cols
    USER1
    XPKTBL_A
    FIELD_A1
    USER2
    XPKTBL_A
    FIELD_A1

    Hi,
    Erhan_toronto wrote:
    I am using below query to compare two indexes from 2 different users but even though index name and columns are same... result shows me they are different.. what I am doing wrong? Thanks
    WITH t AS
            (SELECT COUNT (DISTINCT index_owner || index_name || indexed_cols)
    So index_owner is 'USER1' in one case, and 'USER2' in the other; right?
    A string that starts with 'USER1' will be distinct from a string that starts with 'USER2', no matter what the rest of the string contains.  Maybe you don't want to compare the owners, or maybe you meant to use some other column (such as table_name) instead of index_owner).
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE, CREATE INDEX and CONNECT statements), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • MS Access - Oraclec 8i: Spaces in Table Names and Columns

    I have an access database that i have split into two parts.
    1. Access data tables
    2. Access application
    The application has the data tables linked in for its use. With your workbench utility i have migrated my access data tables over but there is a big problem remaining. My access data tables have spaces in the table named and columns. In oracle all of the spaces have been replaced with underscores ... which changes things dramtically for the application. A table named "Foo Bar" is fundamentally different in access then "Foo_Bar". So, my question to you is, how can I deal with this issue. There are a lot of queries, forms, reports, etc. effected here. any ideas?

    The Migration Workbench has an option to use
    ANSI names (don't ask me about the exact wording or where it is, haven't got it installed here at work right now :-( )
    Using this option will preserve the original names unaltered. So you could just redo the
    migration step with this option checked.
    In my opinion, this is mixed blessings, though. Using ANSI names will certainly make
    your migration job much easier (no changes to
    Access application necessary) HOWEVER accessing the migrated tables from other
    tools (e.g. SQL*Plus) will be kinda messy.
    Example:
    SELECT "Customer Name"
    FROM "Customer Table"
    WHERE "Customer Id" > 815.
    As always, the choice is yours. grin
    All the best
    Michael Istinger
    null

  • Query to find out the table name and column name..

    Hi Experts,
    I have an Oracle DB in which has more than 50 tables and 100,000 records. I want to get the record which contains *"ITxtVarValue references a non existing text"* the text.
    Is there any query there to find out the table name and column name of this particular record where it reside?
    Please help. Any help will be rewarded.
    Thanks,
    G

    Using this forum's search function, I found a thread that should give you an idea: How to find out a tablename
    C.

  • Check the table and column name in R12 web screen

    Hello Friends
    Please any body can tell me how can I find out the table name and column name in web based forms like supplier, customer in R12. In 11i I can find out the table name and column name from help menu by record history and diagnostic -> examine menu.
    Thansk
    Makshud

    Hi,
    Please see (Note: 741366.1 - How to get Supplier table information? How to get About this Page link in OA page in R12).
    Thanks,
    Hussein

Maybe you are looking for

  • Flash Builder 4.7 bug

    "Note: If you have not changed your code or assets since the last debug IPA package was generated, Flash Builder skips the packaging and debugs the application. That is, you can launch the installed application on your device and click Debug to conne

  • TS4040 Safari giving me headaches. Can't delete bookmarks, etc. Must force quit all the time

    I have a Mac OS X  Lion. I have tried several suggestions as to how to fix my Safari problems...and none have worked. Months ago, I took my computer to the Apple store, they wiped the hard drive, loaded Lion operating system. I reinstalled everything

  • [SOLVED] rxvt-unicode not switching to fullscreen

    Hi there. I just installed rxvt-unicode and wanted to activate the fullscreen toggle. I read on the ArchWiki that I needed the urxvt-fullscreen package from the AUR: https://wiki.archlinux.org/index.php/Rx - Fullscreen After installing it I set the s

  • Save an image file in my phone/ memory-card memory.

    Hi everyone, I want to save a file (an image file) in my phone/ memory-card memory. i've infact captured it from camera and now want to save in the memory not in the RecordStore. What should i do ? Please help me. Thanks in advance

  • HT4623 Getting kicked off an App

    Help! When i am on an App on my Ipad there are many times when I get kicked off and the screen on the ipad goes to the home screen. This is rediculice! What can I do???