How to truncate  schema1 table from schema 2 -URGENT

Hi all
Please tell me is there any grant like that
regards

IS this
grant drop any table to schema 2
only way PapinRTFM: http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_107a.htm
Prerequisites
To truncate a table or cluster, the table or cluster must be in your schema or you must have DROP ANY TABLE system privilege. :)

Similar Messages

  • How to exclude some tables from schema level replicatio????

    Hi,
    I am working on oracle10g stream replication.
    My replication type is "Schema Based".
    So can anyone assist me to undersatnd, how to exclude some tables from schema based replication.
    Thanks,
    Faziarain

    You can use rules and include them in the rule set, lets say you dont want LCR to be queued for table_1 in schema SALES, write two rules one for DDL and another for DML with NOT logical condition.
    DBMS_RULE_ADM.CREATE_RULE(
    rule_name => 'admin.SALES_not_TALBE_1_dml', condition => ' (:dml.get_object_owner() = ''SALES'' AND NOT ' ||
    ' :dml.get_object_name() = ''REGIONS'') AND ' ||
    ' :dml.is_null_tag() = ''Y'' ');
    DBMS_RULE_ADM.CREATE_RULE(
    rule_name => 'admin.hr_not_regions_dlll',
    condition => ' (:dml.get_object_owner() = ''SALES'' AND NOT ' ||
    ' :ddl.get_object_name() = ''table_!'') AND ' ||
    ' :dsl.is_null_tag() = ''Y'' ');
    just go through this document once, http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_rules.htm#i1017376
    Edited by: user8710159 on Sep 16, 2009 5:21 PM

  • How can we copy table from one schema to other schema

    Hi,
    I have create one table in one schema and i want to copy it to other schema.How we can copy table from one schema to other schema

    Hi,
    You can try something like this :-
    SQL> CONNECT SYS/SYS123@SERVER AS SYSDBA
    Connected.
    SQL> CREATE USER TEST_1 IDENTIFIED BY TEST_1;
    User created.
    SQL> CREATE USER TEST_2 IDENTIFIED BY TEST_2;
    User created.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_1;
    Grant succeeded.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_2;
    Grant succeeded.
    SQL> CONNECT TEST_1/TEST_1@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY ( TEST_COL NUMBER );
    Table created.
    SQL> INSERT INTO TEST_COPY VALUES ( 1 );
    1 row created.
    SQL> INSERT INTO TEST_COPY VALUES ( 2 );
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> GRANT ALL ON TEST_COPY TO TEST_2;
    Grant succeeded.
    SQL>  CONNECT TEST_2/TEST_2@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY AS SELECT * FROM TEST_1.TEST_COPY;
    Table created.
    SQL>  SELECT * FROM TEST_COPY;
      TEST_COL
             1
             2Regards,
    Sandeep

  • How can i import tables from a different schema into the existing relational model... to add these tables in the existing model? plss help

    how can i import tables from a different schema into the existing relational model... to add these tables in the existing relational/logical model? plss help
    note; I already have the relational/logical model ready from one schema... and I need to add few more tables to this relational/logical model
    can I import the same way as I did previously??
    but even if I do the same how can I add it in the model?? as the logical model has already been engineered..
    please help ...
    thanks

    Hi,
    Before you start, you should probably take a backup copy of your design (the .dmd file and associated folder), in case the update does not work out as you had hoped.
    You need to use Import > Data Dictionary again, to start the Data Dictionary Import Wizard.
    In step 1 use a suitable database connection that can access the relevant table definitions.
    In step 2 select the schema (or schemas) to import.  The "Import to" field in the lower left part of the main panel allows you to select which existing Relational Model to import into (or to specify that a new Relational Model is to be created).
    In step 3 select the tables to import.  (Note that if there are an Foreign Key constraints between the new tables and any tables you had previously imported, you should also include the previous tables, otherwise the Foreign Key constraints will not be imported.)
    After the import itself has completed, the "Compare Models" dialog is displayed.  This shows the differences between the model being imported and the previous state of the model, and allows you to select which changes are to be applied.
    Just selecting the Merge button should apply all the additions and changes in the new import.
    Having updated your Relational Model, you can then update your Logical Model.  To do this you repeat the "Engineer to Logical Model".  This displays the "Engineer to Logical Model" dialog, which shows the changes which will be applied to the Logical Model, and allows you to select which changes are to be applied.
    Just selecting the Engineer button should apply all the additions and changes.
    I hope this helps you achieve what you want.
    David

  • How to restore one table from the previous backup in 9.2.0.8 version.

    Hi,
    How to restore one table from the previous backup in 9.2.0.8 version.
    Thanks
    -Ganga

    Hi,
    What is the table you want to restore?
    Using export/import is supported with Oracle Apps database (for full database exp/imp, and certain schemas like custom ones). For the Apps schema, I believe it is not supported due to object dependencies and integrity constraints.
    Regards,
    Hussein

  • How to import  new tables from database

    I have relational source in OWB. I had added a new table in teh database, now I donot know how to import this new table in OWB9i?
    I will appreciate your help.
    Thanks
    Syed

    Mark,
    I am sorry I did not explain the problem clearly. I created module of the relationa source and then using DB link I had imported all the tables from schema A , but my question is that I had created a new table in the Schema A and I want to just import that table in my relation resource module. Is there a way to do it in OWB? How do we create just on etable in OWB module?
    Thanks
    Syed

  • How to get internal table from SAP Data Provider C#

    Hello.
    ABAP:
       DATA: lt_t001 TYPE TABLE OF t001.
       DATA: url(1000) TYPE c.
      SELECT * INTO TABLE lt_t001 FROM t001.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type                 = 'APPLICATION'
          subtype           = 'X-R3TABLE'
        TABLES
          data                 = lt_t001
        CHANGING
          url                    = url
        EXCEPTIONS
          OTHERS           = 4.
    C#:
    using SAPDataProvider;
    using SAPTableFactoryCtrl;
    public void SetDataFromUrl(string url)
                SAPDataProviderClass p = new SAPDataProviderClass();
                p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
                ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
                SAPTableFactoryClass tf = new SAPTableFactoryClass();
                Table tb = (Table)tf.NewTable();
                tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
    How to get internal table from SAP Data Provider ?

    Hi Sergey,
    I'm trying to do the same, have you found a solution to solved it?
    thanks for your help.
    Regards.
    Jonathan

  • How can I copy tables from Numbers to Pages without formula?

    hi everyone
    i need help
    How can I copy tables from Numbers to Pages without formula in the cells?

    Ok... I see your problem... when pasting into Pages, the formulas from Numbers are included. Perhaps this is really more of a Pages question (in which case I'm far from expert). A couple of ideas:
    • In Pages, try "Edit"/"Paste and Match Style", which may insert tab delimited cell values (no formulas). Then, if you want the table format back, select these newly pasted tabbed values and use Page's "Format"/"Table"/"Convert Text to Table"/
    • In Numbers, before copying, make a temporary table of the plain values first, then copy and paste that into Pages. To do this, select the range of cells you desire in the Numbers and "Edit"/"Copy". Then "Edit"/"Deselect All" and "Edit"/"Paste Values" and "Edit"/"Cut". Now just a table of values is on the clipboard and you can head over to Pages to paste.

  • How to read a table from one host to other host

    Hi Everybody,
    How to read a table from one host to other host.
    For Example,
    a/a@abcd - host 1
    b/b@xyz - host 2
    suppose im having a table called emp in a/a@abcd
    i want to read the table emp in b/b@xyz
    how to do this.??
    I know that we have to create a dblink...after that how to proceed.
    Plz help..
    Thanks in Advance,
    Gita

    connected as scott/tiger@test
    SQL>
    CREATE DATABASE LINK local
    CONNECT TO admin IDENTIFIED BY pinnet
    USING 'pinnet';
    Database link created.
    sql>
    select count(*) from
    users@local;
    COUNT(*) 
    16
    Message was edited by:
            jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • How to Create adf table from java bean

    Hi,
    How to Create adf table from java class (Not from ADF BC).
    Thanks
    Satya

    @vlsn -- you have to follow what shay said.
    Do the following in Model layer ::
    create a table property java class with your columns setters and getters like :
    *public class gridProps {*
    private int sno;
    private String orderNum;
    *public void setSno(int sno) {*
    this.sno = sno;
    *public int getSno() {*
    return sno;
    *public void setOrderNum(String orderNum) {*
    this.orderNum = orderNum;
    *public String getOrderNum() {*
    return orderNum;
    Create another table java class which will populate the values to your column values and return the collection :
    *public class gridPopulate {*
    private  List<gridProps> gridValues ;
    *public List<gridProps> setToGrid(ArrayList<ArrayList> valuesToSet) {*
    *if (valuesToSet == null) {*
    return gridValues;
    gridValues = new ArrayList<gridProps>();
    if(btnValue.equals("completeBtn"))
    return gridValues;
    for(ArrayList<String> tempArr:valuesToSet)
    gridProps gp = new gridProps();
    gp.setSno(Integer.valueOf(tempArr.get(0)));
    gp.setOrderNum(tempArr.get(1));
    return gridValues;
    Right click gridPopulate class and create this as data control.This class will be seen in Data control list.Under this data control,Drag the grid property collection(created earlier) to your page.Then execute your binding(gridPopulate) according to your logic.
    Thanks.(My jdev version 11.1.1.5.0)

  • How to truncate the values from the table

    Hi All,
    I am working on an issue..where we are first deleting all the records from the table and then based on few conditions we are putting the records back in that table...when we tried to run this program along with few others those who are doing almost the same stuff we are having issues...we tried to schedule few jobs related to these programs only...but after a ceratin amount of time couple of jobs got canceled...I was talking to my basis guy and he said the problem is ratehr then truncating the records from the table we are deleting the records and it's taking lots and lots of space to execute...so we need to truncate the records from the table insted of deleting it...we are using the following the statement right now:
        DELETE FROM ZTUS_PG.
        COMMIT WORK.
    So can you please tell me how can we truncate the values from this table instead of just deleting them and what would be effect of this.
    Thanks,
    Rajeev Gupta

    I don't think basis is saying you should delete all the records from the table. They are saying remove the table and it's contents (a much faster thing to do). I'm not sure this the right thing to do, but you can have a look at:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.sample.doc/doc/admin_scripts/s-truncate-db2.htm
    Something like:
    EXEC SQL.
      TRUNCATE TABLE ZTUS_PG REUSE STORAGE
    ENDEXEC.
    COMMIT WORK.                      "Empty table is committed here
    Rob
    Edited by: Rob Burbank on Dec 1, 2008 4:06 PM

  • How to exclude tables from Schema level replication

    Hi All,
    I am currently trying to setup Oracle Streams (Oracle 11.1.0.6 on RHEL5) to replicate a schema from one instance to another.
    The basic schema level replication is working well, and copying DDL and DML changes without any problems. However there are a couple of tables that I need to exclude from the stream, due to incompatible datatypes.
    Does anybody have any ideas or notes on how I could achieve this?? I have been reading the Oracle documentation and find it difficult to follow and confusing, and I have not found any examples in the internet.
    Thanks heaps.
    Gavin

    When you use SCHEMA level rules for capture and need to skip the replication of a few tables, you create rules in the negative rule set for the table.
    Here is an example of creating table rules in the negative rule set for the capture process.
    begin
    dbms_streams_adm.add_table_rules(
    table_name => 'schema.table_to_be_skipped',
    streams_type => 'CAPTURE',
    streams_name => 'your_capture_name',
    queue_name => 'strmadmin.capture_queue_name',
    include_dml => true,
    include_ddl => true,
    inclusion_rule => false
    end;
    table_name parameter identifies the fully qualified table name (schema.table)
    streams_name identifies the capture process for which the rules are to be added
    queue_name specifies the name of the queue associated with the capture process.
    Inclusion_rule=> false indicates that the create rules are to be placed in the negative rule set (ie, skip this table)
    include_dml=> true indicates DML changes for the table (ie, skip DML changes for this table)
    include_ddl=> true indicates DDL changes for the table (ie, skip DDL changes for this table)

  • How to export the table from one schema to another schema

    Hi,
    I've 2 schemas dev and test db
    And i need to copy one EMP table from DEV to TEST db in windows OS
    Could you please hint me in which schema which statement to be written ...
    Regards
    josh

    Hi,
    I am not sure I got it all. Do you have 2 schemas in 2 different databases or 2 schemas in the same database ?
    If both schemas are in one DB, you can :
    connect dev/***@DB
    grant select on emp to test;
    connect test/***@DB
    insert /*+ append */ into emp select * from dev.emp;
    commit;Or use a create table emp as select * from dev.emp; if empl table does not exist in test schema.
    If both schemas are in different DBs, you can :
    * use exp / imp tools
    * use sqlldr
    * use a database link
    Hope this helps,
    Francois

  • How to update one table from another table?

    Hi,
    Please go through the case I am mentioning below and if possible try to provide with a solution.
    I am working on a report to generate cash flow forecast, where in one of the fields is "Payroll", in which its being mentioned as:
    In the selection screen: I am entering Project ID, profit Center and Period(in MM/YYYY format).
    Selection of all entries in table COSP for selected cost elements above, value type 1, version , all periods and for all selected WBS elements and all objects underneath.
    From this, update table COFP with information from COSP with value type 62 and same period.
    For updation of various fields the following information is being given.
    How should we update COFP?
    New entries per OBJNR/PERIO and HKONT are required via using the information from COSP:
    COFP-MANDT              =          SY-MANDT
    COFP-KOKRS              =          if COSP-OBJNR begins with ‘PR’
                                                   Check table PRPS with COSP-OBJNR = PRPS-OBJNR and enter PRPS-PKOKR
                                                    If COSP-OBJNR begins with ‘NV’
                                                   Check table AFVC with COSP-OBJNR = AFVC-OBJNR,
    go to Table AFKO with AFVC-AUFPL,
    go to table AUFK with AFKO-AUFNR and enter AUFK-KOKRS
    If COSP-OBJNR begins with ‘OR’
    Check table AUFK with COSP-OBJNR = AUFK-OBJNR
    and enter AUFK-KOKRS
    COFP-BELNR               =          Check table NRIV, CLIENT = SY-MANDT, OBJECT = RK_BELEG,
    SUBOBJECT = COFP-KOKRS, NRRANGENR = ‘05’,
    Add 1 to NRLEVEL and begin with 500000000
    Use same BELNR for one update-run
    COFP-BUZEI                =          ‘1’ + and 1 in next entry but same update-run
    COFP-TWAER              =          COSP-TWAER
    COFP-ZHLDT                =          always last day of month in field COFP-PERIO
    COFP-GJAHR               =          COSP-GJAHR
    COFP-PERIO               =          if entry in field WKG001 à PERIO = 001
                                                   If entry in field WKG006 à PERIO = 006……
    COFP-WRTTP              =          ‘62’
    COFP-VRGNG              =          ‘FIPL’
    COFP-POSIT                =          Check table SKB1 where SAKNR = COSP-KSTAR and use SKB1-FIPOS
                                                   for going to table FMCI-FIPOS and enter FMCI-POSIT
    COFP-OBJNR               =          COSP-OBJNR
    COFP-HKONT              =          COSP-KSTAR
    COFP-WKGBTR           =          WKGXXX
    COFP-WKGBTRO         =          -
    COFP-WTGBTR            =          WTGXXX
    COFP-WTGBTRO         =          -
    COFP-WOGBTR           =          WTGXXX
    COFP-WOGBTRO        =          -
    COFP-BUKRS1            =          -
    COFP-GJAHR1             =          -
    COFP-BELNR1             =          -
    COFP-BUZEI1              =          -
    COFP-BUKRS2            =          -
    COFP-GJAHR2             =          -
    COFP-BELNR2             =          -
    COFP-BUZEI2              =          -
    COFP-EBELN               =          -
    COFP-EBELP               =          -
    COFP-ZEKKN               =          -
    COFP-ETENRM            =          -
    COFP-STUNR               =          -
    COFP-LIFNR                =          -
    COFP-KUNNR              =          -
    COFP-GSBER              =          -
    COFP-BUKRS              =          (nearly same as COFP-KOKRS!)
                                                   if COSP-OBJNR begins with ‘PR’
                                                   Check table PRPS with COSP-OBJNR = PRPS-OBJNR and enter PRPS-PBUKR
                                                    If COSP-OBJNR begins with ‘NV’
                                                   Check table AFVC with COSP-OBJNR = AFVC-OBJNR,
    go to Table AFKO with AFVC-AUFPL,
    go to table AUFK with AFKO-AUFNR and enter AUFK-BUKRS
    If COSP-OBJNR begins with ‘OR’
    Check table AUFK with COSP-OBJNR = AUFK-OBJNR
    and enter AUFK-BUKRS
    COFP-EINDT                =          -
    COFP-SGTXT               =          -
    COFP-GEBER              =          -
    COFP-KURSF              =          -
    COFP-KUFIX                =          -
    COFP-GBETR              =          -
    COFP-KURSR              =          -
    COFP-KURSFIKRS       =          -
    COFP-KZKRS               =          -
    COFP-UMBKZ              =          -
    COFP-KBLNR               =          -
    COFP-KBLPOS            =          -
    COFP-HI FIVOR            =          -
    COFP-LO FIVOR          =          -
    COFP-HI ACCOUNT      =          -
    COFP-LO ACCOUNT     =          -
    COFP-HI LIFNR            =          -
    COFP-LO LIFNR           =          -
    COFP-HI KUNNR          =          -
    COFP-LO KUNNR         =          -
    COFP-XDELETE           =          -
    COFP-HI XOPVW         =          -
    COFP-LO XOPVW        =          -
    COFP-ZAEHK               =          -
    COFP-CHAINBELNR     =          -
    COFP-MWSKZ             =          -
    COFP-LEDNR               =          -
    COFP-BELTP               =          ‘1’
    COFP-VERSN              =          ‘0’
    COFP-OWAER             =          COSP-TWAER
    COFP-CPUDT               =          SY-DATUM
    COFP-CPUTM              =          SY-TIME
    after doing updation, its again saying Selection of all entries in table COFP with value type 51 to 62, selected year, selected cost elements above and for all selected WBS elements and all objects underneath. Summarisation by period.
    Now, can someone help me as how to proceed with the entire thing? An elaborate and illustrative answer would be highly appreciable.
    If you require any other information....then get back to me ..asap.
    Its bit urgent.
    Thanks & Regards,
    Ravi

    Hi
    update <table> from <i_tab>
    for different conditions.
    loop at i_cosp.
    if cosp-mandt eq sy-mandt and  cosp-objnr eq 'PR'.
    Read table i_PRPS with key  i_PRPS-OBJNR = i_COSP-OBJNR.
    if sy-subrc eq 0.
    update PRPS set PKOKR = ? where objnr = i_prpr-objnr.
    endif.
    endif.
    similarly for all the conditions
    Regards
    Message was edited by: Harikishore Sreenivasulu

Maybe you are looking for