Capture Deleted Records without Db objects
Hi
Does anybody help me on this..
i need to capture all deleted/inserted/updated
records from a set of tables A,B,C on particular day(for e.g today)..without creating any db objects like triggers or any client based code like form triggers only by using SQL/PL/sql or stored procedure...
thanks in advance
V V
null
A possible way to do this is to use the LogMiner utility with 8i.. Logminer will allow you to view the DML operations by interrogating your Redo Logs. This is also an offline operation so your db performance will not be impacted.. Check out the 8i documentation for usage notes..
-David
Similar Messages
-
i'm new to oracle.I want to create a trigger which inserts the records deleted from emp table to some other table.
thanks in advanceashish 1901 wrote:
I want to create a trigger which inserts the records deleted from emp table to some other table.This is a relatively standard use of triggers for auditing. You can use AFTER triggers to use the :old record values to copy deleted values into a new table if you wish.
Warning: triggers can be a bit tricky to work with in that they can go off-line without warning when their table is modified. -
Can't delete Symbol without expanding object
I have a 3D Extrude & Bevel effect on an object. I mapped a symbol to it, but then I cleared the symbol from the Map Art dialog by clicking "Clear All." Now I am trying to clean up the file, and when I go to delete the symbol from the Symbols panel, I get the message about the symbol being in use and the choice to expand or delete.
The Symbol is NOT mapped to anything in the file, and I don't want to expand the 3D Live Effect. I fianlly had to clear the appearance altogether, then delete the symbol. Shouldn't I be able to delete the symbol if it's not in use?function(){return A.apply(null,[this].concat($A(arguments)))}
...the original art for the symbol becomess and instance for the symbol...
Depends on version.
JET -
Delete record using multi select ...
Hi All,
I have a form associated with 4 reports region and retrieve report for that specific customer. In one report, i have option to delete the saved image by using multi selector check box (single or multiple) and hit the delete button. It works fine if there is no records for the other reports. i can upload image and delete record without any problem. As soon as I have records for other reports, multi selector does not work. when I try to delete, i get this error message -
ORA-20001: Error in multi row delete operation: row= 13, ORA-01403: no data found, delete from "RATIS"."RTT_FILES" where "FIL_ID" = :p_pk_col
Error multi row operation failed.
but if I remove the records for the other report, it works again. I have only one process for multi delete in this page. Seems it is conflicting with the other reports when trying to delete.
Can anybody help with this please?
Thanks,
TajuddinHi
That depends if the other "reports" are actually tabular forms as well? If they are, see:
http://apex.oracle.com/pls/otn/f?p=31517:163
this explains how to set up more than one tabular form on a page.
Otherwise, we would probably need to see your code to see what may be happening
Andy -
Insert/Query records of custom objects
We are looking for a generic programmatic solution to query/insert/delete records of custom objects. Using different WSDLs for custom objects and making calls to APIs of multiple stubs is NOT a generic solution. The main purpose of generic solution is – least bother about the number of custom objects present in any OCOD instance and their WSDLs. I am a bit ready to take minor hit on performance and others.
Any suggestion? Idea?We are looking for a generic programmatic solution to query/insert/delete records of custom objects. Using different WSDLs for custom objects and making calls to APIs of multiple stubs is NOT a generic solution. The main purpose of generic solution is – least bother about the number of custom objects present in any OCOD instance and their WSDLs. I am a bit ready to take minor hit on performance and others.
Any suggestion? Idea? -
Select records without deletion marker?
I am trying to load data from the datasource 0INSP_CHAR, but I get a number of errors because I see duplicate records. Most of the records has a deletion-marking, but how do I select the records without deletion marker when I can only set a to- and a from-value? The records I want has no entry in the field so I cannot think of any entry that will select the correct records... Selection A to V and Y to Z does not work...
An other subset of the records differ only on a 'valid from'-field. So I thought I could put the data in an ODS and then select the record with the most recent 'valid from'-date. But I cannot see how to make sure that the newest record overwrite the older one. Is that because the setup I am planning is impossible...?
An other strange thing is that the datasource has five characteristics and two other fields that are not mapped to an info object. I can use them for selection, but I cannot load the data to BW...?
Regards,
Christian FrierHi Christian,
normally if you make your attributes time depending in the attribute screen of 0insp_char you should be able to load the data. If you want to get rid of the 'deleted' records, create a start routine in the transfer rules and delete all records from datapak with that flag.
Your second question should also be solved by having everything time dependent.
regards
Siggi -
Can we change datatype without deleting records ?
Hi all ;
Without deleting records in a table , can we change datatype in oracle 10g and 11g ?
SQL> desc emp
Name Null? Type
NO NUMBER
NAME VARCHAR2(10)
CITY VARCHAR2(15)
DEP_ID NUMBER
SQL> select * from emp;
NO NAME CITY DEP_ID
1 madhir calcutta 10
SQL> alter table emp modify(dep_id varchar2(5));
alter table emp modify(dep_id varchar2(5))
ERROR at line 1:
ORA-01439: column to be modified must be empty to change datatype
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - ProductionSee 'Modifying an Existing Column Definition' in the DBA Guide
http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables006.htm#i1006645
Use the ALTER TABLE...MODIFY statement to modify an existing column definition. You can modify column datatype, default value, column constraint, column expression (for virtual columns) and column encryption.
You can increase the length of an existing column, or decrease it, if all existing data satisfies the new length. You can change a column from byte semantics to CHAR semantics or vice versa. You must set the initialization parameter BLANK_TRIMMING=TRUE to decrease the length of a non-empty CHAR column.
If you are modifying a table to increase the length of a column of datatype CHAR, realize that this can be a time consuming operation and can require substantial additional storage, especially if the table contains many rows. This is because the CHAR value in each row must be blank-padded to satisfy the new column length.
And the ALTER TABLE statement in the SQL Language doc
http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_3001.htm#SQLRF01001
modify_col_properties
Use this clause to modify the properties of the column. Any of the optional parts of the column definition (datatype, default value, or constraint) that you omit from this clause remain unchanged.
datatype You can change the datatype of any column if all rows of the column contain nulls. However, if you change the datatype of a column in a materialized view container table, then Oracle Database invalidates the corresponding materialized view.
You can omit the datatype only if the statement also designates the column as part of the foreign key of a referential integrity constraint. The database automatically assigns the column the same datatype as the corresponding column of the referenced key of the referential integrity constraint.
You can always increase the size of a character or raw column or the precision of a numeric column, whether or not all the rows contain nulls. You can reduce the size of a datatype of a column as long as the change does not require data to be modified.The database scans existing data and returns an error if data exists that exceeds the new length limit. -
Deleted records are not captured in 2lis_02_itm
Hi SDN,
I am extracting Purchase order records(more specifically Outline agreements ME23K) from 2LIS_02_ITM.
When I delete a PO with Purchase Order History in ME23K and save it I am able to see the change recorded in LBWQ and now i run the collective run in LBWE I can see the total coloum in RSA7 filling with value 1.
Now when i try to see the record in in RSA7 it is showing nothing and also when the delta infopackage is run zero records are being pulled.
In a nutshell I am missing the deleted records with Extractor.
Is there any way I can see the actual delta record sitting in LBWQ after the deletion is posted.
Please help me out folksHi,
check this notes:
FAQ: Business Warehouse (BW) in Purchasing
SAP Note Number: [459517|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bct/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d343539353137%7d]
Note [527490|https://websmp130.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=527490] - BW: Deletion indicator not set correctly - Part 2
Regards
Andreas -
Editable ALV, capturing multiple record changes
Hello
I am writing the editable ALV prog. (because of some reaosn am using FM - REUSE*) and i need to capture the user changes on the list, but, when i searched, i found the below code, where in i can get only one change/record (because am getting importing formal parameter is a structure), but, i need to get all records user changes, multiple.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Pls. let me know how to capture all records/changes? I saw BCALV, but, all they are on OOPS.
Thank youHi Raju,
no chance without oo event data_changed.
You can get the grid object from the function module, I think FM LVC_GET_GLOBALS or something like that. Then implement method
METHODS: handle_data_chg FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
In SET_STaTUS event of the function module, you can extract the grid object and registr your own handler.
But, honestly, I'm not convinced this will be easier for you than changing to OO grid.
Regards,
Clemens -
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 -
Greetings,
I promoted a 2012 domain controller, with new name and IP, shutdown the old DC and re-ip'ed new DC with old IP address.
after reboot everything is working fine. I would like to deleted the old DC object name from the AD. can I do so without interruption?
Thank youDemotion using DCPROMO would have been the preferred way to go.
You should however be able to get away with deleting the computer object for the old DC using AD Users and Computers. The metadata cleanup is now included in the modern UI, so you shouldn't need to use NTDSUtil to do the cleanup of references to the
old DC.
I would also manually remove the NS record for the old DC from your DNS zone(s) as this is not handled by the object deletion.
Also, have a good look through the DNS records anyway and see if there are any references to the old name (A, SRV records) and delete them manually if you find some.
Alexei -
Best approach to delete records that are not in the source table anymore.
I have a situation where I need to remove records from dimensions that are not in the source data anymore. Right now we are not maintaing history, i.e. not using SCD but planning for the next release. If we did that it would be easy to figure the latest records. The load is nightly and records are updated and new added.
The approach that I am considering is to join the dimension tables the the sources on keys and delete what doesn't join. However, is there perhaps some function in OWB that would allow to do this automatically on import so it can be also in place for the future?
Thanks!Bear in mind that deleting dimension records becomes problematic if you have facts attached to them. Just because this record is no longer in the active set doesn't mean that it wasn't used historically, and so have foreign key constraints on it in your database. IF this is the case, a short-term solution would be to add an expiry_date field to the dimension and update the load to set this value when the record disappears rather than to delete it.
And to do that, use the target dimension as a source table, outer join it to the actual source table on the natural key, and so your update will set expiry_date=nvl(expiry_date,sysdate) to set to sysdate if this record has not already been expired on all records where the outer join fails.
Further consideration: what do you do if the record is re-inserted into the source table? create a new dimension key? Or remove the expiry date?
But I will say that I am not a fan of deleting records in most circumstances. What do you do if you discover a calculation error and need to fix that and republish historical cubes? Without the historical data, you lose the ability to do things like that. -
Error on activation of data records from ODS object
hi,
Kindly help with my BW Problem, the error occured on the
activation of ODS. The error says "<i>Request
REQU_43MNOPW29W4F5M037J7OAFP52 in ODS ZPUR_O01 must have QM
status green before it is activated</i>" and "<i>Activation of data
records from ODS object ZPUR_O01 terminated</i>"
I tried to check the data in the ODS Object by choosing
<LS>Administrator Workbench > data targets > context menu on ODS
Object ZPUR_O01 but the status are green and when i tried to
activate it the logs says "<i>ODS object ZPUR_O01 was built
incorrectly. Cannot update request
REQU_43MODQ3GF69X17B71ZKQMN85I(20,154)
ODS object ZPUR_O01 was built incorrectly. Cannot update request
REQU_43MQ8A8F0L1US5COQTUUWX3BA(20,155)
ODS object ZPUR_O01 was built incorrectly. Cannot update request
REQU_43MQ8OQQTY21YQ37RMA1WMO06(20,156)
Data to be activated successfully checked against archiving
objects
Activation of data records from ODS object ZPUR_O01 terminated</i>"
Please help me with this problem.Hi Jay
U need to update these requests to ODS
REQU_43MODQ3GF69X17B71ZKQMN85I(20,154)
REQU_43MQ8A8F0L1US5COQTUUWX3BA(20,155)
REQU_43MQ8OQQTY21YQ37RMA1WMO06(20,156)
1) delete the current request
2)Reconstruct the requests above three request
3)and then Load the current reqest (REQU_43MNOPW29W4F5M037J7OAFP52)
Then only u will be able to activate the ODS....
This is an serialization issue...
hope it helps
regrds
AK
assign points if usefull -
Insert ,Change and Delete records in OO ALV
Hi All,
This is regarding the functionlaties Insert ,Change and Delete records in OO ALV ,
I have gone through the threads posted here and checked the standard program BCALV_EDIT_04,
but still I am not able to capture the Deleted and Inserted records,
as I am new to OO ALV,can some one help me out pls.
Thanks and regrds,
Sree.Hi Sree,
A lot of material is available on SDN.
Please see this link. This link contains good example of insertr, delete records in OOPS ALV.
[OOPS ALV.|Re: Insert ,Delete & Add a row in ALV;
May it helps you.
Regards.
DS. -
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.
Maybe you are looking for
-
Error Occured while processing a Request-openning a another coldfusion page from old page link
in one page there is dynamic link in that i want to open anather page... code is compiled ok and page is at place where i refered a link but it gives error 'error occured while processing a request' Error Diagnostic Information An error has occurred.
-
Cannot use Remote Desktop host on Windows 8.1 Pro, termsrv corrupted?
Hello, Few days ago I upgraded my home desktop machine from Windows 8.1 to Windows 8.1 Professional so I can use the Remote Desktop feature. I enabled everything needed, checked "Allow computers to connect to this computer" from the Remote Settings,
-
How do I run the SW in single phase mode?
How do I run the SW in single phase mode?
-
Please Help: Left Columns Cut off Printing Landscape Dynamic Table
I have designed a form with a table designed to print landscape on a letter size paper. The form has an Add row button creates rows that can span multiple pages. The form prints correctly in the PDF Preview tab but when tested with adobe reade 11 the
-
When I export a portion of the timeline as a Clip Note, the PDF viewer always shows the starting frame as 00. When I import the Clip Note comments, the comments appear but always referenced to the first frame of the sequence and not to the portion of