failure 2801 duplicate unique prime key error in teradata Guyton Georgia

Address Savannah, GA 31404
Phone (912) 373-8571
Website Link
Hours

failure 2801 duplicate unique prime key error in teradata Guyton, Georgia

I used this BTEQ-script in my trainings to show all the variations: .SET ECHOREQ OFF .SET TIMEMSG NONE -- SET/NUPI CREATE SET TABLE dropme(i INT, j INT) PRIMARY INDEX(i); INSERT INTO Explanation: The request generated a row whose prime key duplicated that of an existing row in a table with a unique prime key. Showing results for  Search instead for  Did you mean:  Teradata : Product Forums : Database : duplicate unique primary key error Options Subscribe to RSS Feed Mark Topic as New Mark Can Communism become a stable economic strategy?

All product names are trademarks of their respective companies. The higher the skew factor is, the more unevenly data in a table is distributed. The reason I say 'potential', is because there are gaps in the sequencing and one can get lucky for a period of time.Another tip... DROP ERROR TABLE FOR dropme; DROP TABLE dropme; -- SET/UPI/USI CREATE SET TABLE dropme(i INT, j INT) UNIQUE PRIMARY INDEX(i), UNIQUE INDEX(j); INSERT INTO dropme VALUES(1,1); -- *** One row added.

Email check failed, please try again Sorry, your blog cannot share posts by email. CREATE ERROR TABLE FOR dropme; INSERT INTO dropme SELECT * FROM dropme LOGGING ALL ERRORS; -- *** 4 rows added. NO CYCLE EDIT: If your business requirements are such that you must be able to provide a value I would also consider using a domain that is outside the range of Teradata error 202 EM_VERSION Invalid software version number.

PCMag Digital Group AdChoices unused Teradata Blog Archive August (1) March (1) February (2) January (3) December (1) June (3) April (29) March (1) December (1) Search This Blog Tuesday, April As a general rule, tables with a skew factor higher than 50% should be evaluated to determine if a different primary index would distribute the data better, and thereby improve performance. Please Help!!Thanks & Regards, 0 Kudos Reply All forum topics Previous Topic Next Topic 2 REPLIES Fred Teradata Employee Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Get Direct Exploded Suffixes Any better way to determine source of light by analyzing the electromagnectic spectrum of the light My CEO wants permanent access to every employee's emails.

Now if the target is having CUST_ID as primary key, it will throw UNIQUE PRIMARY KEY violation error. Any solutions to rectify this situations. WPoling replied Jan 31, 2013 Great, thank you Bob! The Teradata group is no longer active.

Try using the ROW_NUMBER() function instead. At the very least, I'd like some way to debug the issue a bit deeper. INSERT INTO dropme VALUES(1,1); -- *** Failure 2801 Duplicate unique prime key error INSERT INTO dropme SELECT * FROM dropme; -- *** No rows added. Now again execute the same statementinsert into temp_tables.XYZ values(,'c'); // Completed. 1 rows processed //UPI now (1,2,3,4,5) Strange !

SELECT etc_errorcode FROM et_dropme WHERE etc_errorcode <> 0; -- *** No rows found. When you say negative domain, do you mean use negative numbers for the primary key? I am wanting to fix it before it starts happening in production because that would be bad. So if the join condition is on CUST_ID, it will result in one to many mapping and the result set will also have multiple entries for same CUST_ID.

The original_table had id as the unique primary index and was defined as "Id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY". insert into temp_tables.XYZ values(,'a');insert into temp_tables.XYZ values(,'b');3.insert into temp_tables.XYZ values(4,'c'); //No problem here since UPI(1,2,4) is still unique 4.insert into temp_tables.XYZ values(,'c'); //No problem here since UPI(1,2,3,4) is still unique 5.insert Each record in a table is placed on an AMP. In all my years with Teradata, I've never heard of a real-world (i.e., customer) skew more than 10% for any table with a significant number of rows. 2.

You will face skew issues if the Primary Index is Null for all rows. 0 Kudos Reply donal28 Enthusiast Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Get Direct INSERT INTO dropme SELECT * FROM dropme; -- *** 2 rows added. Since the table is maintaining history of CUSTOMERS, so it will be having multiple entries for same CUST_ID. So someone's ID could be -100? –oscilatingcretin Jul 31 '12 at 12:09 The ID column being populated by the IDENTITY column is a surrogate key that is being used

When the data is unevenly distributed, the AMPs with the most records work harder, while the AMPs with the fewest records are underutilized. Now I am not able to insert data in this table manually through insert query. What is a type system? current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.

A SET table prohibits duplicate records with identical values in every column from existing in the table, while a MULTISET table allows them. Find th duplicate data row and eliminate it and then load. Top Best Answer 0 Mark this reply as the best answer?(Choose carefully, this can't be changed) Yes | No Saving... It should load fine2.

If two tables that are frequently joined have the same PI, then joining them doesn't require the records to be redistributed to other AMPs to satisfy a query. INSERT INTO dropme VALUES(1,1); -- *** One row added. Over the past month, however, ELMAH has been intermittently reporting the following exception from our .NET 4.0 ASP.NET app: Teradata.Client.Provider.TdException: [Teradata Database] [2801] Duplicate unique prime key error in DATABASENAME.TABLENAME. Solve problems - It's Free Create your account in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters.

Let me know what happens. This has all been working since probably around February of this year.