SQL Loader loads duplicate records even when there is PK defined

Hi,
I have created table with pk on one of the column.Loaded the table using sql loader.the flat file has duplicate record.It loaded all the records without any error but now the index became unusable.
The requirement is to fail the process if there are any duplicate.Please help me in understaing why this is happening.
Below is the ctl file
OPTIONS(DIRECT=TRUE, ERRORS=0)
UNRECOVERABLE
load data
infile 'test.txt'
into table abcdedfg
replace
fields terminated by ',' optionally enclosed by '"'
col1 ,
col2
i defined pk on col1

Check out..
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_modes.htm#sthref1457
It states...
During a direct path load, some integrity constraints are automatically disabled. Others are not. For a description of the constraints, see the information about maintaining data integrity in the Oracle Database Application Developer's Guide - Fundamentals.
Enabled Constraints
The constraints that remain in force are:
NOT NULL
UNIQUE
PRIMARY KEY (unique-constraints on not-null columns)Since OP has the primary key in place before starting the DIRECT path load, this is contradictory to what the documentation says or probably a bug?

Similar Messages

  • Dax Calculate column even when there is no record at a date

    We are creating a powerpivot model based on a table with data about worktasks of our employees.
    This is simplified our input:
    Tasknr date started dateended
    1 20140101 20140201 (yyyymmdd)
    2 20140102 20140103
    3 20140104 20140108
    Etc
    We created two measures to calculate how many tasks are opened and closed per day. That was no problem, but now the tricky part. We also want to know each day how many tasks are
    still open, even on days that no tasks are opened (or closed).
    My approach was to create a calculated column to determine how many tasks are opened up to that date and subtracted the closed tasks and end up with the tasks that are open. That
    seems to be working :
    =COUNTROWS(FILTER(Tasks; Tasks[Open]<=EARLIER(Tasks[Open]))) - COUNTROWS(FILTER(Tasks; Tasks[Close]<=EARLIER(Tasks[Open])))
    When I load this to the excel pivot I end up with this:
    Row Labels| Opened | Closed | Open not finished
    1/1/2014
            1         
    0          1
    1/2/2014        
    1          0         
    2
    1/3/2014
            0         
    1         0
    1/4/2014
            1         
    0         2
    The line with 1/3/2014 should have 1 in the column [opened not finished], but because that calculation is linked to the opendate column, not to the closed and 3/1/2014 no task
    was opened, there is no value. On days that no tasks are opened or closed there even is no line at all although there could be tasks that are still open.
    I need a mechanism that calculates the value even when there are no records
    on a particular day. Our users want to be able to view the results on any date they select.
    I have considered a second table with all the dates and calculate columns from the task-table but are there other ways to do this? I searched this forum but did not find an answer
    so far.

    Hi Jacob,
    In our company we have a standard date table that is included in all of our models. What I didn't want to do in this case was to extend that table with calculated fields to solve this issue. Alternative was to create a new date table with the calculated
    fields I needed. But I don't like that also so what I did was rewrite the sql that loaded the data into the pivot so that the measures were calculated at the load. But I am also not happy with that solution because of maintanance and performance reasons. My
    feeling is that there must be a way to solve this with only dax in the loaded table.
    Jacob's answer does exactly what you want. The DAX expression in his response is a measure which you could put in your Tasks table. You don't need to alter your date dimension in any way.
    The key to this technique is that the date table cannot have an active relationship to your Tasks table. (although you could have an inactive relationship and then you could use the USERELATIONSHIP function to make other measures easier to calculate)
    Translating Jocob's measure into something against a 'Tasks' table would looks like the following:
    =
    CALCULATE (
    COUNTROWS ( Tasks ),
    FILTER (
    Tasks,
    Tasks[Open] <= MAX ( Calendar[Date] )
    && Tasks[Closed] >= MAX ( Calendar[Date] )
    http://darren.gosbell.com - please mark correct answers

  • Why do only some of my photos load to photo stream even when taken on the same day?

    Why do only some of my photos load to photo stream even when taken on the same day?

    Hello Karelyn,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iCloud: My Photo Stream troubleshooting
    http://support.apple.com/kb/ts3989
    I don't see photos in My Photo Stream on my iOS device.
    Ensure that the Camera app is closed on the device that took the photo. Photos will not upload from an iOS device to My Photo Stream until the Camera app is closed.
    Ensure that your iOS device has not fallen below 20% battery power. To preserve battery life, Photo Stream downloading and uploading are disabled when the battery reaches this threshold. Downloading and uploading will resume once you charge your device and the battery charge is greater than 20%.
    Best of luck,
    Mario

  • 'Load Paper' error message even when paper is loaded in the front load tray

    Load Paper Error message -
    Printer type: HP OfficeJet 6500 Wireless All-in-One Printer
    (possibly other HP printers as well)
    This 'How-To' article will help you solve a 'Load Paper' error message even though there is paper in the front load tray. You can read this helpful article at http://mikeyates.com/wordpress/?cat=187
    This could also help other HP printers with no easy access to the drop down type rollers located inside the printer.
    Would appreciate any feedback if this worked for you or not.
    Thanks
    Mike

    This is what I found: printer eventually wants to see color ink after running months without.  Steps I followed were: remove ink cartridges. Remove printer head (raise handle at left) and clean (slosh bottom) in hot water, (did it 3 times) and wipe clean.  Replace with new/full color ink cartridges and black if it's got ink still. Run clean printer head program from panel continuously until you start seeing good solid ink flowing on test paper, may even run alignment program at this point.  Turn off printer, if you get Load paper error, hit OK, allow alignment to run, and if heads have been previously cleaned satisfactorily (all colors show up), alignment will show success, and the next time you start printer, no more load paper error.  Point being, the printer eventually wants to see or will look for color ink and in particular, cyan necessary for the alignment page, and without this the program will aparently project a load paper error and alignment failure.  (which you can get aroung by keep hitting OK and cancelling the alignment)!  This totally cured by problem of load paper and alignment failure.  Good luck and be patient, it may take some time to effective clean, I went through all color ink and will have to purchase more !

  • Why is it YouTube loads really slow sometimes even when I'm connected to wifi ?

    Why is it YouTube loads really slow sometimes even when I'm connected to wifi ?

    Hard to say. The speed of your Internet connection. Congestion on YouTube's servers, problems at any point in between you and them... When you are connected to WiFi, you will get a substantially higher resolution version of some videos than you do on 3G.
    Are you using the youtube app or are you just accessing it via a web browser.

  • Database Instance Using Swap Space even When There is Plenty of Free RAM

    Hi,
    I am facinga strange issue in oracle on solaris 5.10
    Platform:solaris 5.10
    Database version:11.2.0.1.0
    Our database Instance Using Swap Space even When There is Plenty of Free RAM.
    We have 80GB of physical RAM, 32GB is set to oracle SGA_MAX_SIZE
    memory parameters:
    memory_max_target big integer 32G
    memory_target big integer 32G
    sga_max_size big integer 32G
    sga_target big integer 32G
    but still oracle is taking memory from swap even though we have enough physical memory.
    please find the top output
    load averages: 0.09, 0.18, 0.84 01:07:49
    134 processes: 133 sleeping, 1 on cpu
    CPU states: 99.4% idle, 0.4% user, 0.3% kernel, 0.0% iowait, 0.0% swap
    Memory: 80G real, 69G free, 35G swap in use, 49G swap free
    PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
    1052 oracle 13 59 0 95M 66M sleep 13:16 0.07% oraagent.bin
    10256 oracle 1 59 0 32G 835M sleep 0:00 0.03% oracle
    1227 oracle 15 59 0 78M 56M sleep 4:27 0.02% ocssd.bin
    9524 vector1 112 59 0 1704M 776M sleep 45:04 0.02% java
    988 oracle 38 59 0 119M 92M sleep 3:00 0.02% ohasd.bin
    1297 oracle 1 101 -20 453M 390M sleep 2:47 0.02% oracle
    1765 oracle 1 101 -20 32G 329M sleep 2:45 0.02% oracle
    10258 oracle 1 59 0 32G 345M sleep 0:00 0.02% oracle
    10259 oracle 1 59 0 3400K 2024K cpu/20 0:00 0.01% top
    1777 oracle 1 59 0 32G 342M sleep 1:14 0.01% oracle
    1246 oracle 6 59 0 56M 44M sleep 1:22 0.01% diskmon.bin
    1803 oracle 1 59 0 32G 514M sleep 0:30 0.01% oracle
    1215 oracle 15 59 0 71M 46M sleep 1:12 0.00% cssdagent
    1307 oracle 1 59 0 453M 390M sleep 0:45 0.00% oracle
    1217 oracle 11 59 0 81M 49M sleep 0:35 0.00% orarootagent.bi
    Vmstat output:
    $vmstat 5 5
    kthr memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s3 s3 s3 s3 in sy cs us sy id
    0 0 0 53698448 73900568 20 81 32 6 5 0 1 -0 0 1 -0 2235 1447 1984 1 0 99
    0 0 0 51196160 72037552 1 13 0 0 0 0 0 0 0 0 0 2505 1403 2204 0 0 100
    0 0 0 51193488 72035864 55 380 0 0 0 0 0 0 0 0 0 2487 2143 2203 0 1 99
    0 0 0 51183856 72030176 0 0 0 3 3 0 0 0 0 0 0 2496 1370 2182 0 0 99
    0 0 0 51182648 72029112 22 117 0 0 0 0 0 0 0 0 0 2503 1408 2193 1 0 99
    $cat /etc/release
    Solaris 10 10/09 s10s_u8wos_08a SPARC
    Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 16 September 2009
    I refered the metalink document id: [ID 761960.1]
    Database Instance Using Swap Space When There is Plenty of Free RAM metalink note [ID 761960.1]
    and tried the disabling the sga_max_size and memory_max_target and memory target with all different combination but no use.
    We have one more box where same setup was configured in solaris platform but there the above memory parameters are not disabled but it is not using swap space it takes memry only from physical RAM
    Can any one throw some lights on this issue. It wopuld be great if I come to know where the exact problem
    Thanks in advance
    With Regards,
    Boobathi P

    Hi,
    I didn't say I am not using 11gr2 memory parameters I am using all the automatic memory parameters but the thinks is as per the metalink note I tried by disabling the automatic memory parameters. but that didn't help me in preventing unnecessary swap usage. So I reverted. now it is using automatic memory parameters.
    so What is the solution for this?
    With Regards,
    Boo

  • GRC 5.3: CUP asks to perform risk analysis even when there are no risks in request

    Hi All,
    We recently upgraded from GRC 5.3 SP13 to SP22.
    The one issue which we are facing after upgrade is that now CUP is forcing approvers to do Risk Analysis, even when there are no risks in the CUP Request, that is Risk Tab is Green.
    Previously approvers were able to approve requests without doing risk analysis, if there were no risks in the request.
    CUP used to force them to do risk analysis only when there were risks associated with requests.
    But now, it is forcing approvers to perform risk analysis, even if there are no risks, i.e. approvers are not able to approve requests without any risks without doing risk analysis.
    Please advise.
    Thanks
    Aditi

    Hi,
    Can you check if any change is made in Configuration -> Workflow -> Stage -> Approvers
    Regards,
    Claudio

  • PRI channel busy issue , even when there are no active calls

    Hi All ,
    i using VWIC-2MFT - E1 CARD with VG. one PRI is working fine but on another PRI we are facing busy channel problem , even when there is no active calls , actually channels are not being free after disconnecting call. when we restart the gateway its startworking for some time ...
    i already replaced that card .
    please advice

    I believe that this post should be made to the Unified Communications and Video forum.
    Would please you repost to that group.
    Thanks

  • Allocated heap memory goes up even when there is enough free memory

    Hi,
    Our Java application's memory usage keep growing. Further analysis of the heap memory using JProbe shows that the allocated heap memory goes up even when there is enough free memory available in the heap.
    When the process started, allocated heap memory was around 50MB and the memory used was around 8MB. After few hours, the inuse memory remains at 8MB (slight increase in KBs), but the allocated memory went upto 70MB.
    We are using JVM 1.5_10. What could be the reason for heap allocation going up even when there is enough free memory available in heap?
    -Rajesh.

    Hi Eric,
    Please check if there is any error or warning in the Event Viewer based on the data time?
    If there is any error, please post the event ID to help us to troubleshoot.
    Best Regards,
    Anna

  • USB not recognized - even when there's no USB device at all (Windows 7, Pavilion dv7)

    Since a few days now I get the message
    'The USB-device was not recognized: One of the USB-devices connected to this computer does not work correclty. The device has not been recognized'.
    It keeps popping up from my right corner below, every 5 seconds if I don't click it. When I click the message, I get a list of USB devices (ports) there are available. There's one 'Unknown device'. Maybe it has something to do with the finger scan (biometric)? This hasn't been working very good lately..
    Even when there's no single USB device installed (normally I have a mouse and a Targus laptop chill mat installed as USB devices), it keeps popping up. I tried deleting the USB port from the list (or uninstall it) in Device control, but it seems it keeps happening.
    I suddenly got it, I did nothing specific of did not connect any strange devices (except for a projector on the external monitor exit, but that has nothing to do with USB). I also hear the sound for connecting and disconnecting USB devics randomly when I'm on my laptop.
    Anyone has any idea?
    Thanks
    HP Pavilion dv7 Notebook PC
    LE902EA#UUG
    Windows 7 64 bit
    This question was solved.
    View Solution.

    The solution can be found here

  • Constant notifications even when there's nothing to be notified of. Galaxy S5.

    Ever since I updated my Samsung Galaxy s5 yesterday I have been getting constant message tones even when there's nothing to be notified of. I have restarted my phone more than enough times to know its not that causing issues.

        josh366,
    This definitely seems strange that you are receiving these notifications without having any type of texts, or emails, or any other types of notifications. Since the software upgrade, have you downloaded any new apps? Let's also try to power the device off, remove the SIM card and wait for about 30-60 seconds and then put the SIM back in and power back on. Keep us posted!
    ErinW_VZW
    Follow us on Twitter @VZWSupport

  • Quota dedcuting even when there is no quota

    i got this problem,
    I have a absence type A whose quota is deducting from absence type B. but even when there is no quota ,the system is deducting the quota from someother absence type i.e. C
    Kindly help.....

    thks all...........its solved .in dedcution i jus need to chose "no further assignment"
    Please Close the thread if you issue  is solved
    Edited by: Sikindar on Feb 2, 2010 11:55 AM

  • I'm having trouble importing pictures from the internet....when I drag the picture to the icon, it gives me the option to import all duplicates. Even when I click "NO", it STILL imports every picture I have imported AGAIN, including the new one! WHY??

    I'm having trouble importing pictures from the internet....when I drag the picture to the icon, it gives me the option to import all duplicates. Even when I click "NO", it STILL imports every picture I have imported AGAIN, including the new one! WHY??

    carolinechx wrote:
    i know the description may be a little bit too confusing
    Mostly because you are not using any capital letters or paragraph returns and your post is difficult to read.

  • Cd icon shows even when there is no cd present. I tried ejecting it and inserting another cd and the cd gets ejected. what is the solution to this

    icon shows even when there is no cd present. I tried ejecting it and inserting another cd and the cd gets ejected. what is the solution to this

    Jailbreaking iOS can't be discussed in this forum.

  • Data Loader inserting duplicate records

    Hi,
    There is an import that we need to run everyday in order to load data from another system into CRM On Demand . I have set up a data loader script which is scheduled to run every morning. The script should perform insert operation.
    Every morning a file with new insert data is available in the same location(generated by someone else) & same name. The data loader script must insert all records in it.
    One morning , there was a problem in the other job and a new file was not produced. When the data loader script ran , it found the old file and re-inserted the records (there were 3 in file). I had specified the -duplicatecheckoption parameter as the external id, since the records come from another system, but I came to know that the option works in the case of update operations only.
    How can a situation like this handled in future? The external id should be checked for duplicates before the insert operation is performed. If we cant check on the data loader side, is it possible to somehow specify the field as 'unique' in the UI so that there is an error if a duplicate record is inserted? Please suggest.
    Regards,

    Hi
    You can use something like this:
    cursor crs is select distinct deptno,dname,loc from dept.
    Now you can insert all the records present in this cursor.
    Assumption: You do not have duplicate entry in the dept table initially.
    Cheers
    Sudhir

Maybe you are looking for

  • Wireless connection issue, new HH2.0A

    Hi again everyone. We've recently upgraded to 'up to 20Mb' BB option 3 and got sent a new HH2.0A to go with it after being on the 1.5 for a few years but i seem to be having trouble with a secondary PC connecting by wireless. The other PC is using a

  • OEM grid 11 installation on windows server 2008

    Hi , We have a 64 Bit windows 2008 server , on which we need to install OEM grid 11. For this we will be using : OEM 11 for windows 32 bit Oracle 11gr2 windows 32 bit Weblogic server 32 bit. the instalation order would be : 1.Weblogic 2. Database 3.

  • Photo taken with Iphone cannot be save after editing

    After editing the photo taken from my Iphone 4S on my computer, I can't save it. Error given is "This photo can't be saved because of a problem with photo's file format". Have anyone encounter the same problem and found a solution to it?

  • Export User Accounts/AAA Local Database from 4404 WLC

    Hi, Guest User Accounts have been created in the local database of the WLC 4404. Because we are going to use Cisco ISE for Guest user authentication, I would like to know if there is a way to export these accounts and import them into Cisco ISE. Than

  • Printing on a Canon Pixma MP600 via Airport Express from a Windows 2000 PC

    Hi, I'm a Mac: I can print directly connected AND wirelessly to a Canon MP600 printer through Airport Express. Hi, I'm a PC: I can only print when I'm directly connected to the printer. Has anyone found a way to print to their Canon through Airport E