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

Similar Messages

  • 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.

  • How to find when index was created in the database.

    Hi,
    Please help me, how to find when index was created in the database. It should give with date and time.
    Thanks... Bakser

    Please help me, how to find when index was created in the database. It should give with date and time.DBA_/ALL/User_objects Created
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(128)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                           DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    select OBJECT_NAME,TIMESTAMP,CREATED  from ALL_OBJECTS where OWNER='OWNERNAME' AND OBJECT_NAME='OBJECT_NAME' AND OBJECT_TYPE='INDEX';Edited by: Anantha on Apr 21, 2009 3:18 PM
    Edited by: Anantha on Apr 21, 2009 3:19 PM

  • Report to find all table and index sizes

    Hi all,
    Good day..
    Is there any report.sql or so to find out the sizes of all the tables and indexes in a database.
    thanks,
    baskar.l

    1.To get table size
    What will be the table size if?
    <or>
    break on report
    set line 200
    COMPUTE SUM LABEL "Total Reclaimable Space" OF "KB Free Space" ON REPORT
    column "Table Size" Format a20
    column "Actual Data Size" Format a20
    column "KB Free Space" Format "9,99,999.99"
    select table_name,
    round((blocks*8),2)||'kb' "Table size",
    round((num_rows*avg_row_len/1024),2)||'kb' "Actual Data size",
    pct_free,
    round((blocks*8),2) - (round((blocks*8),2)*pct_free/100) - (round((num_rows*avg_row_len/1024),2)) "KB Free Space"
    from user_tables
    where round((blocks*8),2) - (round((blocks*8),2)*pct_free/100) - (round((num_rows*avg_row_len/1024),2)) > 0
    order by round((blocks*8),2) - (round((blocks*8),2)*pct_free/100) - (round((num_rows*avg_row_len/1024),2)) desc
    2.To get index size
    How to size the Index
    Hth
    Girish Sharma

  • How to find all tables that are associated with a given domain name.

    I want to find all table, excluding the structures, of a given domain name, say, waers.
    Some of the tables are directly contains the domains while others are related with a data element which is connected to that domain.
    I want to find tables for all two case -either tables connected directly to the domain or connected via data element- and exclude the structures.
    thanks in advance.

    Hi,
    The following thing may help you.
    in se11-> search for tables having names like 'DD*'.
    From this list of tables you can find the required table to get domain, data element nad table name.
    one way of doing it:
    SELECT rollname domname
      FROM dd04l
      INTO CORRESPONDING FIELDS OF TABLE it_tab.
    SELECT rollname tabname
      FROM dd03l
      INTO CORRESPONDING FIELDS OF TABLE it_tab1
      FOR ALL ENTRIES IN it_tab
      WHERE rollname = it_tab-rollname.
    SORT it_tab1.
    DELETE ADJACENT DUPLICATES FROM it_tab1.
    LOOP AT it_tab1 INTO wa_tab.
      MODIFY it_tab FROM wa_tab
      TRANSPORTING tabname
      WHERE rollname = wa_tab-rollname.
    ENDLOOP.
    LOOP AT it_tab INTO wa_tab.
      WRITE:/ wa_tab-domname,
              wa_tab-tabname.
    ENDLOOP.
    Regards,
    Manoj Kumar P

  • How to list all  tables that belongs to the current user?

    hi all
    "select tblowner,tblname from tables where tblowner in (select user from dual);"
    I want a list of all tables that belongs to the current user. I use the SQL above, but given "no rows selectd",but if
    I replace the subquery with literal,like
    "select tblowner,tblname from tables where tblowner = 'JFMDB');".
    I got the list. why?
    Thnk u very much!

    This looks like a bug that was fixed in 7.0.5.13 and onwards. I can reproduce what you are seeing in 7.0.5.10.0 (Linux x86-64 / Access control enabled instance from root install) but not 7.0.5.13.0 (Linux x86-64 / Access control enabled instance from root install).
    Unfortunately I don't have a bug number to pass on. I can't see anything relevant listed in the Release Notes and I haven't found a likely candidate in our internal listings. This may well have been one that was fixed "in passing" when RnD were working on something similar.

  • How to find all audio and photo files?

    My system stats say I have 400 megs of photos and 1.95 GB of audio.  I have not put anything on this computer yet.  It's brand new.  I want to erase all the crap I don't need so I have maximum space for shooting photos and videos.  I can't find what this audio and photo crap is from.  I have searched in finder for any format I can think of and I just can't find them.  How can I track down this stuff?
    Also does anybody know roughly how much space is typically used on a brand new Mackbook Pro 15" out of the box with all the OS stuff?
    Thanks.

    There is a program call Grand Perspective that will scan your drive and show where everything is located. You can create filters for the things to scan for and list. It presents a graphical presentation based on file size and location on the drive. Hovering over an item will show the name, size, and where on the hard drive it is located.
    Filtering for Images and Audio, I had 1.95 GB in the Library folder. Most was in the Application Support folder.

  • How to find all doc and docx files ?

    In order to find all my DOC or DOCX documents I tried with Fider - ALL FILES but see no such options  to narrow down this search to only DOC or DOCX
    I tried with .doc and .docx but with bad results
    Once I have the list with my Word documents, I want to search for the word Music inside the files.
    Anyone has a suggestion?
    Also tried with Spotlight, no good either.
    I use Mac OS Lion

    In the Finder, choose Find (Command-F). In the search criteria, choose Kind - is - Other. In the Other text box type "Microsoft Word".
    If you search by extension, such as Name - Ends with - "docx", you will miss files with extension hidden.

  • How to find all Badis and Exits for WS14000145

    Hi all:
          Could you please tell me how to get all the badis and exits for workflow WS14000145 ?
          Thank you very much!!!

    Hello,
    The main BADI corresponding to this workflow (N-step PO BDI workflow) is BBP_WFL_APPROV_BADI.
    Other BADI's whcih might be interesting to you are:
    BBP_WFL_SECUR_BADI --> to control the security level
    BBP_CHNG_AGNT_ALLOW --> To allow/disallow adding/changnig approvers
    BBP_CHNG_AGNT_GET --> Restrict the additional approvers to per-defined list
    Rgds,
    Prasanna

  • How To display a table that resides in the database via JFrame.

    Hi,
    I need to display the contents that present in the table that resides in my database.
    Scenario:
    Im having Main frame window, in that im having a button, while clicking that button a new JFrame should be opened & it should display all the rows & cols of dat table that resides in my DB.
    I have no prob in opening a new JFrame during a button click, but i dont knw how to display table in the table format.
    I tried JTable but i dont know how to pass the data into the JTable.
    Kindly help me out!!!

    JTable relies on a TableModel to deliver data. You have several ways of providing this data:
    - Read it into either a Vector of Vectors (list of rows containing list of columns) or an Object[][] and create the JTable while passing the data.
    - Create a javax.swing.table.DefaultTableModel, pass it to the JTable as a model, configure it and call addRow() in order to add rows.
    - Create a custom table model class; see javax.swing.table.AbstractTableModel for a convenient base class

  • How to capture user name and date in the database

    How to capture the person name who edits the application and the date of edit in the database...
    Pallavi

    Hi
    There are substitution strings you can use for this purpose.
    1.APP_USER ------is the current user running the application
    2.SYSDATE --------represents the current date on the database server
    APP_USER Syntax
    Bind variable------ :APP_USER
    PL/SQL------- V('APP_USER')
    Substitution string---------- &APP_USER.
    SYSDATE_YYYYMMDD Syntax
    Bind variable------- :SYSDATE_YYYYMMDD
    Direct PL/SQL------- APEX_APPLICATION.G_SYSDATE (DATE DATATYPE)
    PL/SQL-------- V('SYSDATE_YYYYMMDD')
    Your application will be based on a table with primary key column. You create a 'before update trigger' on that table and add columns 'UPDATED_ON' and 'UPDATED_BY' to that table. Add the following to that trigger:
    :NEW.UPDATED_ON := SYSDATE;
    SELECT V('APP_USER') INTO :NEW.UPDATED_BY FROM DUAL;
    -Priyanka

  • How to find crm tables and objects in service market place?

    hi
    there is a place or link in www.service.sap.com where we get the information about the objects/tables related to  business partners,products,sales,service and marketing.
    can anyone please provide me that link,information.
    regards,
    hun

    Hello Hun,
    Check out this link,
    Links to CRM Documentation
    May be that was the thread u were searching for...
    Also some of the tables in my knowledge are as follows,
    1. COMM_PRODUCT: Product header and administration data.
    2. CRMC_T077D: customer account groups
    3. CRMD_ORDERADM_I (Item data)
    CRMD_ORDERADM_H: Business Transactions header CRM
    4.CRMD_ACTIVITY_H: Activity
    5.CRMD_OPPORT_H :Opportunity
    6.BUTOO : Customer details
    7.BUT001:BP General data II
    8.BUT100: BP Roles
    9.BUT150: BP relationship: Attribute table (test different
    10.BUT_HIER_TREE Business Partner Group Hierarchy
    11.CDBC_T_PRODUCTID Mapping: Product Id
    12.CDBD_ORGMAN Business transaction - organizational unit - set
    13.COMC_PRODUCT General Product Settings
    14.COMC_R3_FIELDS Assignment of R/3 material master fields to CFOP
    15.COMM_CATEGORY Category
    16.COMM_CFGMAT Basic Data for Materials
    17.COMM_HIERARCHY Category Hierarchy
    18.COMP_TYPES Hierarchy Tool: Comparison Type Check Table
    19.CRMC_CPRICPROC Customer Pricing Procedures
    20.SMOKVBEZ15 Assignment employees to positions
    ==========================================================
    R/3 Tables re CRM:
    1. CRMRFCPAR: CRM Destination.
    2. CRMPRLS: Name of the Logical System for Download(GUID).
    3. CRMCONSUM: Consumer entry (must match consumer of object in R3AC*).
    4. KNA1: Business Partner Master Data.
    5. CRMPARNR: Partner Functions \ Contacts
    6. CRMKUNNR: Business Partner GUIDS
    7. KNVV: Sales Area Data
    8. KNVP: Sales Area Data
    9. KNVK: Contact Person
    10. TBE31 & 34: Events/Enhancement
    11.MARA: Products
    12. CRMFILTAB: Filters
    13. CRMBP_MAP_BUGRP: Mapping of Business Partner Grouping
    14. CRMCLASSIF: Account Groups in Replication into R/3
    15. CRMCONSUM Possible Users R/3 Adapter Functionality
    16.CRMFILFLD Permitted Table Fields for Filtering
    17.CRMFILTAB Filter Criteria for Download
    18.CRMINTBAP Assignment of Internal& External Table FLD
    19.CRMKTOKD Assign Classification and Grouping R/3 Account Groups
    20.CRMKUNNR Mapping Table Business Partner - Customer
    21.CRMMAPTAB: Relationship Between Table Names in CRMOBJTAB (Tables Belonging to One Object) and BAPIMTCS is Middleware Transaction Container Structure
    22.CRMPARNR Mapping Table Business Partner Relationship - Contact Person
    23.CRMPAROLTP CRM OLTP Parameter
    24.CRMQNAMES Queue Name Management for CRM-QRFC Supply
    25.CRMSUBTAB Subscription Table for Up and Download Objects
    26.COM_BUPA_CALL_FU Determining FMs for Data Exchange BP
    27.COM_BUPA_BCSET Central Settings Data Exchange Business Partner
    28.TCRMBP_REFCUST Default Reference Customer
    =========================================================
    CRM Tables:
    1.CRMMLSGUID: GUID entry (should match GUID in CRMPRLS) also its LOGSYS-change-LOG.
    2. CRMM_BUT_CUSTNO: Also GUID table (GUID here should match GUID in R/3 table CRMKUNNR)
    3.SMOFSUBTAB: Mapping & Parameters
    4.SMOFDSTAT: Download Monitor (R4AM1)
    5.SMOFFILTAB: Filters (Should match filters in R3AC1 & R/3 Table CRMFILTAB)
    6.SMOFOBJECT Definition of Objects for Download
    7.SMOFOBJPAR Parent Objects of an Object in Table
    8.SMOFPARSFA Middleware Parameter
    9.SMOFQFIND Queue Finder Table for MW-Queue finder
    10.SMOFTABLES Definition of Tables for Download.
    11. CRM_JEST: Individual Object Status
    12. CRMD_SHIPPING: Business Transaction - Shipping Set
    13. COMM_PRODUCT: Product
    14. CRMD_ORDERADM_H: Business Transaction
    15. COM_TA_R3_ID: R3 Identification
    16. SCAPPTSEG: Folder for Individual Appointments
    17. CRMD_PARTNER: Partners
    18. CRMD_CUSTOMER_H: Transaction - Customer Extension
    ===========================================================
    KindlyReward Graciously if found useful...:)
    Regards,
    Harish

  • How to find out PR and PO with the same requestor and approver

    object class = 'banf'
    object value = PR or PO Number.
    CDPOS - Fname ='FRGZU'
    CDHDR - Object class = CDPOS - Object class and
    CDHDR- Object id = CDPOS - Object id and
    CDHDR - Changenr = CDPOS - Changenr and
    CDPOS - Fname = Frgzu.
    This is the logic can any one help me in getting the code

    HI Param
      I am somewhat confused with your requirement, is it to find the same reqested/ approver or to check the release status of PR/PO as you are using field FRGZU which indicates the release status of PR/PO.
      Anyhow as per below conditions:
      OBJECTCLAS is 'EBAN' for PR and 'EINKBELEG' for PO. Note that itz case-sensitive, hence use upper case.
      OBJECTID is the document number
      Please try to use FM: CHANGEDOCUMENT_READ for the same. This might be more convinient for you. Also try to restrict with date criteria.
    Kind Regards
    Eswar

  • Need to find all Bugs and QF created for 8.0.0.13

    Hi all,
    I kneed to know how to find all bugs and possibly patches/QF created on top of 8.0.0.13 for bugs found in 8.0.0.13 after its release on Jan 2012. This is for my Customer that needs to know if they have to plan some QF in proactive way.
    I can access to Internal Support Portal, so if there is any place where Support people can go I can access.
    Thank you in advance
    Chiara Scarafiotti
    ACS TAM

    Hi radhika,,
    This the the way to go..just modify the col according to your table col names...
    You can do a CONNECT BY query without a START WITH clause to link every node with each of its ancestors.
    Getting the total is just a matter of GROUP BY.
    SELECT emp_id, employee_name, manager_id
    , CASE
              WHEN COUNT (*) = 1
              THEN 0
              ELSE COUNT (*)
         END               AS cnt0
    ,     COUNT (*)      AS cnt1
    FROM employee
    CONNECT BY emp_id     = PRIOR          manager_id
    GROUP BY emp_id, employee_name, manager_id
    ORDER BY emp_id;
    output:
    Output:
    . EMP_ID EMPLOYEE_N MANAGER_ID CNT0 CNT1
    1 Mark 0 5 5
    2 John 1 3 3
    3 Stella 1 0 1
    4 Karen 2 0 1
    5 Andrea 2 0 1
    I made this a bottom-up query (going from each node to its ancestors) rather that a top_down query (node to descendants) because you can't GROUP BY CONNECT_BY_ROOT.
    In your description you implied that each node would be counted among its own descendants, but in the sample output you had 0, not 1, as the count for all the leaves, that is, managers counted as their own descendants, but non-managers did not. The column called count0 in the query above does that; the column count1 counts each node as its own descendant, leaves included.
    Regards
    Onenessboy

  • How to find all open POs and there SUM

    How to find all open POs and there SUM
    Please help.
    Thanks,
    vihar9

    Have you tried looking at the tables, standard reports, or the PO display transaction?  Have you asked your functional analyst or development team lead? This is not a forum to post a requirement and get your job done for you...

Maybe you are looking for