Deleting data from a very large log table (custom table in our namespace)

Hello,
I have been tasked with clearing a log table in our landscape to only include the most recent entries.  Is it possible to do this given that the table has already got 230 000 000 entries and will need to keep around 600 000 recent entries?
Should I do this via ABAP and if so, how?  Thanks,
Samir

Hi,
so you are going to keep 0,3 % of your data?
If you should do it in ABAP or on the database is your decission.
In my opinion doing things on the database directly should be done
exceptional cases only e.g. for one time actions or actions that have to
be done very rarely and with different parameters / options. Regular
and similar tasks should be done in ABAP i think.
In any case i would not delete the majority of the records but copy
the records to keep in an empty table with the same structure, delete the
table as a whole (check clients!) and "copy" the new table back in ABAP
or rename the new table to the old table after droping the old table on the database.
If you have only one client you can copy the data you need in a new
table and truncate the old table (fast deletion for all clients). If you have
data to keep  for other clients as well check how much data it is per client
in comparison to the total number of lines (if only a small fraction, pefer copying
them too).
On the database you can use CTAS (create table as select) and drop table and
rename table. Those commands shoudl be very efficient but work client independently.
If you have to consider clients SELECT; INSERT; DELETE or TRUNCATE (depends on if you have
copied all data considering clients) are
your friends.
Kind regards,
Hermann

Similar Messages

  • Deleting data from SID Table

    Hi,
    I have deleted master data of an info object but it does not remove all the data from the SID table.
    I have selected with SID's option but not all data was removed.
    I am getting the error below when transporting
    "SID Table /BIC/ S2QKHITIND Contains Data : Characteristic ZQKHITIND Cannot be activated. "
    What needs to be done to get the charecteristic activated.
    Thanks
    James

    Hi Selva,
    Thank you for the info. I have deleted data from all the infoproviders but still get the message
    The system is unable to delete all the master data as, because some of it is still in use.  (See log:
    Object RSDMD, sub-object MD_DEL )
    Do you want to delete the data records that are no longer in use?
    What does this mean. is it due to the query open in some place or something else.
    While I am not able to delete the SID table entries as the delete is not active. Please help.
    Thanks
    James

  • Open HUB ( SAP BW ) to SAP HANA through DB Connection data loading , Delete data from table option is not working Please help any one from this forum

    Issue:
    I have SAP BW system and SAP HANA System
    SAP BW to SAP HANA connecting through a DB Connection (named HANA)
    Whenever I created any Open Hub as Destination like DB Table with the help of DB Connection, table will be created at HANA Schema level ( L_F50800_D )
    Executed the Open Hub service without checking DELETING Data from table option
    Data loaded with 16 Records from BW to HANA same
    Second time again executed from BW to HANA now 32 records came ( it is going to append )
    Executed the Open Hub service with checking DELETING Data from table option
    Now am getting short Dump DBIF_RSQL_TABLE_KNOWN getting
    If checking in SAP BW system tio SAP BW system it is working fine ..
    will this option supports through DB Connection or not ?
    Please follow the attachemnet along with this discussion and help me to resolve how ?
    From
    Santhosh Kumar

    Hi Ramanjaneyulu ,
    First of all thanks for the reply ,
    Here the issue is At OH level ( Definition Level - DESTINATION TAB and FIELD DEFINITION )
    in that there is check box i have selected already that is what my issue even though selected also
    not performing the deletion from target level .
    SAP BW - to SAP HANA via DBC connection
    1. first time from BW suppose 16 records - Dtp Executed -loaded up to HANA - 16 same
    2. second time again executed from BW - now hana side appaended means 16+16 = 32
    3. so that i used to select the check box at OH level like Deleting data from table
    4. Now excuted the DTP it throws an Short Dump - DBIF_RSQL_TABLE_KNOWN
    Now please tell me how to resolve this ? will this option is applicable for HANA mean to say like , deleting data from table option ...
    Thanks
    Santhosh Kumar

  • Deleting data from a partition in a table

    There is a requirement to delete data from a particular partition in our PROD Env.
    Please let me know the syntax for the same.
    Also is it possible to truncate a partition?
    The DB version is 10.2.0.4 and OS is Solaris 10
    Regards,
    Narayan
    Edited by: user7202581 on Apr 14, 2013 12:11 AM

    Hi, You can use the following Syntex.
    -- For Truncate
    ALTER TABLE <table_name> TRUNCATE PARTITION <Partition_name>;
    -- For Delete
    DELETE FROM <table_name> PARTITION <partition_name>;

  • Deleting data from a table where there are no indexes on the table

    Hi
    We have one interface program for one time process.When I was testing the process it was taking too much time to load the data around 1000 records.
    it happens in 2 steps
    1 puts into stage table
    2 puts into base table
    in the process/package I have delete statement that deletes data from stage table before each process.
    Stage table did not have any indexes but the base table has(obvisiosly)
    any idea?
    please help me on this.
    Thanks,
    Y

    Hi,
    Please post the application/database details along with the OS.
    Is this interface program a seeded or custom one?
    Please enable trace on this concurrent program as per (Note: 296559.1 - FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12) and generate the TKPROF to find out why it takes that long to load/delete the data.
    Thanks,
    Hussein

  • How to delete data from single field in a database table?

    Hi guys,
         Plz suggest me How to delete data from single field in a database table?
    thnks,
    pavan

    hi
    in addition to abv details..chk this:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
    http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
    regards,
    madhu

  • Program or Function module to delete data from Open Hub Destination Table

    Hi All,
    Can anybody suggest me a Program or Function module to delete data from Open Hub Destination Table.
    Thanks & Regards,
    Vinay Kumar

    You can simply goto t-code SE14 mention the open hub destination table and Delete data by clicking on "Activate and Adjust database" with radio button "Delete Data".
    Regards,
    Arminder

  • "Transfer structure  does not exist" while deleting data from a DSO

    Hello experts,
    while deleting data from a DSO I get the following messages:
    @5B\QInformation@     Database table /BIC/AAKIVO1400 was deleted and recreated
    @5C\QError@     Transfer structure  does not exist
    When I try it twice process works without any problems. I get then the following msgs:
    @5B\QInformation@     InfoCube / DataStore object "AKIVO14" contains no data (yet)
    @5B\QInformation@     Database table /BIC/AAKIVO1400 was deleted and recreated
    So I think the first deletion works but ended with errors. What could be the reason?

    Please check if data from new and chage log table is also deleted.
    For the error message : Do you have 3.5 flow ? Check your transfer structure , if it is active and then again try to right click and delete data from DSO.
    - Monika

  • Data Services Designer 14 - Large Log files

    Hello,
    we're running several jobs with the Data Services Designer 14, all works fine.
    But today a problem occur:
    The Data Designer on a client produces after finishing a big job a very large log file in the Data Services Designer folder with 8 GB.
    Is it possible to delete these log files automatically or restrict the maximum size of the created log files in the designer?
    What's the best way?
    Thanks!

    You can set to automatically delete the log files based on number of days.
    I have done this in XI 3.2, but as per the document, this is how it can be done in DS 14.0.
    In DS 14.0, this is handled in CMC.
    1. Log into the Central Management Console (CMC) as a user with administrative rights to the Data Services application.
    2. Go to the u201CApplicationsu201D management area of the CMC. The u201CApplicationsu201D dialog box appears.
    3. Right-click the Data Services application and select Settings. The u201CSettingsu201D dialog box appears.
    4. In the Job Server Log Retention Period box, enter the number of days that you want to retain the following:
    u2022 Historical batch job error, trace, and monitor logs
    u2022 Current service provider trace and error logs
    u2022 Current and historical Access Server logs
    The software deletes all log files beyond this period. For example:
    u2022 If you enter 1, then the software displays the logs for today only. After 12:00 AM, these logs clear and the software begins saving logs for the next day.
    u2022 If you enter 0, then no logs are maintained.
    u2022 If you enter -1, then no logs are deleted.
    Regards,
    Suneer.

  • BW Statistics: Deleting Data from InfoCubes.

    Hi,
    I want to see data in BW Statistics: Deleting Data from InfoCubes.
    I am working on  BI 7.
    I have set the infoprovider in Tcode RSDDSTAT.Marked 2 Infocube statistics ( X) and OLAP(2).
    Already activated the BI Statistics.
    I am deleting data from one of the cube . But when I go to cube 0BWTC_C11(BW Statistics: Deleting Data from InfoCubes)
    It is not showing any data .
    I can't see any data in RSDDSTATDELE table also
    Do I need to do any other setting ? Am I missing any steps?
    I need to dislay the log for deleted request /deleted data  ?
    I need to display the log for deleted infoobject/infopackage also? Where can i get this ?
    Pls guide  .
    Regards
    Nilesh

    Hi Venkat,
    I can not able to see in the report also . I have tried 0BWTC_C10/0BWTC_C10_Q251 to 254.
    Whenever I am doing to delete it individullay it goes to table SDDSTATDELE .But whenever I am deleting whole data from cube or request ID  it is not updating  table RSDDSTATDELE.( which is further used to get data )
    <b>I got this from SAP help .</b>
    The characteristic can have the following characteristic values C,N,D and T:
    C (Choose): The system automatically chooses the best delete mode. This is N or D.
    N (Create New): If over 10% of an InfoCube’s data records are to be deleted, the system replaces the InfoCube fact table with a table with data records that are not to be deleted.
    If you want to delete more than 10% of the records, the system creates a new table, copies the data records you want to keep to the new table, deletes the old table and then renames the new table.
    D (Delete): If you want to delete less than 10% of the data records, the system deletes these individual records directly from the InfoCube fact table.
    <b>T<b> (Truncate): If you want to delete all data records, the system deletes all data records from the tables, but retains the tables in the database.</b></b>
    So how to see these records? I am doing full upload to cube 0BWTC_C11(BW Statistics: Deleting Data from InfoCubes).
    Before this do I need to extract data for other CUBE also.
    Pls suggest .
    Regards
    Nilesh

  • Delete data from DSO only with a part of the key

    Hi experts,
    I have a DSO with 9 key fields and i want to delete some entrys. Our source system only provides 2 fields of the key. My problem is, that the BI is not able to delete from DSO unless I have the full key.
    Now I want to get the rest of the key fields from the active table of the DSO. Can sombody help me please with the ABAP Code? Or is there another possibility?
    I already found this thred in SDN but this is for BW 3.5:
    Delete data from ODS with only part of the key
    Thanks
    Ralf

    Ralf,
    the thread pointed out by you is for passing deletion entries to the DSO / target using the deletion entries .. namely recordmode = D.
    Are you looking at deleting data from the DSO as a one time activity or you want to handle the same using a start / end routine ...? and pass deletion entries to other data targets which get the data from this DSO ?
    Arun

  • Unable to delete data from a partition

    Hi,
    Unable to delete data from a partition
    I am using the command as:
    ALTER TABLE TEST DROP PARTITION DATE_20090820090000
    Its giving 0 rows deleted.Bu there are 200 rows for the Partition.
    The partition is getting deleted but the data remains.
    I want a command where the data in the partition also to be deleted along with partition.
    Any help will be needful for me

    SQL> CREATE TABLE range_part (
    prof_history_id NUMBER(10),
    person_id NUMBER(10) NOT NULL,
    organization_id NUMBER(10) NOT NULL,
    record_date DATE NOT NULL)
    PARTITION BY RANGE (record_date) (
    PARTITION yr0 VALUES LESS THAN (TO_DATE('01-JAN-2007','DD-MON-YYYY'))
    PARTITION yr7 VALUES LESS THAN (TO_DATE('01-JAN-2008','DD-MON-YYYY'))
    PARTITION yr8 VALUES LESS THAN (TO_DATE('01-JAN-2009','DD-MON-YYYY'))
    PARTITION yr9 VALUES LESS THAN (MAXVALUE) );
    Table created.
    SQL> INSERT INTO range_part VALUES (1, 1, 1, SYSDATE-720);
    INSERT INTO range_part VALUES (2, 2, 2, SYSDATE-360);
    INSERT INTO range_part VALUES (3, 3, 3, SYSDATE-180);
    INSERT INTO range_part VALUES (4, 4, 4, SYSDATE);
    1 row created.
    SQL>
    1 row created.
    SQL>
    1 row created.
    SQL>
    1 row created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL> SELECT * FROM range_part;
    PROF_HISTORY_ID PERSON_ID ORGANIZATION_ID RECORD_DATE
    1 1 1 31-AUG-2007 05:53:22
    2 2 2 25-AUG-2008 05:53:22
    3 3 3 21-FEB-2009 05:53:22
    4 4 4 20-AUG-2009 05:53:22
    SQL> SELECT * FROM range_part PARTITION(yr7);
    PROF_HISTORY_ID PERSON_ID ORGANIZATION_ID RECORD_DATE
    1 1 1 31-AUG-2007 05:53:22
    SQL> alter table range_part drop partition yr7;
    Table altered.
    SQL> SELECT * FROM range_part PARTITION(yr7);
    SELECT * FROM range_part PARTITION(yr7)
    ERROR at line 1:
    ORA-02149: Specified partition does not exist
    SQL> SELECT * FROM range_part;
    PROF_HISTORY_ID PERSON_ID ORGANIZATION_ID RECORD_DATE
    2 2 2 25-AUG-2008 05:53:22
    3 3 3 21-FEB-2009 05:53:22
    4 4 4 20-AUG-2009 05:53:22

  • Deleting data from a cube

    Hi,
    I added a info object to a dimension in a cube. now i want to delete the info object from the cube. But since the cube has data in it, i cannot do it unless i delete all the data from the cube. When i select 'delete data', i'm given 2 options, delete fact table only and 2nd option delete fact table and dimension table. what is the difference between the two and what option should i select.
    i then need to load the cube back from ODS. the cude right now is setup in the proce4ss chain to do a delta load every day. would this be affected after i delete the data and load it again from the ODS?
    Thanks
    Sameer

    The way I understand your question is...
    1) You have data in the cube from which you have to remove an infoobject
    Ans: To acheive this, you have to delete the data from the cube
    2) You have deleted the data and then deleted the IO, activated the cube and the update rules from the ODS which feeds this cube
    3) Now you have to reload the deleted data from the ODS. But you already did an init and you are loading delta's from this ODS to the cube through process chain.
    Ans: As you've already deleted the whole data from the cube, do a full load from the ODS (you can do this even when delta initialization is done) to your cube by creating a new infopackage under the export datasource of the ODS. This will capture all the records from the ODS. Then to be on the safe side so as not to load any duplicate records...go the infopackage that you've used to do the full load (you can even create a new Info package)...SCHEDULER -> Initilization options for source system -> Delete the existing INIT -> Then do Init again...
    Leave the delta infopackage as is and let the process chain take care of the deltas from now on...
    Hope this helps. Let me know I am missing something here...

  • I need to recover deleted data from my iPhone 4S but don't have a recent backup. I thought by pressing sync on my macbook this would back up-but I was wrong. There are no backups on my macbook and the latest backup on iCloud was Jan 2012. Please help

    I need to recover deleted data from my iPhone 4S but don't have a recent backup. I thought by pressing sync on my macbook this would back up…but I was wrong. There are no backups on my macbook and the latest backup on iCloud was Jan 2012. My mum died in May and I had lots of text messages that I wanted to keep. I really want to get them back. Is there any way at all I can get that deleted data from the phone?

    Since it has always been very basic to backup your computer and all it's data, Apple provides no way for you to transfer music from your iPhone back to your computer.  As you know, you can re-download all iTunes purchases, but music that you ripped yourself you'll have to just re-rip again.
    You can try and find 3rd party applications that might help you.  I'm sure you'll pay, however.
    Let this be a very important lesson learned.
    Best.

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so
    many hours.

    How big is the table on server B? Is that possible to bring the all data into a server A and merge the data locally?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • Multicast for Aironet 1310 WGB and 1242 AP

    I have configured a Aironet 1310 bridge as a WGB and is connected to a Aironet 1242AG AP wirelessly! A sensor(IP device) is wired into the 1310WGB. The sensor needs MULTICAST to operate! I checked the DETAILED STATUS of the RADIO and both the 1310 an

  • W520 support for SATA III or 6GB with Vertex 3 240GB SSD

    I need a laptop that supports 16GB memory, HD display (1920 X 1080) and SATA 3 with 6Gb speeds to leverage my existing Vertex 3 240GB SSD. Looking up PSREF, I find the W520 specs state SATA 3Gb/s (SATA II?) while the chipset is QM67 which is supposed

  • Exact Search Criteria in OAF

    Hi, I have developed a Custom OA Page with VO having 9 Columns, all 9 columns are in search criteria having LOV for each column. It is oracle R12 environment. Problem: When i search for a specific value for column it is returning values in result reg

  • Complete End User transactions of Credit management and Cash Remittance

    Hi All Can any one please Guide me on what are all transactions the end users need to perform  in the below areas - 1 - Collections 2 - Credit Management 2 - Cash Remittance 4 - Tax Processing I have to give the trainings on these areas and these are

  • CRM order pricing is gets overwritten

    Dear SDN team, I need your help on the below CRM pricing issue We see that the Gross value in CRM order gets determined correctly in CRM system during order creation . Once the order flows into SAP R/3 system the Pricing is getting re-determined as p