Get list of accessible tables in schema

I need get list of table which i have select rights.
1. I try it throught select clausule from tables all_tab_privs and all_tables but it is possible that user has no access to this table. How can i get tables of accessible tables to actual logged user with using this system tables?
2. I try it with full access to oracle system, but i had a lot of problems.
E.g. : I created new table 'TEST'.
When:
SELECT * FROM all_tab_privs where table_name='TEST';
No results.
I don't understand. I thought that i should get row with owner etc. Maybe i make or think something wrong. Can somebody help me?
Thanks.

1. I try it throught select clausule from tables
all_tab_privs and all_tables but it is possible that
user has no access to this table. How can i get
tables of accessible tables to actual logged user
with using this system tables?ALL_TABLES for all tables which current user can access
USER_TABLES for all tables which current user is owner
To access to table into all_tables, perhaps have you need to prefix by username if you haven't synonym
SQL> SELECT table_name, owner FROM all_tables ;
RCVER                          RMAN
  1* select * from RCVER
SQL> /
select * from RCVER
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> ed
Wrote file afiedt.buf
  1* select * from rman.RCVER
SQL> /
VERSION
09.02.00
1 row selected.
SQL>
SQL> >
2. I try it with full access to oracle system, but i
had a lot of problems.
E.g. : I created new table 'TEST'.
When:
SELECT * FROM all_tab_privs where table_name='TEST';
No results.
Because your table has no right for other user
S SQL> create table titi(n number);
Table created.
SQL> SELECT * FROM all_tab_privs where table_name = 'TITI';
no rows selected
SQL> grant select on titi to system;
Grant succeeded.
SQL> SELECT * FROM all_tab_privs where table_name = 'TITI';
GRANTOR                        GRANTEE                        TABLE_SCHEMA                   TABLE_NAME        
SCOTT                          SYSTEM                         SCOTT                          TITI              
1 row selected.
SQL> Nicolas.

Similar Messages

  • Thru OEM get list of queries and their schemas that accessed my objects

    Hi,
    I have a list of objects on my schema and i need to track the list of sql queries by different users that accessed by object during this time period.
    i haven't enabled any auditing yet.
    is there any way i can get that list of queries and their schemas that accessed those particular objects during a particular time period through OEM.
    Can someone guide me please.
    Thanks in advance.
    Philip.

    create a name property in your class and assign a name property to your instances (either in the contructor) and/or using getters/setters.  (you'll need a getter anyway.)

  • Getting list of base tables of view

    Hi,
    how to find the list of base tables of some partuicular view ?

    Try this
    SQL>desc user_dependencies
    Name                                      Null?    Type
    NAME                                      NOT NULL VARCHAR2(30)
    TYPE                                               VARCHAR2(18)
    REFERENCED_OWNER                                   VARCHAR2(30)
    REFERENCED_NAME                                    VARCHAR2(64)
    REFERENCED_TYPE                                    VARCHAR2(18)
    REFERENCED_LINK_NAME                               VARCHAR2(128)
    SCHEMAID                                           NUMBER
    DEPENDENCY_TYPE                                    VARCHAR2(4)

  • Derby Embedded get list of all tables

    I am writing a small program that uses derby embedded to store schedules for teachers. Each teacher will have their own table and I want to use the teacher name for the table name and allow the teacher to be selected from the combo box. I have an SQL statement i'd to have return all the current tables, but i think i am doing something wrong:
    public static String[] getTeacherNames() {
            String[] tableNames = null;
            String tableFind = "select APP.schemaname || '.' || Schedule.tablename"+
                                 "from sys.systables Schedule, sys.sysschemas APP"+
                                 "where Schedule.schemaid = APP.schemaid"+
                                      "and Schedule.tabletype = 'T'"+
                                 "order by APP.schemaname, Schedule.tablename";
            String protocol = "jdbc:derby:";
            String dB = "Schedule";
            Connection con;
            Statement stmt;
    try {
                    con = DriverManager.getConnection(protocol + dB +
                            ";create=true", "app", "app");
                    stmt = con.createStatement();                                   
                    ResultSet rs = stmt.executeQuery(tableFind);
                    ResultSetMetaData rsmd = rs.getMetaData();
                    int rowCount = 0;
                    while (rs.next()) {
                            tableNames[rowCount] = rs.getNString(rowCount);                      
                            rowCount++;
                    stmt.close();
                    con.close();
                } catch(SQLException ex) {
                        System.err.print("SQLException: ");
                        System.err.println(ex.getMessage());
                return tableNames;                
        }can anyone help, or have any better ideas? I modified the statement from the one i found on the derby Wiki.

    like this?
    String[] getNamesArray = {"%"};
            String[] tableNames[] = null;
            String protocol = "jdbc:derby:";
            String dB = "Schedule";
            Connection con;
            Statement stmt;
    try {
                    con = DriverManager.getConnection(protocol + dB +
                            ";create=true", "app", "app");
                    DatabaseMetaData dbmd = con.getMetaData();
                   tableNames = dbmd.getTables("%");                   
                    con.close();
         } catch(SQLException ex) {
                System.err.print("SQLException: ");
                System.err.println(ex.getMessage());
                return tableNames;                
        }the DatabaseMetaData will only except the names of tables I already know? I've been messing with it for a while and can't seem to get it to be happy with what I am giving it.

  • List of Configuration Tables

    Hi,
    How is possible to get a complete list of all Configuration tables across all modules?
    Regards,

    Hello,
    Go to SE11 and search in table DD02VV. You get list of all tables in SAP. You can sort and search by T,S etc.....
    Hope this helps
    Rgds
    Rajendra
    Pls assign points if useful

  • Getting list of populated database tables only

    Hi, recently started a new company and new to Oracle 10g. The database system they have has around 5000 tables. The majority of these are not used (it is an off the shelf package). What I am trying to do is get a list of all tables in the database BUT only those that contain records (not the empty tables) and then copy this to an excel spreadsheet. We use a tool called aquadata to run sql enquiry statements on.

    You didn't understand that reply. You could just spool this into a file with a .csv extension, and then open the file with excel.
    SQL> set head off
    SQL> spool xyz.csv
    SQL> select table_name from dba_tables where num_rows > 0;
    SQL> exit
    $ more xyz.csvEdit: And this is even easier: http://laurentschneider.com/wordpress/2007/05/export-to-excel.html
    Edit 2: All answers you are likely to get around here assume you use the built in Oracle tool called sqlplus. Many people think using the built in command line tool is much better for administrative tasks than some other tool. If you must do it in some other tool, you should ask how to do it whereever that tool is supported.
    Edit 3: You got an answer to the question you asked, but it could be your idea of "database" is what we call "schema" or "user." If you aren't logging in as a dba (which you shouldn't if you don't know the basic concepts, which you can and should read in the concepts guide), there is a similar table called "user_tables" in each schema, as well as one called "all_tables," which differs from user_table in that you may have been granted access to other user's tables. It may be in your tool, you could select table_name from user_tables where row_count > 0; and simply cut and paste that into excel. Or not. If you use dba_tables, you probably also want to select owner, table_name.
    Edited by: jgarry on Feb 9, 2012 9:31 AM
    Edited by: jgarry on Feb 9, 2012 9:38 AM
    Edited by: jgarry on Feb 9, 2012 10:58 AM

  • If Records of different list items are entered, then the data is not getting inserted in the table.

    Hi Everyone,
    A Very Very Happy, Fun-filled, Awesome New Year to You All.
    Now coming to the discussion of my problem in Oracle Forms 6i:
    I have created a form in which the data is entered & saved in the database.
    CREATE TABLE MATURED_FD_DTL
      ACCT_FD_NO    VARCHAR2(17 BYTE)               NOT NULL,
      CUST_CODE     NUMBER(9),
      FD_AMT        NUMBER(15),
      FD_INT_BAL    NUMBER(15),
      TDS           NUMBER(15),
      CHQ_NO        NUMBER(10),
      CREATED_DATE  DATE,
      CREATED_BY    VARCHAR2(15 BYTE),
      PREV_YR_TDS   NUMBER(15),
      ADD_FD_AMT    NUMBER(15),
      DESCRIPTION   VARCHAR2(100 BYTE),
      P_SAP_CODE    NUMBER(10),
      P_TYPE        VARCHAR2(1 BYTE)
    The form looks like below:
    ENTER_QUERY     EXECUTE_QUERY     SAVE     CLEAR     EXIT
    ACCT_FD_NO
    CUST_CODE
    FD_AMT
    FD_INT_BAL
    PREV_YR_TDS
    TDS
    ADD_FD_AMT
    P_SAP_CODE
    P_TYPE
    CHQ_NO
    DESCRIPTION
    R
    W
    P
    List Item
    There are 5 push buttons namely ENTER_QUERY, EXECUTE_QUERY, SAVE, CLEAR, EXIT.
    The table above is same as in the form. All the fields are text_item, except the P_TYPE which is a List_Item ( Elements in List Item are R, W & P).
    The user will enter the data & save it.
    So all this will get updated in the table MATURED_FD_DTL .
    I am updating one column in another table named as KEC_FDACCT_MSTR.
    and
    I want this details to get updated in another table named as KEC_FDACCT_DTL only if the P_TYPE='P'
    CREATE TABLE KEC_FDACCT_DTL
      FD_SR_NO                NUMBER(8)             NOT NULL,
      FD_DTL_SL_NO            NUMBER(5),
      ACCT_FD_NO              VARCHAR2(17 BYTE)     NOT NULL,
      FD_AMT                  NUMBER(15,2),
      INT_RATE                NUMBER(15,2),
      SAP_GLCODE              NUMBER(10),
      CATOGY_NAME             VARCHAR2(30 BYTE),
      PROCESS_YR_MON          NUMBER(6),
      INT_AMT                 NUMBER(16,2),
      QUTERLY_FD_AMT          NUMBER(16,2),
      ITAX                    NUMBER(9,2),
      MATURITY_DT             DATE,
      FDR_STAUS               VARCHAR2(2 BYTE),
      PAY_ACC_CODE            VARCHAR2(85 BYTE),
      BANK_CODE               VARCHAR2(150 BYTE),
      NET_AMOUNT_PAYABLE      NUMBER,
      QUATERLY_PAY_DT         DATE,
      CHEQUE_ON               VARCHAR2(150 BYTE),
      CHEQUE_NUMBER           VARCHAR2(10 BYTE),
      CHEQUE_DATE             DATE,
      MICR_NUMBER             VARCHAR2(10 BYTE),
      PAY_TYPE                VARCHAR2(3 BYTE),
      ADD_INT_AMT             NUMBER(16,2),
      ADD_QUTERLY_FD_AMT      NUMBER(16,2),
      ADD_ITAX                NUMBER(16,2),
      ECS_ADD_INT_AMT         NUMBER(16),
      ECS_ADD_QUTERLY_FD_AMT  NUMBER(16),
      ECS_ADD_ITAX            NUMBER(16)
    So for the push button 'Save' , i have put in the following code in the Trigger : WHEN BUTTON PRESSED,
    BEGIN
         Commit_form;
              UPDATE KEC_FDACCT_MSTR SET PAY_STATUS='P' WHERE ACCT_FD_NO IN (SELECT ACCT_FD_NO FROM MATURED_FD_DTL);
              UPDATE MATURED_FD_DTL SET CREATED_DATE=sysdate, CREATED_BY = :GLOBAL.USER_ID WHERE ACCT_FD_NO = :acct_fd_NO;
    IF :P_TYPE='P' THEN
         INSERT INTO KEC_FDACCT_DTL
              SELECT FD_SR_NO, NULL, MATURED_FD_DTL.ACCT_FD_NO, FD_AMT, INT_RATE, P_SAP_CODE,
                   GROUP_TYPE, (TO_CHAR(SYSDATE, 'YYYYMM'))PROCESS_YR_MON,
                   FD_INT_BAL, (FD_INT_BAL-MATURED_FD_DTL.TDS)QUTERLY_FD_AMT , MATURED_FD_DTL.TDS,
                   MATURITY_DATE, P_TYPE, NULL, NULL, (FD_INT_BAL-MATURED_FD_DTL.TDS)NET_AMOUNT_PAYABLE,
                   NULL, NULL, CHQ_NO, SYSDATE, NULL, 'CHQ', NULL, NULL, NULL, NULL, NULL, NULL
              FROM MATURED_FD_DTL, KEC_FDACCT_MSTR
         WHERE KEC_FDACCT_MSTR.ACCT_FD_NO=MATURED_FD_DTL.ACCT_FD_NO;
    END IF;
    COMMIT;
         MESSAGE('RECORD HAS BEEN UPDATED AS PAID');
         MESSAGE(' ',no_acknowledge);
    END;
    If P_TYPE='P' , then the data must get saved in KEC_FDACCT_DTL table.
    The problem what is happening is,
    If i enter the details with all the records as 'P' , the record gets inserted into the table KEC_FDACCT_DTL
    If i enter the details with records of 'P' and 'R' , then nothing gets inserted into the table KEC_FDACCT_DTL.
    Even the records with 'P' is not getting updated.
    I want the records of 'P' , to be inserted into table KEC_FDACCT_DTL, even when multiple records of all types of 'P_Type' (R, w & P) are entered.
    So, can you please help me with this.
    Thank You.
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    Oracle Forms Builder 6i.

    Its not working properly.
    At Form_level_Trigger: POST_INSERT, I have put in the following code.
    IF :P_TYPE='P'THEN
      INSERT INTO KEC_FDACCT_DTL
      SELECT FD_SR_NO, NULL, MATURED_FD_DTL.ACCT_FD_NO, FD_AMT, INT_RATE, P_SAP_CODE,
      GROUP_TYPE, (TO_CHAR(SYSDATE, 'YYYYMM'))PROCESS_YR_MON,
      FD_INT_BAL, (FD_INT_BAL-MATURED_FD_DTL.TDS)QUTERLY_FD_AMT , MATURED_FD_DTL.TDS,
      MATURITY_DATE, P_TYPE, NULL, NULL, (FD_INT_BAL-MATURED_FD_DTL.TDS)NET_AMOUNT_PAYABLE,
      NULL, NULL, CHQ_NO, SYSDATE, NULL, 'CHQ', NULL, NULL, NULL, NULL, NULL, NULL
      FROM MATURED_FD_DTL, KEC_FDACCT_MSTR
      WHERE KEC_FDACCT_MSTR.ACCT_FD_NO=MATURED_FD_DTL.ACCT_FD_NO;
      END IF;
    MESSAGE('RECORD HAS BEEN UPDATED AS PAID');
    MESSAGE(' ',no_acknowledge);
    It worked properly when i executed first time, but second time , in database duplicate values were stored.
    Example: First I entered the following in the form & saved it.
    ACCT_FD_NO
    CUST_CODE
    FD_AMT
    FD_INT_BAL
    PREV_YR_TDS
    TDS
    ADD_FD_AMT
    P_SAP_CODE
    P_TYPE
    CHQ_NO
    DESCRIPTION
    250398
    52
    50000
    6000
    0
    600
    0
    45415
    P
    5678
    int1
    320107
    56
    100000
    22478
    3456
    2247
    0
    45215
    R
    456
    320108
    87
    50000
    6500
    0
    650
    0
    21545
    W
    0
    In the database, in table KEC_FDACCT_DTL, the ACCT_FD_NO:250398 with P_TYPE='P' record was inserted.
    ACCT_FD_NO
    P_TYPE
    250398
    P
    But second time, when i entered the following in the form & saved.
    ACCT_FD_NO
    CUST_CODE
    FD_AMT
    FD_INT_BAL
    PREV_YR_TDS
    TDS
    ADD_FD_AMT
    P_SAP_CODE
    P_TYPE
    CHQ_NO
    DESCRIPTION
    260189
    82
    50000
    6000
    0
    600
    0
    45415
    P
    5678
    interest567
    120011
    46
    200000
    44478
    0
    4447
    0
    45215
    R
    456
    30191
    86
    50000
    6500
    0
    650
    0
    21545
    W
    56
    In the database, in the table KEC_FDACCT_DTL, the following rows were inserted.
    ACCT_FD_NO
    P_TYPE
    250398
    P
    250398
    P
    260189
    P
    320107
    R
    320108
    W
    There was duplicate of 250398 which i dint enter in the form second time,
    All the other P_TYPE was also inserted , but i want only the P_TYPE='P' to be inserted into the database.
    I want only those records to be inserted into the form where P_TYPE='P' and duplicate rows must not be entered.
    How do i do this???

  • How to find the list of existing tables in a schema using DB link?

    Hi
    I know how to find the list of existing tables in a schema using the following query
    SQL> select * from tab;
    but, how to list the tables using a DB link?
    For Example
    SQL> select * from tab@dblink_name;
    why this doesn't work?
    Pl advice me
    Thanks
    Reddy.

    ORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
    The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link?

  • Newbie ques : How to get the list of all tables in the database

    Hi,
    I'm very new to Oracle (using Oracle8i currently). I wanted to know if there is a way to get the list of all tables in the database. Like in mySQL you can use the command " show tables" to get the list of all the tables.
    Any help will e greatly appreciated. Please "cc" any reply to [email protected] also.
    thanks
    Deven

    Hi
    Select table_name, owner from all_tables;
    will give u all the tables in the database.
    all_tables, dba_tables, user_tables
    all_objects, dba_objects, dba_objects
    there are many, more tables. login as system and query the tab and try to describe the tables.
    Thanks
    Malar

  • How to get list of tables used in packages

    Dear All
    Can you pls tell me how to get list of tables used in packages
    Regards

    select referenced_name
      from user_dependencies
    where name = 'your_package'
       and referenced_type = 'TABLE'Regards,
    Rob.

  • Getting list of reports  and related tables used in those reports using sdk

    some columns are changing in the database tables.
    we like to know how many reports are affected by that .
    please can any one help me in getting list of reports and tables associated with them using  bo sdk.
    thanks for your help in advance

    Open the report with RAS. Then with the ReportClientDocument object:
    oReportClientDocument.getDatabaseController().getDatabase().getTables() will trutns Tables collection object that contains the table information for the report. Then use get() to get Itable object.

  • Query to find out list of the tables getting selected frequently

    Hi All,
    Please tell me Is there any way to find out list of the tables getting selected frquently, ( please exclude the insert+updates+deletes+truncate+drop).
    Regards

    Hi Sameer
    You can check V$SQL_PLAN to see the objects being accessed by your SQL statements. If you have diagnostic licence, you can also check DBA_HIST_SQL_PLAN
    select distinct object_owner, object_name from v$sql_plan;
    select object_name, count(*) from v$sql_plan group by object_nameRemeber, this is only a crude way of finding this information.
    Regards
    Venkat

  • Table to get the list of all tables in the database

    hi,
    please let me knwo the table where i can get the list of all tables in the database

    hi,
    please let me knwo the table where i can get the list
    of all tables in the databaseHi Michael,
    Will you EVER start reading some documentation?
    I guess it's not far that many regulars won't reply to those kind of questions.
    Believe me, reading doesn't hurt (well, at least, most of the times).
    Rgds,
    Guido

  • How to get emp and dept tables of scott schema if they acdientally deleted

    Hii I accedentally modifiled emp and dept tables in scott schema.... Can you please tell how to recreate fresh emp and dept tables ? is there any way to get emp and dept tables? please help regarding this

    If you are on Oracle 10g version...
    The demo tableds under scott schema can be created using oracle supplied script.
    http://www.oracle.com/technology/sample_code/tech/sql_plus/htdocs/demobld.html
    Alternatively, this script exists in $ORACLE_HOME/sqlplus/demo directory.
    vr,
    Sudhakar B.

  • Query to get list of linked server tables referenced inside a stored procedure

    Hi,
    SQL Server 2005 sp4
    I have a requirement to get list of linked server tables referenced insider a stored procedure
    Ex:
    Databases       DB1          DB2
    Tables:            T1             T2                            
    Use DB1
    Go
    Create proc P1
    begin
    select * from T1
    select * from DB2.dbo.T2
    end
    I am looking for a query which can return a result with output as below. sp_depends is not helping here as it does not work for cross DB objects, any other thoughts.
    Tables
    T1,
    DB2.dbo.T2

    On SQL 2005, you will have to do it manually.
    On SQL 2008 or later, you could have used sys.sql_expression_dependencies.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • How can I write to text file colorful texts

    I save system events in a text file,for example when system give warning message i want to write it red

  • Troubleshooting Electronic Signature in Adobe X Standard

    Trying to assist a coworker in setting up an electronic signature with password.  When walking her through the screens, I noticed the "Add Digital ID" popup box does not show "Key Algorith" or "Use digital ID for" sections (mine does).  She does not

  • Set Page Title of Identity manager susten

    Hi Folks, I want to change pagetitle("Identity manager") to my application name. I get setStyleSheetsAndTitle.jsp in which we have option to edit page title. <title><%=p.getPageTitle()%></title> IDM document says that it Generates navigation accordin

  • How to print the rows vertically

    Hi how to print the results vertically, like this SELECT eno, ename, deptid FROM emp_asign WHERE ROWNUM<3 ENO     104 ENAME     Bruce Ernst DEPTID     60 ENO     106 ENAME     Maximus DEPTID     60

  • Help with mic problems please!

    Currently I have a Sound Blaster Audigy2 ZS sound card with I-Trigue L3500 speakers. I have had this system for a bit now and have never needed to use a mic till recently. The system has a wired volume/bass control that plugs directly into the sub. I