Replicate data issue

I am working on a current project that I am having trouble resolving. The issue it seems lies with data not being replicated correctly to the parent table, from the child table (yes I know replication can cause issues, this existed before I recieved this project). There are currently well over a billion rows in each table, so it is difficult to troubleshoot efficiently at times. From what I can tell the problem lies within the replicate_qd procedure but I can not be sure. Can someone else look over this procedure and possibly give some insight to something I may not have seen. To clear up some more, there are qualifiers records that are associated with raw_data records that are not populating correctly.
Sorry for the mass code:
CREATE OR REPLACE PROCEDURE AIRSRAQS.replicate_qd
pn_rd_id IN raw_data.rd_id%TYPE,
pv_qual_code IN qualifiers.qualifier_code%TYPE,
pv_action_ind IN raw_data.action_ind%TYPE
IS
-- Data Declaration
TYPE lrt_qu IS RECORD (
old_qual_code qualifiers.qualifier_code%TYPE,
old_qual_type qualifiers.qt_qualifier_type%TYPE
-- Program Data
lv_new_qual_type qualifiers.qt_qualifier_type%TYPE;
lr_qu lrt_qu;
-- Sub-Program Units
CURSOR lc_qt (lv_qual_code IN qualifiers.qualifier_code%TYPE)
IS
SELECT qt_qualifier_type
FROM qualifiers
WHERE qualifier_code = lv_qual_code;
CURSOR lc_rd (ln_rd_id IN raw_data.rd_id%TYPE)
IS
SELECT qu_qualifier_code, qt_qualifier_type
FROM raw_data
WHERE rd_id = ln_rd_id
FOR UPDATE OF qu_qualifier_code, qt_qualifier_type;
-- PL/SQL Block
BEGIN
Get the qualifier type and previous values for sample point.
Update the sample point if:
1) this is the first assignment,
2) there is a previous assignment, but that assignment was
of secondary qualifiers,
3) new primary qualifier information is being passed, which
will supercede a non-NULL previous assignment, but not
supercede a previous NULL assignment
4) the previous assignment needs nullification because
the corresponding qualifier details is being deleted.
OPEN lc_qt (pv_qual_code);
FETCH lc_qt
INTO lv_new_qual_type;
IF lc_qt%NOTFOUND
THEN
RAISE NO_DATA_FOUND;
END IF;
CLOSE lc_qt;
OPEN lc_rd (pn_rd_id);
FETCH lc_rd
INTO lr_qu;
IF lc_rd%FOUND
THEN
IF pv_action_ind IN ('I', 'U')
THEN
Case 1: -- No pre-existing values on the raw data record
Case 2: -- The pre-existing values on the raw data record are for a secondary qualifier
Case 3: -- The new value is for a primary qualifier, and the pre-existing values
on the raw data record are not for a NULL qualifier
IF (lr_qu.old_qual_code IS NULL AND lr_qu.old_qual_type IS NULL
OR ( NVL(lr_qu.old_qual_type, '@') NOT IN ('EX', 'NULL', 'NAT')
AND NVL(lr_qu.old_qual_code, '@') <> 'V'
OR ( (lv_new_qual_type IN ('EX', 'NAT') OR pv_qual_code = 'V')
AND NVL(lr_qu.old_qual_type, '@') <> 'NULL'
THEN
UPDATE raw_data
SET qu_qualifier_code = pv_qual_code,
qt_qualifier_type = lv_new_qual_type
WHERE CURRENT OF lc_rd;
END IF;
ELSE -- pv_action_ind = 'D'
Case 4: -- Previous values need to be nullified because soure qualifier details is being deleted
IF NVL (lr_qu.old_qual_code, '@') = pv_qual_code
THEN -- Nullify previous values
UPDATE raw_data
SET qu_qualifier_code = NULL,
qt_qualifier_type = NULL
WHERE CURRENT OF lc_rd;
END IF;
END IF;
END IF;
CLOSE lc_rd;
EXCEPTION
WHEN OTHERS
THEN
temp_tables.put_exception_module ('replicate_qd');
RAISE;
END replicate_qd;
If anyone could supply some another point of view it would be greatly appreciated.

There are also 2 triggers that use this procedure in them.
DROP TRIGGER AIRSRAQS.QD_BDR;
CREATE OR REPLACE TRIGGER AIRSRAQS.qd_bdr
BEFORE DELETE
ON AIRSRAQS.QUALIFIER_DETAILS FOR EACH ROW
BEGIN
IF USER <> 'SYS'
THEN
Save the rd_rd_id for later processing
Nullify primary qualifier detail from parent raw data record
temp_tables.tmp_qd_table (NVL (temp_tables.tmp_qd_table.LAST, 0) + 1).rd_rd_id :=
:OLD.rd_rd_id;
replicate_qd (:OLD.rd_rd_id, :OLD.qu_qualifier_code, 'D');
END IF;
INSERT INTO qualifier_detail_history
(rd_id, qualifier_code
VALUES (:OLD.rd_rd_id, :OLD.qu_qualifier_code
EXCEPTION
WHEN OTHERS
THEN
temp_tables.tmp_qd_table.DELETE;
temp_tables.put_exception_module ('qd_bdr');
END qd_bdr;
DROP TRIGGER AIRSRAQS.QD_BIR;
CREATE OR REPLACE TRIGGER AIRSRAQS.qd_bir
BEFORE INSERT
ON AIRSRAQS.QUALIFIER_DETAILS FOR EACH ROW
DECLARE
-- Program Data
li_index INTEGER := (NVL (Temp_Tables.tmp_qd_table.LAST, 0) + 1);
BEGIN
- Only execute trigger for non-SYS users in on-line sessions (Note: session
ID information is not assigned by L51 but should; null check effects same
results. Patch only.)
- Verify mandatory columns are valued
- Verify that the rd_rd_id reference is valid across the raw data split
- Verify that the qualifier is active
- Verify that a null qualifier is not assigned when the reported sample is valued
- Verify that only a null qualifier is assigned when the reported sample is not valued
- Replicate primary qualifier detail to parent raw data record
- Derive year indicator
- Save information for after-statement trigger validation
IF :NEW.qd_id IS NULL
THEN
-- Assign qd_id from sequence.
SELECT qd_seq.NEXTVAL
INTO :NEW.qd_id
FROM DUAL;
END IF;
IF USER <> 'SYS'
AND ( Raw_Data_Validation.is_session_online
(:NEW.ses_sga_sg_screening_group_num,
:NEW.ses_sga_up_oracle_user_id,
:NEW.ses_session_date
OR ( :NEW.ses_sga_sg_screening_group_num IS NULL
AND :NEW.ses_sga_up_oracle_user_id IS NULL
AND :NEW.ses_session_date IS NULL
THEN
Sitemon_Tools.validate_value_not_null ('RD_RD_ID', :NEW.rd_rd_id);
Sitemon_Tools.validate_value_not_null ('Qualifier Code',
:NEW.qu_qualifier_code
Raw_Data_Validation.validate_rd_id_ref (:NEW.rd_rd_id);
Raw_Data_Validation.val_rd_mod_allowed (:NEW.rd_rd_id);
Val_Rdqd (:NEW.qu_qualifier_code, :NEW.rd_rd_id);
Replicate_Qd (:NEW.rd_rd_id, :NEW.qu_qualifier_code, 'I');
Assign_Year_Ind (:NEW.rd_rd_id, :NEW.year_ind);
Temp_Tables.tmp_qd_table (li_index).rd_rd_id := :NEW.rd_rd_id;
Temp_Tables.tmp_qd_table (li_index).qu_qualifier_code :=
:NEW.qu_qualifier_code;
END IF;
EXCEPTION
WHEN OTHERS
THEN
Temp_Tables.tmp_qd_table.DELETE;
Temp_Tables.put_exception_module ('qd_bir');
RAISE;
END qd_bir;
/

Similar Messages

  • TIFF export date issue with 40D images

    Hi.
    I have a strange issue with Aperture 1.5.6, Leopard 10.5 and Canon 40D RAW images.
    The problem is this:
    1) Import a 40D RAW image in aperture.
    2) The exif image date is 13.11.07 20:21:10.
    3) Then edit the image in Adobe Photoshop CS3 (TIFF).
    4) Now we have two version of the image: the original RAW file and a TIFF file.
    5) Export the two images with aperture to JPEG files.
    Now the exif date/time of the image exported (RAW) is 13.11.07 20:21:10 and that's correct.
    The problem is that the time of the second image (TIFF) has exactly two more hour ( 13.11.07 22:21:10 ).
    In aperture the date/time is correct for both the images.
    Someone can please try to replicate this issue?

    Thanks for your reply.
    1. I select the photos from iPhoto - varied between 5 and 20 (ran different test)
    2. Click on FILE
    3. Select EXPORT
    4. Under the FILE EXPORT tab I have tried all the various options with no success
    5. KIND - I make sure they are JPEG files - I have tried the Original also which is actually JPEG files
    6. JPEG QUALITY - I have tried all 4 options from LOW to MAX
    7. SIZE - I tried all 4 size options from SMALL to FULL
    8. FILE NAME - I use filename
    9. Select EXPORT tab
    10. I export to the thumbdrive and I chcek and they are on the thumbdrive
    11. I also tried to EXPORT to the desktop and copy them to the thumbdrive
    I click on the photos on the exported images I placed on the thumb drive and they come up fine on PREVIEW on my MAC. No prroblem with the images until I try to use them on the plasma. I go back and use images from iPhoto 06 that I did not call up with the "08" program and they work fine.
    Hope that explains what I do. Thanks again

  • Data Issue

    Hi All ..
               We are facing one data issue DSO.  One record is worngly loaded with some project iD ( Ex record is having ID GE1234 insted of having LE4423) remaining details are same . we are loading the data furtherly to master data table from the DSO. if i try  for reporting for project id LE4423 ,information not avilable because it is heaving wrong ID,it is key also.But in the Source system (CFG) side Data is correct with ID LE4423.
             In update rule we are following one to one mapping for all infoobjects.My requirement is i need to have in my DSo LE4423 . I need to overwrite the record id GE1234 with LE4423 without affecting other fields in the record.
            Shall i load till PSA with the ID LE4423 ..then if load this single record to DSO will overwrite the GE1234 by choosing other field as key field.  but we are following one to one mapping in update rule.
    Please help me on this. i need to hev a correct id for record.
    Thanks ,
    Prem.

    You can use selective deletion to delete the record with Project ID = GE1234
    Load the data till PSA
    Load the data to DSO using selection Project ID = LE4423 in DTP from PSA.
    check in further data targets also for mismatch of data
    Hope it helps,
    Naveen Vytla
    Edited by: Naveen Vytla on Nov 18, 2008 10:49 AM

  • Custom report -Mb51 -EBELN,AUFNR,KDAUF & KUNNR -Data issues

    Hi,
    This custom report is related to material document list (MB51).
    I was trying to retrieve Purchase Order(EBELN),Order number(AUFNR),Sales order(KDAUF) & Ship-to-party( KUNNR) from MSEG & MKPF.
    Unfortunately
    It looks like for Sales Orders, it picks up the Customer Number but no Order Number. For STO’s, it looks like it picks up the STO # but no Customer #.
    How to over come this?
    FYI..I also tried adding fields to standard report(MB51) and it is also doing the same manner .
    Am I pulling it from Wrong tables? or is it related to DATA issues?
    Regards
    Praveen
    Message was edited by:
            PRAVEEN s

    Hi,
    This custom report is related to material document list (MB51).
    I was trying to retrieve Purchase Order(EBELN),Order number(AUFNR),Sales order(KDAUF) & Ship-to-party( KUNNR) from MSEG & MKPF.
    Unfortunately
    It looks like for Sales Orders, it picks up the Customer Number but no Order Number. For STO’s, it looks like it picks up the STO # but no Customer #.
    How to over come this?
    FYI..I also tried adding fields to standard report(MB51) and it is also doing the same manner .
    Am I pulling it from Wrong tables? or is it related to DATA issues?
    Regards
    Praveen
    Message was edited by:
            PRAVEEN s

  • Consistent Data Issues Even After Replacement

    I don't know whether to blame the phone or the ice cream sandwich update for all the problems I have been having with my RAZR. When I first got it six months ago it was great and I loved it now after the ice cream sandwich update I dont really like it anymore. I never had any sort of issues while using it on gingerbread. Today, I have seen my phone switch constantly between 3g and 4g more times than I can count over the course of half an hour. I couldn't even get a consistent signal to watch a 3 minute youtube clip.
    First off, I updated it to ICS but first wiped the phone clean including cache, etc. So it would have basically been a clean install. Now, I have certain issues. The 4g and 3g switch is terrible. On the street and in my own house I have had the same thing happen. In my house I get anywhere from 3-5 bars of 4g but it still switches over to 4 bars of 3g. I have even seen it switch from 4g to 3g when I had full bars. I have already replaced the sim cards, but I am still having these issues. It's actually happening on all 4 of my RAZRs on my family plan. I have gone through the network resets where I pull out the sim card and for 30 seconds, insert it, power on the phone, etc. I went through all 4 of them with the Rep over the phone. I have also had several instances where I did not have data but signal bars and then I didn't have absolutely anything at all. I live in a "major" city metro area, Boston, and I can't believe I am having these problems.
    At first I would have gone off and blamed Verizon, but it is definitely not Verizon, it is our phones that are terrible. I can confirm this because my brother uses an ipad (4g Verizon) on a separate account and he consistently maintains 4g even though I have seen it go as low as two bars. Yes, I understand the ipad is a different device and may have a different radio, but that is exactly how our phones used to work on gingerbread. I received a replacement device and I am still having the same issues. Also, the headset speaker, not the speaker on the back, or receiver is really tinny during phone calls even with the in call volume down half way. It is really annoying and the little tone that plays after hanging up makes the speaker sound like its about to blow out. I don't know what to do if the RAZR will keep having data issues because this is absolutely ridiculous. I know i'm not entitled to anything but for $310 a month I mean come on, I just want my phone to work properly. As I am typing this now, I have witnessed my phone switch between 4g, 3g, and no signal at least 5 times and of course my brother's iPad on Verizon has kept its 4g signal.

    Thanks for all the suggestions, but they just don't work at all guys. I've even tried that restore connectivity app from Motorola, but of course it didn't work. I don't like that I keep having constant switches between 3g,4g, and no signal bars. It's awful thats just what it is. I feel like I got gipped with this update promising better user experience. If the darned thing can't connect to their network, then what is Verizon doing to address these issues? Every time I try to do something "data intensive" (i.e. youtube, facebook, twitter, etc) the data signal just drops and I'm either left with gray bars and no data or no signal bars whatsoever. Also one thing that annoys me to death with this phone is that I have it sitting in my pocket after I lock the screen and I go to pull it out of my otherwise empty pocket. The screen is turned on by itself (I have the clear silicon case on it so the power button shouldn't be pressed by itself and no I don't wear skinny jeans), its got 3g and no bars, and its piping hot.
    WHAT IS WRONG WITH THIS PHONE VERIZON???!!!

  • Master data Issue  ---   materials have unassigned or # values ...!!

    Hello Experts,
    I am facing an issue that the Customer Data is missing in a BEx Report.
    Data Flow is   2LIS_13_VDITM  --> DSO1 --> Merging DSO -->  Cube --> Multiprovider --> Bex Report.
    Exact issue is Customers in the Bex Report  has unassigned to Sales Office, Sales Group, Sales District.
    The only reason a customer should show up under u201Cunassignedu201D or u201C#u201D is if itu2019s improperly set up in the system.
    customers are assigned with two values. one which has data and the other which has unassigned value.
    I wanted to know, how do i check if the matierials are valid to have unassigned Values ?
    Checked the Merging DSO and saw that there are actually values assigned values for the affected matierials.
    After that checked the Cube data values are displayed except the Master Data values.
    I guess..its completely related to Master data. I would like to know how can i resolve this issue.
    Please reply me if you face this kind of master data issue in your expeiriance.
    Thanks,
    SN.

    Hi,
    Are Sales Office, Sales Group, Sales District are attributes of Customer?
    In case they are, then the customers will be unassigned to Sales Office, Sales Group, Sales District in case the data for these attributes is loaded to the customer attributes.
    and also check if the customer characteristic is properly assigned in the multiprovider.
    Check if it helps.
    Regards,
    Joe

  • OBIEE 11g .0d date issue

    Hi,
    I create an initialization block to populate a couple of repository variables.
    After saving the RDP the value for the default initializer changes from 2011 to 2011.0d
    I have been using several workaround. But I need some permanent fix in rpd itself. Can anyone point to some Oracle Document? Is this issue been resolved in latest release of OBIEE. I am using 11.1.1.6.6.
    Workaround Ref : The .0d date issue
    Re: OBIEE 11.1.1.6.2 BP1 Repository Variable data type

    Have you gone through my suggestions at the below links?
    The .0d date issue
    Re: OBIEE 11.1.1.6.2 BP1 Repository Variable data type
    You have to do it where ever you are using that rep. variable not in the init block.

  • Verizon mades changes in the coding and now Windows Phone 7 is having data issues!!!

    Starting about 3 weeks ago, I stopped receiving text messages and even worse stopped receiving calls yet alone my voicemails.  I have changed not one thing to my phone, everything is exactly the way it was before the issues arised.  Now I have to trick my phone to receive my data by dialing into my voicemail...  And then what do you know, 30 text mesages, 12 voicemails!!!
    The voicemails wont even tell you the date or time stamp (the time the voicemail was received).  After numerous *228 and talking with level 2 over the holidays, I see a huge article on multiple news sites stating Verizon is having data issues...  Dropped calls, loss of data, no signal while all our phone keep showing full bars and 3g.  Verizon stated its only happening on there 4gLTE system and not 3G but thats a load of crap.
    All one has to do is a google search of loss of text messages or voicemails on Verizon and you will see 100's up to 1000's of users like you and me all experiencing the same issues.  And not just with Windows Phone 7, but with there baby Driod and iPhone as well.
    What really ****** me off is that Verizon loves to play the blame game or pass the buck game.  Hard Reset your phone and that will solve the problem...  Yeah Right.  If this was our OS and we updated a driver that changed the OS in the background I can see that being the solution.  But for the 100's or 1000's of users that go to work daily, check there emails and text daily, and haven't changed one thing on the phone... THIS IS UNACCEPTABLE!!!
    Now I read an articile for someone extermely close to Microsoft stating that Verizon turned down Nokia's new 4GLTE phone because they have no faith in the operating system and I have to think that maybe behind the scenes Verizon is trying to force us off Windows Phone 7 platform with data issue behind the scene and try to get us all into the Droid Platform which they make 50% of the cash off the phone just like the iPhone...
    This is a joke, and I am really starting to think about going to ATT and getting the HTC Titan or the new Nokia 900.  I have already research a 3 party app that will allow you to backup and restore your phone.  And just read that Microsoft just put out an ad for backup, restore and cloud backup programmers for this latest feature.
    Verizon the games need to stop, Verizon you need to stand behind this Platform, Verizon you need to provide better service for all us 3G users!!!
    TheJester77

    Starting about 3 weeks ago, I stopped receiving text messages and even worse stopped receiving calls yet alone my voicemails.  I have changed not one thing to my phone, everything is exactly the way it was before the issues arised.  Now I have to trick my phone to receive my data by dialing into my voicemail...  And then what do you know, 30 text mesages, 12 voicemails!!!
    The voicemails wont even tell you the date or time stamp (the time the voicemail was received).  After numerous *228 and talking with level 2 over the holidays, I see a huge article on multiple news sites stating Verizon is having data issues...  Dropped calls, loss of data, no signal while all our phone keep showing full bars and 3g.  Verizon stated its only happening on there 4gLTE system and not 3G but thats a load of crap.
    All one has to do is a google search of loss of text messages or voicemails on Verizon and you will see 100's up to 1000's of users like you and me all experiencing the same issues.  And not just with Windows Phone 7, but with there baby Driod and iPhone as well.
    What really ****** me off is that Verizon loves to play the blame game or pass the buck game.  Hard Reset your phone and that will solve the problem...  Yeah Right.  If this was our OS and we updated a driver that changed the OS in the background I can see that being the solution.  But for the 100's or 1000's of users that go to work daily, check there emails and text daily, and haven't changed one thing on the phone... THIS IS UNACCEPTABLE!!!
    Now I read an articile for someone extermely close to Microsoft stating that Verizon turned down Nokia's new 4GLTE phone because they have no faith in the operating system and I have to think that maybe behind the scenes Verizon is trying to force us off Windows Phone 7 platform with data issue behind the scene and try to get us all into the Droid Platform which they make 50% of the cash off the phone just like the iPhone...
    This is a joke, and I am really starting to think about going to ATT and getting the HTC Titan or the new Nokia 900.  I have already research a 3 party app that will allow you to backup and restore your phone.  And just read that Microsoft just put out an ad for backup, restore and cloud backup programmers for this latest feature.
    Verizon the games need to stop, Verizon you need to stand behind this Platform, Verizon you need to provide better service for all us 3G users!!!
    TheJester77

  • Data issue in IDOC

    Hi Experts,
    I do the following steps to generate IDOC for Passing over payroll data to ADP.
    I run the payroll and Run the coombined Payroll export and go to WE05 to chk for idoc.
    I have some data issue here. I need the IDOC to Pick 0167 infotype information. For few employees if does generate but for few it does not generate the info in IDOC. Please help me as to how to navigate this problem as iam very new to payroll and as weel as IDOc's.
    Thanks
    Chowdary

    Hello,
    Please try your luck with this.
    Go to BD87 see the error message why this idoc is not moved. some time retrying will you success.
    else also you find the problem in the error message.
    thanks

  • Date Issue

    Hello,
    I am a little stuck on a date issue. I need to calculate something like this for a selection criteria formula:
    I need to return this:
    Today is CurrentDate (11/8/2011) - therefore I want to return or calculate next Sunday 11/13/2011 then add 6 days to
    11/13/2011 - 11/19/2011
    So, in English I'd need
    > 11/8/2011 (CurrentDate), find Next Sunday's date (11/13/2011) add 6 days to next Sunday's date (11/13/2011) to get 11/19/2011

    dayofweek(currentdate)
    will give the the day number of the date (1 is Sunday)
    You can use this to generate the dates you need.
    For instance,
    if dayofweek(currentdate)=2 then currentdate + 6
    will give you the next Sunday's date
    Debi
    Edited by: Debi Herbert on Nov 8, 2011 11:44 AM:
    Sorry Ian, I guess was working on this the same time you were. I was just a little slower than you (I had to look it up in my master report of formulas)

  • Date issue in processing billing documents that shipped in a prior period

    Date issue in processing billing documents that shipped in a prior period that is now closed:
    SAP values those deliveries with the current document date in A/R when it should be the original delivery date.  Baseline date needs to stay the delivery date, but is getting copied from the billing date in the new period.  A user exit exists (& needs to be applied) to manipulate the baseline date when the accounting document is being created.
    Any input is appreciated.

    Hi
    Try with Invoice Correction Request concept
    Sale document Type: RK
    Reference Document Type : Billing Number
    for Understanding the Invoice Correction request check below link
    [Creating Invoice Correction Requests|http://help.sap.com/saphelp_46c/helpdata/en/dd/55feeb545a11d1a7020000e829fd11/content.htm]
    Regards,
    Prasanna

  • How to replicate data from MS SQL Server  to Oracle

    Hi,
    Can someone please help me on how to replicate data from MS SQL Server to Oracle 8i database.

    Dear,
    I'm a student.
    I do simple replication on Oracle 8.0.5 successfully. (one master site and one snapshot site). I only use the SQL*Plus and Schema Manager to do.
    But when I do advance replication (multimaster replication) I meet many problem. So I don't get the result.
    Do you show me the technology to do that ?
    Thanks !

  • Overlap date Issue 0hrposition_attr

    Hi
    I'm facing one records overlap date Issue with 0hrposition_attr.Out of 4  records one records i'm getting as start date as future date and end date as past date.I checked in the source i did not see such records.Due to this issue the records are not updated in the target.But i did not notice such issue with 0hrposition_Text  and 0HRPOSITION_CCTR_ATTR load went fine with out any over lap.
    Eg:
    POSITION          VALID FROM          VALID TO
    12345678            04/01/2014            04/20/2014
    12345678            04/21/2014            04/24/2014
    12345678            04/25/2014            04/24/2014
    12345678            04/25/2014            12/31/9999
    I debug  but i did not see any issue,So there any way that  i can delete that particular  records at PSA level so that loads went successful.I attacdshed the document for better idea.
    Regards
    Raj

    Hi,
    only these record is getting the problem and all records.
    check the one record at RSA3 for testing purpose same record check in BW side.
    if you getting like this not problem you can check the only latest record
    12345678       
    04/25/2014       
    12/31/9999
    put the filter at VALID TO data 12/31/9999 and form date 04/25/2014.
    you want lookup the code just add the one more point.
    WHERE POSITION = RESULT_PACKAGE- 0POSITION
         and DATETO = '99991231'.
    it will pick the only latest record.
    Thanks,
    Phani.

  • VPD date issue between 10.1 and 10.2 databases

    I have uncovered an issue today with VPD against date fields. The issue came up at a client site on a 10.2 database. When I got back to the hotel and tried this on my own database, which is 10.1, I got no issue and everything worked ok.
    Therefore, I am asking if anyone is able to try out the following for me on different Oracle databases and platforms and let me know whether it worked for you or not. I'd like to compile a list of database versions and platforms on which the issue occurs.
    Step 1: create this table as a user
    CREATE TABLE TST_DATE AS (
    SELECT 1 PERSON_UID,
    Trunc(SYSDATE) BIRTH_DATE,
    To_Char(Trunc(SYSDATE), 'DD-MON-YYYY') CHAR_DATE,
    123456 TAX_ID,
    'Smith, Michael B.' FULL_NAME FROM dual);
    Step 2: grant select rights on the table
    GRANT SELECT ON TST_DATE TO PUBLIC;
    Step 3: switch your login to SYS and run this script:
    CREATE OR REPLACE FUNCTION F_CHECK_ITEM_TST(p_object_schema in varchar2, p_object_name varchar2)
    RETURN VARCHAR2 IS
    V_PREDICATE VARCHAR2(2000) := '1 = 2';
    BEGIN
    RETURN(V_PREDICATE);
    END F_CHECK_ITEM_TST;
    Step 4: As SYS, run this to grant access rights over the function
    GRANT EXECUTE ON F_CHECK_ITEM_TST TO PUBLIC;
    Step 5: As SYS, run this to enable the policy
    BEGIN DBMS_RLS.ADD_POLICY(
    OBJECT_SCHEMA => 'DRAKE',
    OBJECT_NAME => 'TST_DATE',
    POLICY_NAME => 'SecByTST',
    FUNCTION_SCHEMA => 'SYS',
    POLICY_FUNCTION => 'F_CHECK_ITEM_TST',
    STATEMENT_TYPES => 'SELECT',
    POLICY_TYPE => DBMS_RLS.DYNAMIC,
    SEC_RELEVANT_COLS => 'BIRTH_DATE',
    SEC_RELEVANT_COLS_OPT => DBMS_RLS.ALL_ROWS);
    END;
    Note: in the above policy change the OBJECT_SCHEMA name to be the name of the user who owns the table you created in Step 1
    Step 6: Go into Discoverer Admin and import the table as a new folder.
    Be sure to uncheck the "Date hierarchies" box and set "Default aggregate on data points" to detail. Grant access to any user.
    Step 7: Using Desktop or Plus, log in as that user then try to query the folder with the date not included, there should be no problem.
    Step 8: Now try to query with the date included
    On my 10.2 database I get ORA-24334: no descriptor for this position. This happens when logged into Discoverer as the table owner, EUL owner or any other user. However, when logged into Discoverer as SYS which is exempt from all VPD policies, there is no error when the date is included.
    We tried this in Discoverer Desktop, Plus and Viewer with the same results in all three. We can successfully query the table from SQL*Plus, SQL Developer and TOAD.
    There also seems to be no issue at all with the 10.1 database so there seems to be an issue between Discoverer and the 10.2 database.
    What do you think?
    P.S. to cancel the policy use this script when logged in as SYS:
    EXEC DBMS_RLS.drop_policy(
    OBJECT_SCHEMA => 'DRAKE',
    OBJECT_NAME => 'TST_DATE',
    POLICY_NAME => 'SecByTST');
    This same information is available on my blog in a more readable format here:
    http://learndiscoverer.blogspot.com/2006/12/vpd-date-issue-between-101-and-102.html

    Hi Rod
    Well don't you just love Oracle. Obviously, whatever tests were done for certifying Discoverer against the 10.2 database did not include checking VPD policies. This merits a blog entry from me.
    Your workaround for V_PREDICATE VARCHAR2(2000) := 'BIRTH_DATE=TO_DATE(''01-JAN-0001'')'; works. However, I had to write a new function to do this because my real function was trapping about a dozen items at the same time, some dates, some numbers and some varchars - exactly the way that the Oracle example code shows it in the 10.2 database manual.
    So what I did was to create a new function that only handles dates and added a dedicated policy that works with only that function. Unfortuately, because I have many dates to manage, I was unabe to hard code the BIRTH_DATE so here is what I did:
    V_PREDICATE VARCHAR2(2000) := 'SYSDATE = TO_DATE(''01-JAN-0001'')';
    This works perfectly and Discoverer stopped complaining. It just has two policies on the same table for different data items. Isn't VPD cool? I'm hooked.
    I really appreciate your time and effort on this. Now, let's see what Oracle support make of the issue because I raised a service request last night. No reply yet I'm afraid.
    Best wishes
    Michael

  • IOS 8.3 data issues

    There is no doubt in my mind that there is a data issue with iOS 8.3 and Verizon.  Since I installed the update a week ago, my phone has gone through over 4.6 gb of data (prior to installing the update, I had used .7 gb for the prior 3 weeks before that).  I have never gone over 2 gb of data on my phone for any period before that for years.  This was verified by downloading the daily data usage from the Verizon website.
    I suspect that this is whenever I leave my home.  I left the house for 10 minutes today and went through approximately 100mb of data (i had reset the cellular data usage before I left the house).  I have access through an exchange server through my work but this is so beyond excessive at this point.  I have already doubled my data usage for this month and increased my plan to minimize overages and i've already maxed that out.  I'm so beyond frustrated at this point and would love to get back to the prior version but i'm weary of bricking my phone that I use for work.  I've tried rebooting several times, reseting from an older backup, etc.

    I had a similar problem over a year ago- blowing through cellular data (even in middle of night).
    The only fix was to backup the phone (iTunes or icloud) and then do a full reset/erase all content and data - basically a factory reset
    Then restore the backup.
    Nothing else worked for me.

Maybe you are looking for

  • E-mail synch, read/unread, how can I set this up?

    I'd like to refer to an older question I found which hadn't been answered properly. https://discussions.apple.com/thread/3557308?start=0&tstart=0 Quite simply, the question is; I have my work e-mail, my Hotmail and my Gmail all set-up on my iPhone 4S

  • Ok code is not getting in bp transaction

    HI All, Using BUPT i have added some custom fields in transaction BP for the role SAP Credit Management Under the Tab Fiscal Year Information. In my custom screen I have used the FM FS02_BUPA_BP021_GET to get the values in Fiscal Year Tab. Now my req

  • How to control the diffeence qty in MB25

    In MB22 - Reservations, suppose a line item of the movement type is deleted then the DIFFERENCE QTY at MB25 should show ZERO. How to do this? Thanks Ven

  • Migo Error in transfer posting

    Dear gurus In Development server when im performing Good Receipts against process order movement type the valuation type box is disabled but in production server the valuation type box is enable why is it so ? Regards Saad Nisar

  • Re-sorting album info in i-tunes

    Hey guys Quick question, probably a duplicate but nevermind. When going through the i-tunes set-up, I clicked for i-tunes to auto-arrange my music for me. Little did I know it would arrange albums alphabetically rather than year of release. Eg. Beatl