What privilege is needed to browse all tables in a schema

I used SQLPlus to login to DB. When I clicked "table" in the left side window, no tables is shown. What privilege is needed to browse all tables in a schema?
Thanks.

SQL*Plus is a command-line interface. There is no side window to click on. Perhaps you're talking about SQL Programmer? Or are you talking about some other tool?
What user are you logging in as? What user owns the objects? Do you just want to see that the tables exist? Or do you want to be able to see the data as well?
Justin

Similar Messages

  • Need to grant DML privileges to all tables in few schemas

    Hi,
    I need to grant DML privileges to all tables in few schemas to a role. How can I achieve that?
    I thought it's below syntax but it doesn't work. Please advice.
    grant ALL ON ALL TABLES IN SCHEMA <Schema_name>  TO <role_name>;Thanks,
    Gangadhar

    GR wrote:
    Hi,
    I need to grant DML privileges to all tables in few schemas to a role. How can I achieve that?
    I thought it's below syntax but it doesn't work. Please advice.
    grant ALL ON ALL TABLES IN SCHEMA <Schema_name>  TO <role_name>;
    There is no single command to grant privileges at that level. There are either ANY privileges or privileges on an object.
    You can write a bit of code to generate and execute what you want, but you would have to rerun it if any new tables were created.

  • Can we export DATA from all tables in a schema?

    Hi,
    I have a question; Can we export all the DATA from all the tables present in the schema to any source (eigther CSV, TXT, DAt, etc..)?
    Or
    Can I have a PL/SQL procedure to display DATA from all Tables in a schema?
    With Best Regards,
    - Naveed

    Hi,
    This is pretty much what you need.
    DECLARE
    V_COUNT NUMBER;
    v_sql varchar2(1000);
    IN_OWNER_NAME VARCHAR2(100) := 'AP' ; -- SCHEMA NAME
    TYPE T_COL_NAME is table of varchar2(1000) index by binary_integer;
    v_col_tbl t_col_name;
    BEGIN
    FOR i in
    (SELECT object_name
    FROM dba_objects
         WHERE owner = IN_OWNER_NAME
         AND object_type ='TABLE'
    and rownum < 2)
    LOOP
    v_sql := 'SELECT COUNT(*) FROM ' || i.object_name ;
    EXECUTE IMMEDIATE v_sql INTO V_COUNT;
    if v_count > 0 then
    v_sql := 'SELECT * FROM ' || i.object_name ;
    select column_name
    bulk collect
    into v_col_tbl
    from DBA_TAB_COLUMNS
    WHERE TABLE_NAME = I.OBJECT_NAME
    AND OWNER = IN_OWNER_NAME;
    -- start selecting the column and exporting using the column names selected.     
    end if;
    if v_col_tbl.count > 0 then
    for i in v_col_tbl.first .. v_col_tbl.last
    loop
    DBMS_OUTPUT.PUT_lINE(v_col_tbl(i));
    end loop;
    end if;
    DBMS_OUTPUT.PUT_lINE( i.object_name || '-' || v_count);
    END LOOP;
    END;
    - Ronel

  • All columns of all table in one schema

    Hi
    All,
    Oralce 10.2.0.3
    I want to count all columns in all the table in one particular schema.
    How can I do that?
    which view i should use to count all cloumns of all tables in particular schema?
    Thanks

    vishal patel wrote:
    we needed for our data conversion project..I don't know how you'll use the number of columns in all a schema for data conversion. Some columns are duplicated (e.g. PK/FK), should they really count for two ?
    A data conversion means you should actually know what are the columns used for, not how many they are.
    one more question that count include hidden columns
    what is hidden column used for ? I can not see those columns in actual table.See here an example :
    Re: Difference btwn user_tab_cols & user_tab_columns
    Nicolas.

  • Text value Search in all tables of a schema

    Hi,
    I have a schema and a lot of tables.
    Now i want to search a given value in all tables and all columns.
    Actully for e.g I have a value 'http://192.168.1.15:8080://....'
    which is to be replaced by 'http://10.15.1.16:8080://.....'
    I need information of all table name and all their respective columns having this value.
    Is their any tool, or sql script which can scan.
    I am using 10g
    Thanks
    Message was edited by:
    [email protected]

    Hi,
    it's quite easy to write a plsql-prog using dynamic sql (if tthe value you've just to
    search varchar cols). I've never heard about a tool for search and replace within a whole schema.
    Torsten

  • Program (PL/SQL) for count the registers of all tables in a schema

    Hi...
    I create a little program , for count the registers of all tables in the schema...
    If you need , send me your email...
    Atte
    Hector

    Hi,
    You can create a script by yourself by executing the script mentioned below:
    Connect as sys or system....
    SQL> spool test.sql
    SQL> select 'select count(*) from '||owner||'.'||table_name||';' from dba_tables;
    SQL> spool off;
    Hope this helps.
    Regards,
    -Praveen.
    http://myracle.wordpress.com

  • How to delete all rows in all tables of a schema in Oracle?

    Hi all,
    I want to delete all records of all tables of a schema and I think there should be some statement for this but I don't know how?
    may you help?
    Edited by: user8105261 on Nov 25, 2009 11:06 PM

    user8105261 wrote:
    Hi all,
    I want to delete all records of all tables of a schema and I think there should be some statement for this but I don't know how?
    may you help?
    Edited by: user8105261 on Nov 25, 2009 11:06 PMA typical way to reset a schema (e.g. to recreate a schema on the test database) is totally different.
    1) Drop the user
    2) recreate the user including table scripts from
    2a) your version control system
    2b) from a export dumpfile using the "nodata" option while importing

  • Droping all tables in a schema

    how to drop all tables in a schema with out logging in that schema and having logged in as sys user?
    Thanks in advance
    Edited by: Prasanna.N on May 17, 2010 11:48 PM

    Prasanna.N wrote:
    Hi,
    i get this error
    ERROR at line 5:
    ORA-06550: line 5, column 9:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
    following:
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted delimited-identifier>
    <a bind variable> << close current delete fetch lock insert
    open rollback savepoint set sql execute commit forall merge
    pipe
    when giving
    begin
    for t in (select table_name from dba_tables where owner = 'SCOTT')
    loop
    execute immediate 'drop table SCOTT.' || t.table_name || 'purge';
    end loop;
    /I just wrote for loop, of course you have to write inside begin..end block:
    begin
    for t in (select table_name from dba_tables where owner = 'SCOTT')
    loop
    execute immediate 'drop table SCOTT.' || t.table_name || '  purge';
    end loop;
    end;
    /

  • Grant select on all table of a schema to role

    Hi , is it possible to grant select on all table on a schema to a role?

    To grant SELECT on all tables of the current schema to particular role or user:
    SELECT 'GRANT SELECT ON '||TABLE_NAME||' TO READ_ONLY_ROLE;' COMMAND
    FROM (
    SELECT TABLE_NAME
    FROM ALL_TABLES
    WHERE OWNER = (SELECT USER FROM DUAL)
    Then copy and execute the result commands, eg:
    GRANT SELECT ON DEPT TO READ_ONLY_ROLE;
    GRANT SELECT ON EMP TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_USERS TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_CUSTOMERS TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_ORDERS TO READ_ONLY_ROLE;

  • A need to view all tables

    A newbie question here:
    I simply would like to see all the tables in the database I am using. How can I be sure that I have them all in front of me so that I can understand better what it is I am manipulating.
    Thanks

    If you want all tables accessible to the current user that you are connected, query all_tables.
    If you want all tables in the database, query dba_tables, but you need to have privilege to select from this view.

  • Need to Audit ALTER, DROP or TRUNCATE on All Tables in a Schema

    Hello,
    I need to audit any ALTER, DROP or TRUNCATE on all tables in the "X" schema including operations done by the "X" account.
    Oracle Version = 11g Release 11.1.0.6.0
    audit_sys_operations = TRUE
    audit_trail = XML, EXTENDED
    Thanks!

    Sky13 wrote:
    Hi Srini;
    After rereading my last post I have to apologize for being obnoxious. I have been trying:
    No apology is necessary - you are not doing me any favors ;-)
    audit alter table; This I get "Audit succeeded" Good - this means that any ALTER TABLE command issued by any user, whether the command is successful or not, will be logged.
    audit truncate table; This I get "ORA-00956: missing or invalid auditing option" I do not have access to a database currently, so cannot verify what is wrong - it looks correct - pl verify syntax.
    >
    I see them both in the documentation you referenced and in another places. I am certain I am missing something.
    Thanks for the help!!!! and again I apologize.You are welcome. I would suggest you experiment in a test database first :-)
    HTH
    Srini

  • What privileges are needed to create a cross-schema view

    For example:
    User A owns T1, T2
    User B wants to create a view using T1 and T2 (join them)
    What privileges does user B need? I have 2 claims:
    1. Create View and SELECT on A.T1 and A.T2 to user B
    2. SELECT WITH GRANT OPTION on A.T1 and A.T2 to user B
    Thanks!

    # 1
    # 2 is required if user B wanted to grant select on that created view to other users.

  • Grant to all tables on my schema

    I am fairly new to Oracle and I need to grant "select, update, insert on all mytalbes to roleone, then grant that role to all my users.
    well, I have about 50 tables and 20 users.
    So far the most automated way I have come up with is:
    grant select, update, insert on table1 to role1;
    then I after that, I do:
    grant role1 to userone;
    I am sure there is a way to do this in some sort of procedure. I dont have DBA privs. I own all of the tables on my schema and those are the ones that I need to grant the privs to users.
    would you guys show me how to do this?
    thanks a bunch!

    You have to grant the privileges on each table to the role and then grant the role to each user, so you need 70 GRANT statements. You can write some dynamic SQL to generate the grants, though
    DECLARE
      sqlStmt VARCHAR2(4000);
    BEGIN
      FOR x IN (SELECT * FROM user_tables)
      LOOP
        sqlStmt := 'GRANT SELECT, UPDATE, INSERT ON ' || x.table_name || ' TO role1';
        EXECUTE IMMEDIATE sqlStmt;
      END LOOP;
    END;
    DECLARE
      sqlStmt VARCHAR2(4000);
    BEGIN
      FOR x IN (SELECT * FROM dba_users)
      LOOP
        sqlStmt := 'GRANT role1 TO ' || x.username;
        EXECUTE IMMEDIATE sqlStmt;
      END LOOP;
    END;Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Query to display all records count of all tables in a schema

    Hi,
    I need to count all the records of all my tables in a certain schema and display the max amount of the record count. Do you have a script for this one??

    SQL> create function countrec(in_tab in varchar2) return number is
      2  retval number;
      3  begin
      4    execute immediate 'select count(*) from '||in_tab into retval;
      5    return retval;
      6  end;
      7  /
    Function created.
    SQL> select table_name, countrec(table_name)
      2  from tabs;
    TABLE_NAME                     COUNTREC(TABLE_NAME)
    QUERY_TOOL_DATA_COLLECTION                        5
    TEST01                                            0
    T1                                               14
    EMP                                              14
    SALGRADE                                          5
    FILES                                             0
    PROVA                                             0
    TEST                                              0
    T_MASTER                                          1
    T_CHILD                                           3
    TAB_ONE                                          30
    TAB_TWO                                          10
    A                                                 3
    B                                                 4
    C                                                 3
    D                                                 3
    BONUS                                             0
    DEPT                                              4
    18 rows selected.Max

  • Searching for a values in all tables in a schema

    Hi All,
    Is there any way/logic to find a value in unknown
    fileds of unknown tables in a schema.
    Just out of curiosity, I am posting this question.
    Thanks in advance.
    Regards,
    Srini

    I already answered to a similar post last week.
    Have a look at this site :
    how do I find in a ViewTable what table has a specific column?
    -- Shailender Mehta --

Maybe you are looking for

  • Problem during automatic PO creation

    Hi,             I have run MRP for a certain material using MD03 .Message shows MRP run successfully.Then I checked the status of this by using transactions MD04 and it shows the PR no for that material.But when I want to create automatic PO through

  • UTL_FILE errors,  invalid directory path ???

    Hi All, I am trying to create a csv output file through pl/sql. However i am having some issues since its my first time. Please have a look at the following code: create or replace PROCEDURE amer_main_proc (start_sent_date date,                     e

  • Moved to a new address - Activate without a Technician?

    I moved to a new apartment within the same building as my old apartment.  The apartments are FiOS Ready, so I don't have to worry about running wires, installing an ONT, etc.   In fact, the apartments were wired with ethernet ports specifically for F

  • Free download, and install question

    Free download, and install question. I need to buy a larger h/d, but till then I would like to put as many programs as possible on a external usb drive that I have hooked up to my PC.  I've been able to do this with some other programs, and would lik

  • Blackberry Desktop MGR update

    How do you update BB Desktop Mgr? With or without my 8520 Curve phone attached to the PC, it shows "Blackberry Curve 8520" and it seems to show on the 'home' page all the 8520 data. It says software version 4.6.1.286 (assuming this is for the 8520).