How to remove soft deleted records?
Hi everybody,
Are there any ways to remove soft deleted records from LT table?
For instance, table is versioned and database has few workspaces. The user removes some data from LIVe workspace (or from other workspaces). The removed records are marked as deleted in the LT table, but never removed from LT table even the compression is executed on all workspaces.
I found the only way to remove them is to remove all workspaces and savepoints and when run compression. After that it removes all soft deleted records (records that are marked as deleted in LT table).
I have a thousands active records while hundred of thousands are soft deleted, which causes performance degradation.
Any suggestions?
Thanks for any input.
Edited by: dmbond on Jan 14, 2010 7:15 AM
Thanks Ben for such quick replay.
Please correct my understanding if i wrong somewhere...
From you last post i understood that soft deleted records cannot be removed from versioned table where the same data were existed prior to versioning.
I made a quick test and can see version 0 on the data that was originally there, and running compression did not removed it (choice by OWM).
However, another case when brand new table (empty) was versioned), (new workspace created after versioing), and then new data is added into LIVE which later was removed. After compressing LIVE workspace the soft records still in LT table and version is not 0.
Here is my last test example:
create table dm_test (
column1 number primary key,
column2 number not null);
call dbms_wm.enableVersioning('DM_TEST');
call dbms_wm.createWorkspace('DUMMY');
--No records
select * from dm_test_lt;
insert into dm_test values (9,1);
insert into dm_test values (10,2);
insert into dm_test values (11,3);
insert into dm_test values (12,4);
commit;
--Shows data with version different than 0
select * from dm_test_lt;
--Delete data from LIVE workspace
delete from dm_test;
commit;
--LT has delstatus negative (-1)
select * from dm_test_lt;
--compress LIVE workspace
declare
begin
DBMS_WM.CompressWorkspace('LIVE',
compress_view_wo_overwrite => TRUE,
auto_commit => TRUE,
remove_latest_deleted_rows=>TRUE);
end;
--The data is still there after compression
select * from dm_test_lt;
Similar Messages
-
How to update or delete records in a Complex View in Forms?
Hi,
I have a requirement to create a Form by using Complex View. Insertion is possible but updation and deletion is not working properly . I got FRM-40501 Error. I need How to update or delete records in a Complex View in Forms?
Thanks & Regards,
Hari BabuDepending on how complex your view is, forms is not able to determine how to appropiately lock a record, when you try to update or delete a record.
One approach to using complex views in forms:
1. Set the Key-mode of the block to "Non-Updateable"
2. Mark the column which can be used to build the WHERE-condition to uniquely identify a record with "Primary Key" = "Yes"
3. For doing INSERT, UPDATE and DELETE, create an INSTEAD-OF-trigger on the view.
4. Create your own ON-LOCK-trigger in forms which does the locking of the records to update. -
Hi,
I am using Master Data Service for couple of months now. I can load, update, merge and soft delete data in MDS. Occasionally we even have to hard delete data from MDS. If we keep on soft deleting records in a MDS table eventually there will be huge number
of soft deleted records.
Is there an easy way to hard delete all the soft deleted records from all MDS tables in a specific Model.
Regards,
RehanWe did develop a Transact SQL procedure for this using the staging interface. It works and can be used freely :)
God Luck!
Jan Isacsson
USE [MDS]
GO
/****** Object: StoredProcedure [dbo].[AutoPurge] Script Date: 4/21/2015 10:39:21 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- To be used without warranty but it works even for collections
-- Jan Isacsson (www.independent.se) 2015-04-21
CREATE PROCEDURE [dbo].[AutoPurge]
@modelName nvarchar(200) = 'PDWmReferenceData',
@versionName nvarchar(200) = 'VERSION_1',
@entityName nvarchar(200) = NULL
AS
DECLARE @name nvarchar(200)
DECLARE @tableName nvarchar(200)
DECLARE @stagingName nvarchar(200)
DECLARE @collectionTable nvarchar(200)
DECLARE @collectionMemberTable nvarchar(200)
DECLARE @isFlat INT
DECLARE @sqlIsFlat NVARCHAR(512)
DECLARE @sqlGetEntityTable NVARCHAR(512)
DECLARE @sqlGetCollectionTable NVARCHAR(512)
DECLARE @sqlGetCollectionMemberTable NVARCHAR(512)
DECLARE @sqlGetStagingBaseTable NVARCHAR(512)
DECLARE @sqlLoadPurgeConsolidated NVARCHAR(512)
DECLARE @sqlLoadPurgeLeaf NVARCHAR(512)
DECLARE @sqlRinseStaging NVARCHAR(512)
DECLARE @sqlPurgeCollections NVARCHAR(512)
DECLARE @sqlCheckErrorStaging NVARCHAR(512)
DECLARE @batchTagName NVARCHAR(512)
DECLARE @executePurge NVARCHAR(512)
DECLARE @errorMsg NVARCHAR(512)
DECLARE @i INT
DECLARE @id INT
DECLARE leaf_entity_cursor CURSOR FOR
select e.ID, e.Name from
mdm.tblModel m,
mdm.tblEntity e
where
e.Model_ID = m.ID
and m.Name = @modelName
DECLARE noleaf_entity_cursor CURSOR FOR
select e.ID, e.Name from
mdm.tblModel m,
mdm.tblEntity e
where
e.Model_ID = m.ID
and m.Name = @modelName
and e.IsFlat = 0
-- Leaf purge
SET @batchTagName = '''AutoPurge'''
OPEN leaf_entity_cursor
FETCH NEXT FROM leaf_entity_cursor INTO @id, @name
WHILE @@FETCH_STATUS = 0
BEGIN TRY
if @name = @entityName or @entityName is null
BEGIN
SET @sqlGetEntityTable = N'select @tableName = EntityTable from mdm.tblEntity where ID = ' + CONVERT(nvarchar,@id)
EXEC sp_executesql
@query = @sqlGetEntityTable,
@params = N'@tableName NVARCHAR(100) OUTPUT',
@tableName = @tableName OUTPUT
SET @sqlGetStagingBaseTable = N'select @stagingName = StagingBase from mdm.tblEntity where ID = ' + CONVERT(nvarchar,@id)
EXEC sp_executesql
@query = @sqlGetStagingBaseTable,
@params = N'@stagingName NVARCHAR(100) OUTPUT',
@stagingName = @stagingName OUTPUT
SET @sqlRinseStaging = N'delete from stg.' + @stagingName + '_Leaf where BatchTag = ' + @batchTagName
EXEC sp_executesql @query = @sqlRinseStaging
SET @i = @@RowCount
SET @sqlLoadPurgeLeaf = N'insert into stg.' + @stagingName + '_Leaf (ImportType, ImportStatus_ID, BatchTag, Code) select 6, 0, ''AutoPurge'', Code from mdm.' + @tableName + ' where Status_ID = 2'
EXEC sp_executesql @query = @sqlLoadPurgeLeaf
SET @i = @@RowCount
if @i != 0
BEGIN
SET @executePurge = N'EXEC stg.udp_' + @stagingName + '_Leaf @VersionName = ''' + @versionName + ''', @LogFlag = 1, @BatchTag = ' + @batchTagName
EXEC sp_executesql @query = @executePurge
SET @i = @@RowCount
SET @sqlCheckErrorStaging = N'select ErrorCode from stg.' + @stagingName + '_Leaf where BatchTag = ' + @batchTagName + ' and ErrorCode != 0'
EXEC sp_executesql @query = @sqlCheckErrorStaging
SET @i = @@RowCount
if @i != 0
BEGIN
SET @errorMsg = 'Error in purging leaf entity: ' + CONVERT(nvarchar,@id)
RAISERROR (@errorMsg, 16, 1 )
END
END
END
FETCH NEXT FROM leaf_entity_cursor INTO @id, @name
END TRY
BEGIN CATCH
SET @errorMsg = ERROR_MESSAGE()
PRINT @errorMsg
BREAK
END CATCH
-- Consolidated purge
OPEN noleaf_entity_cursor
FETCH NEXT FROM noleaf_entity_cursor INTO @id, @name
WHILE @@FETCH_STATUS = 0
BEGIN TRY
if @name = @entityName or @entityName is null
BEGIN
SET @sqlGetEntityTable = N'select @tableName = HierarchyParentTable from mdm.tblEntity where ID = ' + CONVERT(nvarchar,@id)
EXEC sp_executesql
@query = @sqlGetEntityTable,
@params = N'@tableName NVARCHAR(100) OUTPUT',
@tableName = @tableName OUTPUT
SET @sqlGetStagingBaseTable = N'select @stagingName = StagingBase from mdm.tblEntity where ID = ' + CONVERT(nvarchar,@id)
EXEC sp_executesql
@query = @sqlGetStagingBaseTable,
@params = N'@stagingName NVARCHAR(100) OUTPUT',
@stagingName = @stagingName OUTPUT
SET @sqlRinseStaging = N'delete from stg.' + @stagingName + '_Consolidated where BatchTag = ' + @batchTagName
EXEC sp_executesql @query = @sqlRinseStaging
SET @i = @@RowCount
SET @sqlLoadPurgeLeaf = N'insert into stg.' + @stagingName + '_Consolidated (ImportType, ImportStatus_ID, BatchTag, HierarchyName, Code) select 4, 0, ''AutoPurge'', ''' +@entityName + ''', Code from mdm.' + @tableName + ' where Status_ID = 2'
EXEC sp_executesql @query = @sqlLoadPurgeLeaf
SET @i = @@RowCount
if @i != 0
BEGIN
SET @executePurge = N'EXEC stg.udp_' + @stagingName + '_Consolidated @VersionName = ''' + @versionName + ''', @LogFlag = 1, @BatchTag = ' + @batchTagName
EXEC sp_executesql @query = @executePurge
SET @i = @@RowCount
SET @sqlCheckErrorStaging = N'select ErrorCode from stg.' + @stagingName + '_Consolidated where BatchTag = ' + @batchTagName + ' and ErrorCode != 0'
EXEC sp_executesql @query = @sqlCheckErrorStaging
SET @i = @@RowCount
if @i != 0
BEGIN
SET @errorMsg = 'Error in purging consolidated entity: ' + CONVERT(nvarchar,@id)
RAISERROR (@errorMsg, 16, 1 )
END
END
SET @sqlGetCollectionTable = N'select @collectionTable = CollectionTable from mdm.tblEntity where ID = ' + CONVERT(nvarchar,@id)
EXEC sp_executesql
@query = @sqlGetCollectionTable,
@params = N'@collectionTable NVARCHAR(100) OUTPUT',
@collectionTable = @collectionTable OUTPUT
SET @sqlGetCollectionMemberTable = N'select @collectionMemberTable = CollectionMemberTable from mdm.tblEntity where ID = ' + CONVERT(nvarchar,@id)
EXEC sp_executesql
@query = @sqlGetCollectionMemberTable,
@params = N'@collectionMemberTable NVARCHAR(100) OUTPUT',
@collectionMemberTable = @collectionMemberTable OUTPUT
SET @sqlPurgeCollections = N'delete mdm.' + @collectionMemberTable + ' from mdm.' + @collectionTable + ' cn inner join mdm.' + @collectionMemberTable +
' cm on cm.Parent_CN_ID = cn.ID where cn.Status_ID = 2'
EXEC sp_executesql @query = @sqlPurgeCollections
SET @i = @@RowCount
if @i != 0
BEGIN
SET @sqlPurgeCollections = N'delete from mdm.' + @collectionTable + ' where Status_ID = 2'
EXEC sp_executesql @query = @sqlPurgeCollections
SET @i = @@RowCount
END
END
FETCH NEXT FROM noleaf_entity_cursor INTO @id, @name
END TRY
BEGIN CATCH
SET @errorMsg = ERROR_MESSAGE()
PRINT @errorMsg
BREAK
END CATCH
CLOSE noleaf_entity_cursor
DEALLOCATE noleaf_entity_cursor
GO
JAIS -
Material Master Record - How to remove or delete storage location
Dear all,
Is there a way to remove or delete a storage location accidentally extended via MM01 due to extending the general plant view?
I've tried the following:
1. I've used MM06 to flag the particular storage lcoation for deletion. However, when go to MM02 and select the plant view, the storage location that already been flag still exist for selection. I only get the warning prompt "The storage location has been flag for deletion".
2. I tried MMSC attempt to delete and I get either messages with different material master record:
a) "Material not fully maintained for this transaction/event"
OR
b) "Storage location 60BF already exists and cannot be deleted"
P/S: If this question has been asked before by others, please point me to that thread.
I'm grateful for any suggestion. Thanks.
StevenHi Jurgen,
I've gone through the data archiving project in the past. I was actually hoping I don't have to go through this big exercise for this minor situation.
The storage locations in the SAP system are fine. The problem is that when I came in to this organization, I found out that the procurement users have accidentally extended material master record to those storage location irrelevant to them. Those users don't post any stock to those accidentally extended storage location. They admit that it was a mistake. So, I don't really have to do stock movement or GI out from those affected storage location because there's nothing in them.
Now that I've initially flag for deletion (MM06) of those mistakes done by those procurement users over the few years counting to 2000+ material master records affected. But the standard behavior of the SAP system allows change to proceed in MM02 except for that warning message MM081. So, I was actually asking around to explore if there's actually an option to make it an error prompt instead and stop the whole change process at MM02 transaction level.
If I may re-confirm, what I've done so far via flaging for deletion of material master record at storage location level - is this the only correct solution available?
Hope this clarifies my intention of opening this thread. Sometimes, users are quite tough in accepting the results from standard SAP system behavior.
Thanks for the time in explaining.
Steven -
Question: How to remove prompt in recording using MMAPI
Hi,
we have been developing a softphone using j2me. Our goal is to record voice (using j2me) into a byte array and deliver that as a packet either through bluetooth or wifi. We need to capture voice at a certain interval, stop the capture, deliver, and then capture the voice again.
The problem is this. Everytime i call on record, the phone prompts if i indeed want to record using the MMAPI. I think that this is a security feature but is there any way to bypass it?
--Kyleprivate bool RemoveBlankPage()
Word.Application wordapp
= null;
Word.Document doc
= null;
Word.Paragraphs paragraphs=null;
try
// Start Word APllication and set it be invisible
wordapp
= new Word.Application();
wordapp.Visible
= false;
doc = wordapp.Documents.Open(wordPath);
paragraphs
= doc.Paragraphs;
foreach
(Word.Paragraph paragraph
in paragraphs)
if (paragraph.Range.Text.Trim()
== string.Empty)
paragraph.Range.Select();
wordapp.Selection.Delete();
// Save the document and close document
doc.Save();
((Word._Document)doc).Close();
// Quit the word application
((Word._Application)wordapp).Quit();
catch(Exception ex)
MessageBox.Show("Exception Occur, error message is: "+ex.Message);
return
false;
finally
// Clean up the unmanaged Word COM resources by explicitly
// call Marshal.FinalReleaseComObject on all accessor objects
if
(paragraphs != null)
Marshal.FinalReleaseComObject(paragraphs);
paragraphs
= null;
if
(doc != null)
Marshal.FinalReleaseComObject(doc);
doc
= null;
if
(wordapp != null)
Marshal.FinalReleaseComObject(wordapp);
wordapp
= null;
return
true;
This link helped me complete my project
https://code.msdn.microsoft.com/office/How-to-remove-blank-pages-e200755d -
How to deal with delete record in generic delta of generic datasource
Hi,
Anyone can give me suggestion about the delete record in generic delta of generic data. I need extract data with a generic datasource and hope deleted record in datasource also can be "delete" in next delta extraction. I do a test with generic delta. It seem that the delete record can not be updated in ODS. but updated record can be updated in next delta extraction.
How dose BW generic delta deal with the deleted record with generic delta mechanisim? Or how can I use generic delta mechanisim to realize that BW "delete" the deleted record of source system in ODS with delta extraction?
Thanks in advance!
BillyDelete is not supported in delta mechanism of generic delta extractor. You will need to add a workaround for that.
- Capture the deleted records somewhere (maybe enhance the txn deleting the record so the key is written to a Z table). Take these records to BW and manipulate the recordmode to affect deletion of corresponding record from ODS.
- If your generic delta is based on FM, and if the 'delete' is captured in change document tables, add the logic to check change document tables whether any records are deleted, and if yes, send those to BW with appropriate recordmode to achieve deletion. -
How to remove the deletion on item level in PO
Hi Experts,
How can I remove the deletion on item in a PO ? Do I need to fill the item again lower in the document?
Thanks for your help.Go to PO change mode,Select the line item and besides deletion indicator there are teo indicators one to lock PO line item and another to unlock PO line item, select the unlock one.
Save po
Regards
PK -
How to trace a deleted record from a Infotype
Hi all,
My question is simple.
When a record is deleted from a Infotype.
How do I trace it?
Which table do I have to look at for the list of deleted records in a day.
The second question is," Does this table show the complete deleted record or does it just tell us, which Infotype and which date it was deleted."
Warm regards,
Hari KiranHi,
Change log function is shut off by default. If you want trace deletion action of a certain infotype, pls check following steps:
1-Tcode:SCDO
2-Config view:T77CDOC
3-Report:RHCDOC_DISPLAY
After step1 and step2, report RHCDOC_DISPLAY will show the deletion records of a certain infotype
Br,Kee -
How to handle the deleted records from R3
Hello,
We have created a generic data source on a database table in R3 side and now we have a case where there is a huge volume of data gets deleted and new records get updated every day.
By doing a delta load we are able to load the New records and also the changed ones but we are unable to identify the deleted records from that table and move them to BI for deleteing those records in BI also.
Can any one please suggest a solution for the handling the deleted records.
Thanks,
Ravindra.we had the same requirement some time ago and had two option:
1. ask the R/3 development team add a deletion indicator in the table (and thus not actually deleting the record). this deletion indicator could then be used like for any other standard datasource
this option was however refused, due to huge data volume after a while
2. at the end of the load we copied the ZTABLE1 to ZTABLE2. then in the begin of the load (day after) we compare the data of table1 to table2. entries available in table2 but not in table1 are deleted, and we put a 'D'. in deletion indicator; as we only keep the deleted entries for one day, the volume of the new table is acceptable.
M. -
How to REMOVE AND DELETE saved customizations applied to different accounts
Hi Experts
I have created and saved a customization called *'Hidden Graph'* through the front end (under page options)
I saved this customization against different application roles (BI Consumer / BI Author)
Now I No longer need to apply customiaztiion *'Hidden Graph'*
Can someone tell me where these customizations are saved so I can REMOVE AND DELETE it ?
Thanks
HitenTo find the location and deleting from catalog, try to use catalog manager and use search xml for text 'Hidden Graph'
You can find them in sub folders of _selections folder in catalog
ex:
\users\weblogic\_selections
Just in case if you want to delete then you can do finding files like
Hidden+Graph
Hidden+Graph.atr
Nowhere mentioned deleting other than clearing check this doc once
http://docs.oracle.com/cd/E23943_01/bi.1111/e10544/dashboards.htm#sthref357
If helps pls mark
Edited by: Veeravalli on Nov 30, 2012 10:09 AM -
How to update and delete records in a text file?
Hi,
I had a text file in which contains records line by line with ',' as delimiter as I use stringtokenizer and vector to read the data.
The format in the text file likes: Name, Sex, Age.
I want to add 2 functions:
(1) update the record by name, sex or age;
(2) delete the whole line of record;
Do I need to open a temp text file to do it?
And, what is the algorithm can be suggested?
For both of them, I want to firstly read the total line numbers. Then, the line number + Name, Sex, Age will be displayed on the console window. User can choose which line of record to update or delete.
Or, user can search name in order to do that.
But, what is the backend algorithm to handle it? If I have 10 lines of record, I want to delete 7th line, the 7th line of the text file will be blanked. How can I move 8th, 9th and 10th lines of records up by one line in order to fill the blank line?
Do I need to copy the first 6 lines to a temp text file and copy the last 3 lines of records to the same temp file first? and then copy all the content of that temp file back to the original text file? If so, how can I copy the same format of the original file (with '\n') to the temp file? I need the same data structure likes Name, Sex, Age.
However, when I add records, I need to append the text in the original text file, not override it's current content.
Any advice?
Thanks
gogoIf your file is not designed to be amazingly large, then you don't need to use a temporary file -- you can just read the data into memory and manipulate it there. (Like, into a Document object or something.)
But if you are dealing with really large files, you might want to consider using a database back end instead of a text file, which is a completely different approach I know but... well, that's why databases were invented. -
How To Remove the Deletion MArk on Customer
Dear all,
I am using a customer in Test system it says message the customer marked for deletion i want to remove the mark ,How can i do that ??
Thanks
SundarHi
Use T Code XD06...
Give your
Customer number
Company Code
Sales Org.
Distr. Channel
Division
press enter
Uncheck the deletion check boxes
Problem solved
reward if helps
Muthu
Edited by: Muthupandiyan on Mar 17, 2008 5:57 PM -
How to remove recently deleted photo album off iPhone by iTunes?
Using iTunes how can i remove the recently deleted photos from my iPhone 4s?
You can't remove the "Recently Deleted"album off your iPhone. You can empty the folder or wait for the photos in the folder to age out (30 days).
This is a feature added to help the many users who accidentally deleted photos from their iPhones, iPads, etc. or later had second thoughts about the deletions. -
How to remove the delete and edit toolbar buttons from the Overview page
Hi,
In the account/contact overview page, we see that the interaction history assignment block does not support the EDIT and DELETE options.
However, when we click on the hyperlink description of an activity in the interaction history, we get into the overview page of the activity. Here we can see the DELETE button and the EDIT button.
Is there a way to remove these two options from the overview page of an activity which is in COMPLETED status and in the interaction history section?
Please advice.
Thanks & Best Regards,
Ramesh.
PS: We use CRM 5.2 Web UI.You can hide the box that shows the snippets and the "Restore Previous Session" box with code in userContent.css
*http://kb.mozillazine.org/userContent.css
*http://kb.mozillazine.org/Editing_configuration
You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
*ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
<pre><nowiki>@-moz-document url(about:home){
/* hide snippet container on the about:home page */
#snippetContainer { display: none !important; }
/* hide sessionRestore container on the about:home page */
#sessionRestoreContainer { display: none !important; }
</nowiki></pre> -
How to remove the deleted Request ID in BW
Hi Experts,
I had a full load repair REQUEST ID "REQU_xxxxxxxxx" that has been deleted from Infocube. It has also been deleted from Reconstruction.I made sure that the status was RED.
I checked in RSICPROT table, and the REQUEST ID "REQU_xxxxxxxxx" has a status "FINISHED'.
But, when I run my BEx query, unless I restrict the REQUEST ID "REQU_xxxxxxxxx" , I am not able to see any entries in the report.
Please let m know how can I get get rid of the REQUEST ID "REQU_xxxxxxxxx" so that I dont have to restrict it.Hi All,
I have not compressed my InfoCube.
My InfoCube does not have aggregates.
I have not rolled up any requests in my InfoCube.
I have checked in SE11 and my Request (REQU_xxxxxxxxxx) does not exist there.
I have deleted indexes and refreshed statistics.
Now, I see a RED light in Infocube > Performance > check indexes.
I ran my BEx query again and I still have the same error.
Please let me know what action(s) I can take
Maybe you are looking for
-
Exporting bookmarks from a Mac with broken video
I can't export the bookmarks from the broken iMac because its video has failed, but I can access the contents of its HD over the network and can see the ...Library/Caches/Firefox/Profiles folder. It seems empty but Get Info tells me it contains 380.5
-
This problem started all of a sudden on a very new Pavilion G6-1c77nr. I have absolutely no sound at all from either the speakers or the headphone jack. I did all the obvious to include making sure the mute is not on, reinstalled drivers, updated B
-
What is Invalid header signature error while using POI API
Hello all, i'm using poi api for extracting the text part from word file while uploading using the POI api. it shows the error "Invalid header signature; read 3255307777713450285, expected -2226271756974174256" Can anyone help me solve the problem. H
-
Why do all of my previously purchased app say they are no longer available?
Each time I try to download a previously purchased app, a message says it is no longer available. It even happens with my movies I've purchased. Is iCloud down or something?
-
13 GB of Other on brand new 5S
I upgraded my wife from a 4 to a 5S yesterday. It took a couple tries at removing enough music to allow the old phone to be restored on the new phone with the new Apple apps that come preinstalled. When I got enough removed I have 13 gb's of Other t