Datapump API: Import all tables in schema

Hi,
how can I import all tables using a wildcard in the datapump-api?
Thanks in advance,
tensai

_tensai_ wrote:
Thanks for the links, but I already know them...
My problem is that I couldn't find an example which shows how to perform an import via the API which imports all tables, but nothing else.
Can someone please help me with a code-example?I'm not sure what you mean by "imports all tables, but nothing else". It could mean that you only want to import the tables, but not the data, and/or not the statistics etc.
Using the samples provided in the manuals:
DECLARE
  ind NUMBER;              -- Loop index
  h1 NUMBER;               -- Data Pump job handle
  percent_done NUMBER;     -- Percentage of job complete
  job_state VARCHAR2(30);  -- To keep track of job state
  le ku$_LogEntry;         -- For WIP and error messages
  js ku$_JobStatus;        -- The job status from get_status
  jd ku$_JobDesc;          -- The job description from get_status
  sts ku$_Status;          -- The status object returned by get_status
  spos NUMBER;             -- String starting position
  slen NUMBER;             -- String length for output
BEGIN
-- Create a (user-named) Data Pump job to do a "schema" import
  h1 := DBMS_DATAPUMP.OPEN('IMPORT','SCHEMA',NULL,'EXAMPLE8');
-- Specify the single dump file for the job (using the handle just returned)
-- and directory object, which must already be defined and accessible
-- to the user running this procedure. This is the dump file created by
-- the export operation in the first example.
  DBMS_DATAPUMP.ADD_FILE(h1,'example1.dmp','DATA_PUMP_DIR');
-- A metadata remap will map all schema objects from one schema to another.
  DBMS_DATAPUMP.METADATA_REMAP(h1,'REMAP_SCHEMA','RANDOLF','RANDOLF2');
-- Include and exclude
  dbms_datapump.metadata_filter(h1,'INCLUDE_PATH_LIST','''TABLE''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/C%''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/F%''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/G%''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/I%''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/M%''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/P%''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/R%''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/TR%''');
  dbms_datapump.metadata_filter(h1,'EXCLUDE_PATH_EXPR','LIKE ''TABLE/STAT%''');
-- no data please
  DBMS_DATAPUMP.DATA_FILTER(h1, 'INCLUDE_ROWS', 0);
-- If a table already exists in the destination schema, skip it (leave
-- the preexisting table alone). This is the default, but it does not hurt
-- to specify it explicitly.
  DBMS_DATAPUMP.SET_PARAMETER(h1,'TABLE_EXISTS_ACTION','SKIP');
-- Start the job. An exception is returned if something is not set up properly.
  DBMS_DATAPUMP.START_JOB(h1);
-- The import job should now be running. In the following loop, the job is
-- monitored until it completes. In the meantime, progress information is
-- displayed. Note: this is identical to the export example.
percent_done := 0;
  job_state := 'UNDEFINED';
  while (job_state != 'COMPLETED') and (job_state != 'STOPPED') loop
    dbms_datapump.get_status(h1,
           dbms_datapump.ku$_status_job_error +
           dbms_datapump.ku$_status_job_status +
           dbms_datapump.ku$_status_wip,-1,job_state,sts);
    js := sts.job_status;
-- If the percentage done changed, display the new value.
     if js.percent_done != percent_done
    then
      dbms_output.put_line('*** Job percent done = ' ||
                           to_char(js.percent_done));
      percent_done := js.percent_done;
    end if;
-- If any work-in-progress (WIP) or Error messages were received for the job,
-- display them.
       if (bitand(sts.mask,dbms_datapump.ku$_status_wip) != 0)
    then
      le := sts.wip;
    else
      if (bitand(sts.mask,dbms_datapump.ku$_status_job_error) != 0)
      then
        le := sts.error;
      else
        le := null;
      end if;
    end if;
    if le is not null
    then
      ind := le.FIRST;
      while ind is not null loop
        dbms_output.put_line(le(ind).LogText);
        ind := le.NEXT(ind);
      end loop;
    end if;
  end loop;
-- Indicate that the job finished and gracefully detach from it.
  dbms_output.put_line('Job has completed');
  dbms_output.put_line('Final job state = ' || job_state);
  dbms_datapump.detach(h1);
exception
  when others then
    dbms_output.put_line('Exception in Data Pump job');
    dbms_datapump.get_status(h1,dbms_datapump.ku$_status_job_error,0,
                              job_state,sts);
    if (bitand(sts.mask,dbms_datapump.ku$_status_job_error) != 0)
    then
      le := sts.error;
      if le is not null
      then
        ind := le.FIRST;
        while ind is not null loop
          spos := 1;
          slen := length(le(ind).LogText);
          if slen > 255
          then
            slen := 255;
          end if;
          while slen > 0 loop
            dbms_output.put_line(substr(le(ind).LogText,spos,slen));
            spos := spos + 255;
            slen := length(le(ind).LogText) + 1 - spos;
          end loop;
          ind := le.NEXT(ind);
        end loop;
      end if;
    end if;
    -- dbms_datapump.stop_job(h1);
    dbms_datapump.detach(h1);
END;
/This should import nothing but the tables (excluding the data and the table statistics) from an schema export (including a remapping shown here), you can play around with the EXCLUDE_PATH_EXPR expressions. Check the serveroutput generated for possible values used in EXCLUDE_PATH_EXPR.
Use the DBMS_DATAPUMP.DATA_FILTER procedure if you want to exclude the data.
For more samples, refer to the documentation:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/dp_api.htm#i1006925
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/

Similar Messages

  • Question about import all tables except one

    I have exported all tables for a user. While importing I want to import all tables except one table whose name I know. How do I do this? Example: If I have tables: Employee, address, salary that I have exported. While importing I want to import only Employee and address. How do I do this. The database I have exported contains over 20 tables.

    I don't think it is possible at all, you just need to explicitly specify all the tables.
    If you really don't want to include the single table, then you can import all the tables and drop the desired one.
    hare krishna
    Alok

  • Analyzing all tables in schema

    Hello everyone,
    I am used below command to analyze all tables in schema
    EXEC DBMS_STATS.gather_schema_stats (ownname => 'CONTRACT', cascade =>true,estimate_percent => dbms_stats.auto_sample_size);when look at tables in dba_tables, for none of the tables LAST_ANALYZED date is changed to today. But when I did below
    EXECUTE DBMS_STATS.GATHER_TABLE_STATS(ownname => 'CONTRACT', tabname => 'CONT_NAME', method_opt => 'FOR ALL COLUMNS', granularity => 'ALL', cascade => TRUE, degree => DBMS_STATS.DEFAULT_DEGREE);I am see LAST_ANALYZED changed to today in dba_tables.
    If I need to change LAST_ANALYZED to all tables do I need to produce the above command for all tables? There are more then 700 tables for this application.
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    user3636719 wrote:
    EXEC DBMS_STATS.gather_schema_stats (ownname => 'CONTRACT', cascade =>true,estimate_percent => dbms_stats.auto_sample_size);
    and
    EXECUTE DBMS_STATS.GATHER_TABLE_STATS(ownname => 'CONTRACT', tabname => 'CONT_NAME', method_opt => 'FOR ALL COLUMNS', granularity => 'ALL', cascade => TRUE, degree => DBMS_STATS.DEFAULT_DEGREE);are fundamentally different, you cannot compare them. In gather_schema_stats, oracle used most defaults, decided none needed new stats collected, so it didn't do anything. In the second, you changed method_opt, granularity and degree etc from default values (as set in your db perhaps), so db went ahead and collected stats.
    You need to look up manual and try to understand the default and non-default behavior for parameters and then make an educated decision. Changing stats randomly is not generally a great idea.

  • How to delete all TABLEs in Schema SYS which are created since 09:15?

    Unfortunately a script created lots of tables in the wrong Tablespace (=SYSTEM) and Schema (=SYS).
    How can I delete (in one DDL command) all TABLES which are created inTablespace=SYSTEM and SCHEMA=SYS
    during the last 3 hours resp. since 09:15 of 25th Sep 2011 ?
    Alternatively: How can I move these TABLEs to another Schema (e.g. ATEST) and Tablespace (USERS)?
    Is this possible with Oracle XE or only with Oracle Enterprise?
    Peter

    user559463 wrote:
    Unfortunately a script created lots of tables in the wrong Tablespace (=SYSTEM) and Schema (=SYS).
    How can I delete (in one DDL command) all TABLES which are created inTablespace=SYSTEM and SCHEMA=SYS
    during the last 3 hours resp. since 09:15 of 25th Sep 2011 ?
    Alternatively: How can I move these TABLEs to another Schema (e.g. ATEST) and Tablespace (USERS)?
    Is this possible with Oracle XE or only with Oracle Enterprise?
    PeterYou can query dba_objects and join it with dba_tables where tablespace_name='SYSTEM' , then drop the tables result of the query; the idea is to use the following query;
    SQL> select OWNER, OBJECT_NAME from dba_objects where OBJECT_TYPE='TABLE' and OWNER = 'SYS' and CREATED >= sysdate - 3 / 24;Please consider marking your questions as answered, when it is the case;
    Handle:      user559463 
    Status Level:      Newbie
    Registered:      Feb 18, 2007
    Total Posts:      583
    Total Questions:      266 (186 unresolved)Edited by: orawiss on Sep 26, 2011 4:03 PM

  • Fastest way to update column in all tables of schema

    In our schema we have two columns ColA and ColB common in all tables in our schema.
    Suppose these columns have values as below in all tables
    ColA     ColB     
    A1     B11     
    A12     B22     
    ABC     DEF     
    Now we have to update ColA and ColB where we have alphanumeric values in all tables, some tables have few hundred records and some tables have millions of records.
    Could you gurus suggest me with a fastest way to acheive this.
    What we are thinking is to write a procedure where we can input multiple tables which could be updated simultaneously and make a collection within procedure with following values
    ColA     ColA_R     ColB     ColB_R     
    A1     aa     B11     bb     
    A12     aaa     B22     bbb     
    ABC     No Update DEF     No Update     
    So whenever we have value matching A1 update it with value aa if we have value matching B11 update it with value bb and so on.
    Your inputs are welcome so that to acheive this in fastest manner.
    Thanks,
    Tony
    Edited by: tony29743 on Nov 9, 2010 9:15 AM

    I would be tempted to do it something like this:
    Create an index organized table for the cola updates (old_val, new_val) with a PK on old_val and another one for the colb Values. This could possibliy be a single table, depending on how many distinct values there were for cola and colb and if you are sure that "But if colA and colB have value A1 then it will be updated with aa".
    Then do the updates as an updateable join view something like:
    UPDATE (SELECT t1.cola, iot.new_val
            from tab1 t1, new_values_iot iot
            where t1.cola = iot.old_val)
    SET cola = new_valThis would require two rounds of updates, one for cola and one for colb, but they could be parallelized somewhat by distributing the tables to be updated through several pl/sql blocks each updating a different set of tables.
    You may be able to do it in a single query like:
    UPDATE (SELECT t1.cola, t1.colb, iota.new_val new_vala, iotb.new_val new_valb
            from tab1 t1, new_values_iot iota, new_values_iot iotb,
            where t1.cola = iota.old_val and
                  t1.cola = iotb.old_val)
    SET cola = new_vala,
        colb = new_valbHowever, given that you said there were some values in both cola and colb that did not require updating, that may not work since the join will fail on one of cola or colb if that value is not in the IOT, so you will not get all of the rows updated. If, and it is a big if, either both of cola and colb or neither of cola annd colb need to be updated in a single row, it might work. So, looking at your original examples (ABC and DEF do not require updates but A1 does), if there could be as case where cola = 'A1' and colb = 'DEF' then you will have to do it in two updates per table.
    John

  • Avoid trigger on all tables in schema

    I need to set a CREATE TIME STAMP to the database server timestamp (not the session timestamp) in all tables in a schema for both create and update. Other than creating a trigger on all the tables in the schema is there a less tedious way to do that?
    Similarly I need to to set columns such as CREATE_USER, LAST_UPDATE_USER.
    Thanks in anticipation.

    You can easily generate the DDL to add the new columns.
    As far as populating the columns your choices are either use table befire insert and update triggers to populate the columns or have the application provide the necessary information.
    The basic trigger logic would be pretty well the same for all the tables so writing a little SQL or PL/SQL to generate the trigger code should be pretty straight forward.
    Depending on your application, such as web based with only one Oracle user, you may need to obtain the real user via dbms_application_info set by the application server based logic.
    HTH -- Mark D Powell --
    Edited by: Mark D Powell on May 5, 2010 7:48 AM

  • Truncate all tables in schema

    Hi,
    I want to truncate all tables (300 tables) in a schema. There are some enabled constraints in this schema. I want to keep all tables attached objects (like indexes, constraints, etc). I’d like to create a procedure to do this job. What's the safe and right way for this?
    I am thinking as follows:
    1- Retrieve all user constraints name using user_constrants view and then disable them.
    2- Retrieve all user tables name using user_tables view and then Truncate them.
    3- Enable all constraints that were disabled in step 1.
    Is this a safe and right way?
    Let me know your thought please. Thanks.

    The table was probably created using double qoutes.
    declare
    v_new_tab_name varchar2(35);
    for c1 in (select table_name from user_tables) loop
       begin
           execute immediate ( 'truncate table '||C1.Table_Name );
       exception
          when others then
              v_new_tab_name := '"' || C1.Table_Name|| '"' ;
              execute immediate (' truncate table '||v_new_tab_name) ;
       end ;
    end loop;
    end;

  • Datapump - expdp.open creates tables in schema

    Hi
         i am using datapump in Oracle 10g to archive old partitions from the main schema to another schema.
    i notice that when dbms_datapump.open is called that a new table is created by dbms_datadpump for internal purposes. This is verified in the oracle documentation
    http://docs.oracle.com/cd/B12037_01/appdev.101/b10802/d_datpmp.htm#997383
    Usage Notes
    When the job is created, a master table is created for the job under the caller's schema within the caller's default tablespace. A handle referencing the job is returned that attaches the current session to the job. Once attached, the handle remains valid until either an explicit or implicit detach occurs. The handle is only valid in the caller's session. Other handles can be attached to the same job from a different session by using the ATTACH procedure.
    Does anybody know whether this table can be removed by a  "cleanup" Oracle dbms_datapump call, or whether it has to be cleaned up manually.

    can confirm thats what you do
    v_job_handle:= DBMS_DATAPUMP.OPEN('EXPORT', 'TABLE', NULL, v_job_name);
    -- Set parallelism to 1 and add file
    DBMS_DATAPUMP.SET_PARALLEL(v_job_handle, 1);
    DBMS_DATAPUMP.ADD_FILE(v_job_handle, v_job_name || '_' || v_partition.partition_name || '.dmp', 'PARTITION_DUMPS');
    -- Apply filter to process only a certain partition in the table
    DBMS_DATAPUMP.METADATA_FILTER(v_job_handle, 'SCHEMA_EXPR', 'IN(''SIS_MAIN'')');
    DBMS_DATAPUMP.METADATA_FILTER(v_job_handle, 'NAME_EXPR', 'LIKE ''' || t_archive_list(i) || '''');
    DBMS_DATAPUMP.DATA_FILTER(v_job_handle, 'PARTITION_EXPR', 'IN (''' || v_partition.partition_name || ''')', t_archive_list(i), 'SIS_MAIN');
    -- Use statistics (rather than blocks) to estimate time.
    DBMS_DATAPUMP.SET_PARAMETER(v_job_handle,'ESTIMATE','STATISTICS');
    -- Start the job. An exception is returned if something is not set up properly.
    DBMS_DATAPUMP.START_JOB(v_job_handle);
    -- The export job should now be running. We loop until its finished
    v_percent:= 0;
    v_job_state:= 'UNDEFINED';
    WHILE (v_job_state != 'COMPLETED') and (v_job_state != 'STOPPED') LOOP
         DBMS_DATAPUMP.get_status(v_job_handle,DBMS_DATAPUMP.ku$_status_job_error + DBMS_DATAPUMP.ku$_status_job_status + DBMS_DATAPUMP.ku$_status_wip,-1,v_job_state,sts);
         js:= sts.job_status;
         -- As the percentage-complete changes in this loop, the new value displays.
       IF js.percent_done != v_percent THEN
              v_percent:= js.percent_done;
         END IF;
    END LOOP;
    -- When the job finishes, display status before detaching from job.
    PRC_LOG(f1, t_archive_list(i) || ': Export complete with status: ' || v_job_state);
    -- DBMS_DATAPUMP.DETACH(v_job_handle);
    -- use STOP_JOB instead of DETACH otherwise the "master table" which is created when OPEN is called will not be removed.
    DBMS_DATAPUMP.STOP_JOB(v_job_handle,0,0);

  • Importing all tables and users from Oracle 8i database to Oracle 10g

    Hi friends,
    It would be highly appreciated if someone would kindly advise steps needed to
    import full Oracle 8i database ( with all users, tables, table spaces
    and other components ) to Oracle database 10g .
    Thanks and regards

    hi
    ur exp ur database from oracle 10g. from exp cmd instead of expdp cmd bcoz oracle 10g. expdp cmd is not compitable with oracle 8.
    simple give cmd>exp cmd if u want exp complete database from oracle 10g..
    if u have any problem go reference oracle database utilities ....
    and then imp in oracle 8 using imp cmd cmd>imp cmd bcoz here u want imp complete database....
    i hope u do ur work successfully...
    regards
    Mohammadi

  • Trigger for logging changes(DML changes) for All tables in Schema

    Hi ,
    Is there a way to create a schema level trigger to audit the DML changes that affect all the tables.I need the output in my log table as
    1) the table name on which the DML occurred
    2) type of DML
    3) column names affected.
    I know this can be achieved through enabling AUDIT or by creating dynamically, triggers for each tables...
    Is there a way to create a single trigger to achieve this??

    It's not possible to create DML trigger on schema level
    I think the only way is to create the triggers dynamically for each table..
    Re: Schema level Database triggers by Kamran Agayev
    Edited by: jeneesh on Oct 12, 2012 6:39 PM

  • Export all tables in schema using exp utility

    I need to export all the tables in a schema based on a where clause, how can I do this without having to identify all the tables in the tables= parameter?

    You can get all the tables by doing a user-level export, i.e.
    exp scott/tiger@TNS_name owner=scottwill export all Scott's tables. If you need to export only some of the tables owned by a particular user, you're stuck giving an explicit list until 10g.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Select from all tables in schema

    hi, i am trying to x,y from tables in a schema, getting "missing expression" error, working with oracle 11g.
    declare
    v_sql varchar2(4000);
    v_x number;
    v_y number;
    v_n number;
    begin
    for rec in (select table_name as table_name from all_tables where table_name like '%AM_%' ORDER BY 1) loop
    v_sql := 'select a.idnumber, t.x, t.y, table(sdo_util.getvertices(a.geometry)) t FROM '||rec.table_name ||' a';
    EXECUTE IMMEDIATE v_sql INTO v_n, v_x, v_y;
    dbms_output.put_line(v_n||v_x||v_y);
    end loop;
    end;

    hi two rows, with idnum and geometry columns...
    IDNUM
    GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    GD8
    SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARR
    AY(-.48230432, 51.4645609, -.47600566, 51.464582, -.47206108, 51.4645953, -.4654
    6537, 51.4646174, -.46423724, 51.4646216, -.45892656, 51.4646394, -.45671873, 51
    .4646468, -.45007509, 51.4646691, -.4487052, 51.4646737, -.44809122, 51.4646758,
    -.44748667, 51.4646778, -.44118568, 51.4646989, -.44038184, 51.4647016, -.43534
    624, 51.4647186, -.43415307, 51.4647226, -.43413338, 51.4647226, -.43410223, 51.
    4647227, -.43408667, 51.4647228, -.43408688, 51.4648537, -.43408691, 51.4648694,
    -.43408703, 51.4649432, -.43408705, 51.4649579, -.43408717, 51.4650319, -.4340872,
    51.4650481, -.43408741, 51.465177, -.4341061, 51.4651769, -.43413411, 51.465
    1768, -.43415863, 51.4651767, -.43493934, 51.4651741, -.43724392, 51.4651664, -.
    4381469, 51.4651633, -.43876878, 51.4651612, -.44038073, 51.4651558, -.4409811,
    51.4651538, -.44732658, 51.4651325, -.44759329, 51.4651316, -.44870078, 51.46512
    79, -.45213755, 51.4651164, -.45482423, 51.4651073, -.45795448, 51.4650968, -.46
    041684, 51.4650886, -.46194096, 51.4650834, -.46348669, 51.4650783, -.46492913,
    51.4650734, -.46744722, 51.465065, -.47410127, 51.4650426, -.47616935, 51.465035
    7, -.48152654, 51.4650177, -.48230505, 51.4650151, -.48235217, 51.4650149, -.482
    35215, 51.4650018, -.48235145, 51.4645722, -.48235143, 51.4645607, -.48230432, 51.4645609))
    IDNUM
    GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    GD4
    SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARR
    AY(-.48497261, 51.4772685, -.48209892, 51.4772786, -.48097228, 51.4772825, -.474
    22571, 51.477306, -.47275437, 51.4773112, -.46898013, 51.4773243, -.46659847, 51
    .4773326, -.46535204, 51.477337, -.4624971, 51.4773469, -.46135428, 51.4773509,
    -.45879869, 51.4773598, -.45693251, 51.4773663, -.45570651, 51.4773706, -.453196
    56, 51.4773794, -.45006644, 51.4773903, -.44747333, 51.4773993, -.44686181, 51.4774014, -.44408948,
    51.4774111, -.4389499, 51.477429, -.43830451, 51.4774313, -.
    4346623, 51.477444, -.43398218, 51.4774464, -.43331459, 51.4774487, -.43326608,
    51.4774489, -.43326612, 51.4775874, -.43326612, 51.4776043, -.43326616, 51.47774
    86, -.43326616, 51.4777641, -.43326619, 51.4779031, -.4333147, 51.4779029, -.472
    655, 51.4777657, -.47413516, 51.4777605, -.48497272, 51.4777227, -.48502579, 51.
    4777226, -.48502579, 51.4777106, -.48502568, 51.4772809, -.48502568, 51.4772684,
    -.48497261, 51.4772685))

  • List All Tables in Schema with LONG ?

    Is there a way to ID any Table in my Schema that has a LONG data type ?
    Looking for Query
    Thank you!

    or
    SELECT table_name,column_name FROM user_Tab_Columns WHERE data_type='LONG'or
    SELECT table_name,column_name FROM cols WHERE data_type='LONG'max

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

  • Grant select only to all tables in certain schemas

    need to create an oracle database user with 'select only' right to all tables in schema OM + OE ( Order Management), Inventory(INV) and AR ( Account Receivables)

    apart from above suggestion dont forget to use to accomodate other schemas OM + OE ( Order Management), Inventory(INV) and AR ( Account Receivables);
    where a.owner in ('OM','OE','AR','INV');
    -- Raman.

Maybe you are looking for

  • My phone is barred but by who and why ??

    started just over 24 hrs ago, went to use phone silly little icon on bar signal top left hand side. So checked on line, said that there was a mast in my postcode area down...ok... So went to local o2 shop, had it looked at said no nothing to do with

  • Any Automation possible in oracle project module through customization

    Hi, Anybody aware of any customization in oracle project module.We have some customized requirements from users i.e..1)Can we update the status of task once it is completed.2)When we create the dependency and in case change in schedule does system ch

  • Storing the contents of a substitution or bind variable in a PL/SQL var

    Hi, I would like to create a substitution or bind variable to store the name of a sequence to use in SQLPlus and then reference this in a PL/SQL procedure and assign the contents of the substitution or bind variable in the PL/SQL variable. Is this po

  • New Oracle ADF Application.

    Hi I installed wls1035_oepe111172_win32.exe on my local machine in new directory. Next I created base_domain and admin console works OK. WebLogic Server Version: 10.3.5.0 In "Oracle Enterprise Pack for Eclipse" I try to create New -> Oracle ADF Appli

  • How do I convert images I enter into a PDF into text?

    Would you also happen to know how I convert images I enter into a PDF into text? (I can't use OCR if text already exists on that page of the document)