Create unique index from duplicate rows
Dear
I created an index like
create index tablename_idx on tablename (FIELD1,FIELD2);
It should be
create unique index tablename_idx on tablename (FIELD1,FIELD2,filed3);
How can I delete those duplicate records and create the UNIQUE index ?
Thanks and regards
Fahmed
> How can I delete those duplicate records
[url http://forums.oracle.com/forums/search.jspa?threadID=&q=delete+duplicate+records&objID=f75&dateRange=all&userID=&numResults=15]http://forums.oracle.com/forums/search.jspa?threadID=&q=delete+duplicate+records&objID=f75&dateRange=all&userID=&numResults=15
Regards,
Rob.
Similar Messages
-
ERROR ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
Hi,
SAPSSRC.log
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: START OF LOG: 20071018195059
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#12 $ SAP
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: version R6.40/V1.4
Compiled Nov 30 2005 20:41:21
C:\usr\sap\BW1\SYS\exe\run/R3load.exe -ctf I C:/temp/51030721/EXP2/DATA/SAPSSRC.STR C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/DDLORA.TPL C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.TSK ORA -l C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.log
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: job completed
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: END OF LOG: 20071018195059
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: START OF LOG: 20071018195133
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#12 $ SAP
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: version R6.40/V1.4
Compiled Nov 30 2005 20:41:21
C:\usr\sap\BW1\SYS\exe\run/R3load.exe -dbcodepage 4103 -i C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.cmd -l C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.log -stop_on_error
DbSl Trace: ORA-1403 when accessing table SAPUSER
(DB) INFO: connected to DB
(DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): WE8DEC
(DB) INFO: ABTREE created #20071018195134
(IMP) INFO: import of ABTREE completed (39 rows) #20071018195134
(DB) INFO: ABTREE~0 created #20071018195134
(DB) INFO: AKB_CHKCONF created #20071018195134
(IMP) INFO: import of AKB_CHKCONF completed (0 rows) #20071018195134
(DB) INFO: AKB_CHKCONF~0 created #20071018195134
(DB) INFO: AKB_INDX created #20071018195134
(IMP) INFO: import of AKB_INDX completed (0 rows) #20071018195134
(DB) INFO: AKB_INDX~0 created #20071018195134
(DB) INFO: AKB_USAGE_INFO created #20071018195134
(IMP) INFO: import of AKB_USAGE_INFO completed (0 rows) #20071018195134
(DB) INFO: AKB_USAGE_INFO~0 created #20071018195134
(DB) INFO: AKB_USAGE_INFO2 created #20071018195134
(IMP) INFO: import of AKB_USAGE_INFO2 completed (0 rows) #20071018195134
(DB) INFO: AKB_USAGE_INFO2~0 created #20071018195134
(DB) INFO: APTREE created #20071018195134
(IMP) INFO: import of APTREE completed (388 rows) #20071018195134
(DB) INFO: APTREE~0 created #20071018195134
(DB) INFO: APTREE~001 created #20071018195134
(DB) INFO: APTREET created #20071018195134
(IMP) INFO: import of APTREET completed (272 rows) #20071018195134
DbSl Trace: Error in exec_immediate()
DbSl Trace: ORA-1452 occurred when executing SQL statement (parse error offset=35)
(DB) ERROR: DDL statement failed
(CREATE UNIQUE INDEX "APTREET~0" ON "APTREET" ( "SPRAS", "ID", "NAME" ) TABLESPACE PSAPBW1 STORAGE (INITIAL 44981 NEXT 0000000040K MINEXTENTS 0000000001 MAXEXTENTS 2147483645 PCTINCREASE 0 ) )
DbSlExecute: rc = 99
(SQL error 1452)
error message returned by DbSl:
ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
(DB) INFO: disconnected from DB
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: job finished with 1 error(s)
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: END OF LOG: 20071018195134
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: START OF LOG: 20071018195314
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: sccsid @(#) $Id: //bas/640_REL/src/R3ld/R3load/R3ldmain.c#12 $ SAP
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: version R6.40/V1.4
Compiled Nov 30 2005 20:41:21
C:\usr\sap\BW1\SYS\exe\run/R3load.exe -dbcodepage 4103 -i C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.cmd -l C:\Program Files\sapinst_instdir\NW04\SYSTEM\ABAP\ORA\NUC\DB/SAPSSRC.log -stop_on_error
DbSl Trace: ORA-1403 when accessing table SAPUSER
(DB) INFO: connected to DB
(DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): WE8DEC
(DB) ERROR: DDL statement failed
(DROP INDEX "APTREET~0")
DbSlExecute: rc = 103
(SQL error 1418)
error message returned by DbSl:
ORA-01418: specified index does not exist
(IMP) INFO: a failed DROP attempt is not necessarily a problem
DbSl Trace: Error in exec_immediate()
DbSl Trace: ORA-1452 occurred when executing SQL statement (parse error offset=35)
(DB) ERROR: DDL statement failed
(CREATE UNIQUE INDEX "APTREET~0" ON "APTREET" ( "SPRAS", "ID", "NAME" ) TABLESPACE PSAPBW1 STORAGE (INITIAL 44981 NEXT 0000000040K MINEXTENTS 0000000001 MAXEXTENTS 2147483645 PCTINCREASE 0 ) )
DbSlExecute: rc = 99
(SQL error 1452)
error message returned by DbSl:
ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
(DB) INFO: disconnected from DB
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: job finished with 1 error(s)
C:\usr\sap\BW1\SYS\exe\run/R3load.exe: END OF LOG: 20071018195315
I'm getting this error "duplicate keys found". I'm finished installing the central instance and during the database instance, i got this error. I'm installing BW 3.5 on x64 windows server 2003 platform. I'm using NU kernel 6.40.
Thanks for your suggestions on how to resolve this error.
Reward points guaranteed.Issue solved by deleting central and database instance and started a new build. it finished without an error.
Thank you. -
Hi,
We are implementing OBIA 11.1.1.7.1 which comes with ODI for Fianance and Procurement analytics.When we do full load from EBS the load plan gets failed and it throws the below error
Caused By: java.sql.SQLException: ORA-20000: Error creating Index/Constraint : W_PARTY_D_U1 => ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found.
Please help us to resolve the same.
Thanks
RamaThis might need Patch:10402735
if helps mark -
How to create unique index on a View
Hi All,
11.2.0.1
How do I create an index on a view or any workaround that my view wont get duplicates?
SQL> create unique index indx01 on db_backup_details_vw(id);
create unique index indx01 on db_backup_details_vw(id)
ERROR at line 1:
ORA-01702: a view is not appropriate here
Thanks a lot,
KinzI'm thinking of using a distinct clause here.
if i get 5 duplicate rows in my selection set because of the join condition, can't i discard the remaining 4 using a distinct clause.
Observe this
SQL> select * from a;
T1 T2
1 4
2 4
3 4
SQL> select * from b;
T1 T2
1 4
2 5
in both a,b t1 is the primary key. so we'll write a join on t2 (non PK).
SQL> select b.t1,b.t2 from a,b where a.t2=b.t2;
T1 T2
1 4
1 4 -- duplicates
1 4
Now create view with distinct clause
create view ab as select distinct b.t1,b.t2 from a,b where a.t2=b.t2;
SQL> select * from ab;
T1 T2
---------- ---------- -- no duplicates
1 4
CSM -
How to create an indexed field (Duplicates OK) using VBA
I used the following code to check to see if a field exist and if it does not exist one created. How can I expand this to not only create the field but also create an index (Duplicates OK).
Regards, Jim
Sub AddFldSect4_4()
Call FieldExists("DisplayOrder", "Section4_4")
End Sub
Function FieldExists(ByVal fieldName As String, ByVal tableName As String) As Boolean
Const gcfHandleErrors As Boolean = True
If gcfHandleErrors Then On Error GoTo Error_Handler
Dim db As Database
Dim tbl As TableDef
Dim fld As Field
Dim strName As String
Set db = CurrentDb
Set tbl = db.TableDefs(tableName)
For Each fld In tbl.Fields
If fld.Name = fieldName Then
FieldExists = True
Exit For
End If
Next
If FieldExists = False Then
Call addColumn(tableName, fieldName)
End If
Error_Handler_Exit:
On Error Resume Next
Exit Function
Error_Handler:
MsgBox "The following error has occured." & vbCrLf & vbCrLf & _
"Error Number: " & err.Number & vbCrLf & _
"Error Source: Field Exist" & vbCrLf & _
"Error Description: " & err.Description, _
vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End Function
Public Sub addColumn(tableName As String, fieldName As String)
Const gcfHandleErrors As Boolean = True
If gcfHandleErrors Then On Error GoTo Error_Handler
Dim strField As String
Dim curDatabase As Object
Dim tblTest As Object
Dim fldNew As Object
Set curDatabase = CurrentDb
Set tblTest = curDatabase.TableDefs(tableName)
strField = fieldName
Set fldNew = tblTest.CreateField(strField, dbInteger)
tblTest.Fields.Append fldNew
Error_Handler_Exit:
On Error Resume Next
Exit Sub
Error_Handler:
MsgBox "The following error has occured." & vbCrLf & vbCrLf & _
"Error Number: " & err.Number & vbCrLf & _
"Error Source: Add Col" & vbCrLf & _
"Error Description: " & err.Description, _
vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End Sub
jim nealI used the following code to check to see if a field exist and if it does not exist one created. How can I expand this to not only create the field but also create an index (Duplicates OK).
Hi Jim,
I give you a couple of examples that I use to create or delete indexes. They are "heavily parametrized", so they can be used for every table using any fields. Study your Help for further information on "Create Index", and others.
tmp_db.Execute "CREATE INDEX " & cur_veldnaam & " ON " & cur_item & "_tbl (" & cur_type & ")" & " WITH PRIMARY" tmp_db.Execute "CREATE UNIQUE INDEX " & cur_veldnaam & " ON " & cur_item & "_tbl (" & cur_velden & ")" '& " WITH PRIMARY" tmp_db.Execute "DROP INDEX " & cur_keynaam & " ON " & cur_item & "_tbl"
tmp_db stands for the BE-database; cur_item & "_tbl" represents the table name.
Imb. -
Create unique index on flow table
Hi
I always get this error 'Create unique index on flow table ERROR" while implementing SCD2. Please help me.I have made an Update Key which is a combination of 4 columns that want a new row to be inserted if there is a change in data.One of the above columns is the EMPLOYEE ID,
My surrogate key is the table's primary key but I have not defined it as a key in mapping and also I have turned off the Primary Key Constraint Option in Controls Panel as NO.
Where am I wrong? Also please tell me what to take care off while making Natural Key ?There are two solutions:
1. Only use uppercase in the table name
2. go in Topology>Physical Architecture and edit the technology, then click on
the "Language" tab and set "Object Delimiter" to empty.
Thanks,
Sutirtha -
Why do i get 2 curves and not just 1 when i create a diagram from a row of data in a table ?
Why do I get 2 curves and not just i when I create a diagram from a row af data in a table ?
Erik,
Thank you for giving me the points. Generally you wait to award points until your problem is solved. It is totally your at your descretion.
OK.
This is still not clear. To post a screenshot get the "stuff" you want to show in view on your screen, then type the key combination <Command>+<Shift>+3. The cursor will change to a crosshair. Click and hold on the top-left corner, then drag to enclose what you want to show (to the bottom-right corner), then release. The screenshot will appear on your desktop and will be named something like "".
Now click the camera icon in the tool bar for this forum:
, click the text box to allow you to navigate to, and select your screenshot.
Here is what you sent me:
The graph does not seem to be associated with the table of data you are showing. Generally when you highlight a graph the corresponding table will highlight and show the source of each of the series in the graph (dark and light blue).
This is what I would expect to see when highlighting a graph:
Right now I think there is ANOTHER table arround that is the source for the graph and the table you show is "just another table". You can move your data into the table the graph refers to by copy and paste, or simply typing the values. You can change how many series there are by grabbing the little circle at the bottom right of the highlighted cells (when you have the graph highlighted) and dragging as shown:
The Numbers Users' Guide is a great resource you should utilize and can be found here:
http://support.apple.com/manuals#macosandsoftware
The chapter on graphing (or charting) is 7 and starts on page 134. -
Create Unique Index On Flow does not work for table names 23 characters
I have a "create unique index on flow table" step that is dynamically generated by the IKM.
The index name that is generated by the IKM is based on the table name except that the created index name is prefixed with "I$_" and ends with "_idx". Obviously, since Oracle table names can not exceed 30 characters in length, the index creation step will fail if the base table name exceeds 23 characters.
I have tried to substring the index name generation step in the IKM so that it only uses the first 23 characters of the table name, but have not had any luck with using the "substring" command together with snpRef.getTable call.
This is the section of the IKM that I desire to change:
- <Field name="Txt" type="java.lang.String">
- <![CDATA[
create unique index <%=snpRef.getTable("L","INT_NAME","W")%>_idx
on <%=snpRef.getTable("L","INT_NAME","W")%> (<%=snpRef.getColList("", "[COL_NAME]", ", ", "", "UK")%>)
<%=snpRef.getUserExit("FLOW_TABLE_OPTIONS")%>
]]>
</Field>
I would like to change the above to something similar to the following (note the only change is the addition of substring(1,23))
- <Field name="Txt" type="java.lang.String">
- <![CDATA[
create unique index <%=snpRef.getTable("L","INT_NAME","W")*.substring(1,23)*%_idx
on <%=snpRef.getTable("L","INT_NAME","W")%> (<%=snpRef.getColList("", "[COL_NAME]", ", ", "", "UK")%>)
<%=snpRef.getUserExit("FLOW_TABLE_OPTIONS")%>
]]>
</Field>
Any help greatly appreciated. Thanks.As the index is temporary, just like the I$ talbel, the easiest way is to replace the table name with some unique identifier like the session is:
bq. I$_<%=odiRef.getSession("SESS_NO")%>_idx
If for some reason that is not unique enough, add the NNO:
bq. I$_<%=odiRef.getSession("SESS_NO")%><%=odiRef.getSession("NNO")%> \\ _idx -
How to Create primary key index with duplicate rows.
Hi All,
While rebuilding an index on a table , I am getting error that there are duplicate rows in a table.
Searching out the reason led me to an interesting observation.
Please follow.
SELECT * FROM user_ind_columns WHERE table_name='SERVICE_STATUS';
INDEX_NAME TABLE_NAME COLUMN_NAME COLUMN_POSITION COLUMN_LENGTH CHAR_LENGTH DESCEND
SERVICE_STATUS_PK SERVICE_STATUS SUBSCR_NO_RESETS 2 22 0 ASC
SERVICE_STATUS_PK SERVICE_STATUS STATUS_TYPE_ID 3 22 0 ASC
SERVICE_STATUS_PK SERVICE_STATUS ACTIVE_DT 4 7 0 ASC
SERVICE_STATUS_PK SERVICE_STATUS SUBSCR_NO 1 22 0 ASC
SELECT index_name,index_type,table_name,table_type,uniqueness, status,partitioned FROM user_indexes WHERE index_name='SERVICE_STATUS_PK';
INDEX_NAME INDEX_TYPE TABLE_NAME TABLE_TYPE UNIQUENESS STATUS PARTITIONED
SERVICE_STATUS_PK NORMAL SERVICE_STATUS TABLE UNIQUE VALID NO
SELECT constraint_name ,constraint_type,table_name,status,DEFERRABLE,DEFERRED,validated,index_name
FROM user_constraints WHERE constraint_name='SERVICE_STATUS_PK';
CONSTRAINT_NAME CONSTRAINT_TYPE TABLE_NAME STATUS DEFERRABLE DEFERRED VALIDATED INDEX_NAME
SERVICE_STATUS_PK P SERVICE_STATUS ENABLED NOT DEFERRABLE IMMEDIATE VALIDATED SERVICE_STATUS_PK
1. Using index scan:
SELECT COUNT (*)
FROM (SELECT subscr_no, active_dt, status_type_id, subscr_no_resets
FROM service_status
GROUP BY subscr_no, active_dt, status_type_id, subscr_no_resets
HAVING COUNT (*) > 1) ;
no rows returned
Explain plan:
Operation OBJECT Name ROWS Bytes Cost OBJECT Node IN/OUT PStart PStop
SELECT STATEMENT Optimizer MODE=CHOOSE 519 K 14756
FILTER
SORT GROUP BY NOSORT 519 K 7 M 14756
INDEX FULL SCAN ARBOR.SERVICE_STATUS_PK 10 M 158 M 49184
2. Using Full scan:
SELECT COUNT (*)
FROM (SELECT /*+ full(s) */ subscr_no, active_dt, status_type_id, subscr_no_resets
FROM service_status s
GROUP BY subscr_no, active_dt, status_type_id, subscr_no_resets
HAVING COUNT (*) > 1) ;
71054 rows returned.
Explain Plan:
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=CHOOSE 1 24123
SORT AGGREGATE 1
VIEW 519 K 24123
FILTER
SORT GROUP BY 519 K 7 M 24123
TABLE ACCESS FULL ARBOR.SERVICE_STATUS 10 M 158 M 4234
Index SERVICE_STATUS_PK is a unique and composite primary key VALID index. And the constraint is ENABLED and VALIDATED still having duplicate rows in table.
How it is possible?
Is it an Oracle soft Bug??
Regards,
Saket Bansalsaket bansal wrote:
Values are inserted as single rows inserts through an GUI interface.And you still claim to have over 71K duplicate records, without the GUI getting any kind of errors?
That does not add up and can only be explained by a "bug".
I tried inserting a duplicate record but failed.
SQL> insert into service_status (select * from service_status where rownum <2);
insert into service_status (select * from service_status where rownum <2)
ERROR at line 1:
ORA-00001: unique constraint (ARBOR.SERVICE_STATUS_PK) violatedAre you really sure there is no other way data in this table is populated/manipulated in bulk? -
Cannot CREATE UNIQUE INDEX; duplicate keys found
I have 10g when I did an expdp from prod (an AIX 5.3 ) and impdp to a test (a RHEL3 ) with TABLE_EXISTS_ACTION=TRUNCATE, there are some index errors ORA-01452 for some of the tables but not all. As I compared the difference between , The only difference I noticed was that the one with error is the table has data, those tables without error have no data. So how which parameter I can use in impdp to avoid ? read the utility doc, have not found clear picture.
ChiIn 11510,
The duplicate row loaded is person 6272 with effective date 1994 and 1991. This needs to be fixed in vision.
Workflow SIL_PositionDimension_Full calls mapping SIL_PositionDimension to load target W_POSITION_D from source W_POSITION_DS. W_POSITION_D.INTEGRATION_ID maps to W_POSITION_DS.INTEGRATION_ID, but EFFECTIVE_FROM_DT is a more complicated many to one mapping.
Extract to W_POSITION_DS ;
SDE_ORA_PositionDimension_NonEmployee
- W_POSITION_DS.INTEGRATION_ID from PER_ALL_PEOPLE_F.PERSON_ID
SDE_ORA_PositionDimension_NoAssignments
- W_POSITION_DS.INTEGRATION_ID from JTF_RS_RESOURCE_EXTNS_TL RESOURCE_ID
-- PER~6272,4,01-JAN-94
-- PER~6272,4,01-JAN-91
select all t.*
from
select all
count(*) as n
, t.INTEGRATION_ID
, t.DATASOURCE_NUM_ID
, t.EFFECTIVE_FROM_DT
--, t.*
from baw.W_POSITION_D t
group by
null
, t.INTEGRATION_ID
, t.DATASOURCE_NUM_ID
, t.EFFECTIVE_FROM_DT
) t
where ( ( n > 1 ) )
; -
Creating stacked graph from multiple rows
Hi!
I am trying to create a stacked bar graph from multiple rows. My data looks like this:
Date_Time Error_Code Count
16-01-2011 12:00 100 10
16-01-2011 12:00 200 15
16-01-2011 12:10 100 5
16-01-2011 12:10 200 7
16-01-2011 12:20 300 20
16-01-2011 12:20 400 6
I want to stack the count of each error_code on top of each other for every time group.
Is this possible?
Br
CasperHi,
can you try
- select the graph in the Structure Window or the visual editor
- open Property Inspector
- Press Pencil Icon
- Click "Swap Bars with x-Axis"
Frank -
How to create an index from more than one pages document?
I have 10 different pages documents. Each document is a book chapter. Now I would like to create one index for all of these chapters in a new pages-file without copying all files into one single file. How does this work?
Thanks for your answer. Than this is a real deficit of pages. Have you got any ideas for an alternative solution, that doesn´t force me to work with Microsoft? I have a document of 300 pages, having this in one document is neither practical nor stable. Thank for supporting!
-
Error while creating the Unique Index of the Primary Key of an Item
Hi all,
I have deployed a new item (CO_CONTRACTUNIT_PRODUCT) in my publication. The deploy appears to be successfull as the item can be seen in the repository through the Mobile Manager.
The problem occurs when i sync my local DB to get the item offline. While synchronizing, the following error appears, both in the sync window and the log file ol_sync.log.
"ERROR",POL-5130,"11/09/2010 11:43:52","table or view %s.%s not found:CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID","DB_ROSHNI"
However, the debug file gives this other error regarding this table.
ALL_INDEX:CREATE UNIQUE INDEX "TPCO_CONTRACTUNIT_PRODUCT_PK" ON CO_CONTRACTUNIT_PRODUCT (CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID) -5130Error at C:\ADE\omeprod_ol103021\olite\db\build\win\ocapi\..\..\..\src\ocapi\allindexes.cpp line:329 rc:-5130
Build date Mar 29 2010
okErr=(table or view %s.%s not found)
mess=(CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID)
AddLog(-5130 "ERROR",POL-5130,"11/09/2010 11:43:52","table or view %s.%s not found:CO_CONTRACTUNIT_PRODUCT,CO_CONTRACTID,OD_PRODUCTID,CO_CONTRACTUNITID","DB_ROSHNI")
But the index that is being created and is giving the error is the index created automatically with the Primary Key of the table, and so nothing has been modified in that.
The primary key of the table is created with the three columns that are part of the index that is returning the error.
As I could not solve the error, I tried to drop and re-create the item in the repository, but no luck. As a last option, i tried to remove the item from the repository to be able to sync properly again (just like before creating the item), but the error still happens.
Another weird point is that i have tried creating the item in another publication of another database (but with almost equal items), and the item could was downloaded to my local DB without any problem, which makes this problem still more bizarre.
What can it be?
Any help would be great!
Roshnihave you tried unistalling the client and reinstalling it?
schema evolution changes are not always handled correctly please check thread:
Modification of publication item into Mobile Server
i quote from rekounas instructions:
If you are just adding a field, you should only have to run the alter publication item API call.
Here is an old note on schema evolution on different scenarios. The names for the APIs that they use are now deprecated. Use the ConsolidatorManager class and call the method alterPublicationItem("PUBLICATION_ITEM_NAME", "SELECT STMT") :
A) Add column
1. Upload all client data. Clients should not add new data until they are told by the administrator to sync again!!
2. Stop Mobile Server listener
3. Change the Oracle8i/9i database schema (add column)
4. Create a Java program to call the Consolidator Admin API AlterPublicationItem()
5. Start Mobile Server
6. Execute a sync from the client
7. The new column should be seen on the client. Use MSQL to check snapshot definitions.
B) Drop column
1. Upload all client data. Clients should not add new data until they are told by the administrator to sync again!!
2. Stop Mobile Server listener
3. Delete column of the base table in the Oracle database schema
4. Create a Java program to call the Consolidator Admin API DropPublicationItem()
5. Create a Java program to call the Consolidator Admin API CreatePublicationItem() and AddPublicationItem().
6. Start Mobile Server
7. Execute a sync from the client
8. The new column should be seen on the cliet. Use MSQL to check snapshot definitions.
C) Change column datatype
Changing datatypes in a repliatated system is not an easy task. You have to follow certain procedures in order to make it to work. Use DropPublicationItem, CreatePublicationItem and AddPublicationItem methods from the Consolidator Admin API. You must stop/start Mobile Server listener to refresh the cache.
1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
2. Stop Mobile Server listener
3. Drop/create column (do not use conversion procudures) at the base table
4. Call DropPublicationItem(). Check if the ErrorQueue and InQueue no longer exist.
5. Call CreatePublicationItem() and AddPublicationItem(). Check if the ErrorQueue and InQueue reflect the new column datatype
6. Start Mobile Server. This automatically resumes application
7. Client executes sync. This should drop the old snapshot and recreate the new snapshot. Use MSQL to check
snapshot definitions.
D) Drop table
1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
2. Stop Mobile Server listener
3. Drop base table
4. Call DropPublicationItem(). Check if the ErrorQueue and InQueue no longer exist.
5. Start Mobile Server. This automatically resumes application
6. Client executes sync. This should drop the old snapshot. Use MSQL to check snapshot definitions.
E) Add table
1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
2. Stop Mobile Server listener
3. Add new base table
4. Call CreatePublicationItem() and AddPublicationItem() method
5. Start Mobile Server. This automatically resumes application
6. Client executes sync. This should add the new snapshot. Use MSQL to check snapshot definitions.
F) Changing Primary Keys
Chaning PK is a severe operation which must be executed manually. A snapshot must be deleted and recreated to propagate the changes to the clients. This causes a full refresh on this snapshot.
1. Client syncs. Clients should not add new data until they are told by the administrator to sync again!!
2. Stop Mobile Server listener
3. Drop the snapshot using DropPublicationItem() method o
4. Alter the base table
5. Call CreatePublicationItem()and AddPublicationItem() methods for the altered table
6. Start Mobile Server. This automatically resumes application
7. Client executes sync. The old snapshot will be replaced by the new snapstot using a full refresh. Use MSQL to check snapshot definitions.
G) To Change a Table Weight =>
Follow the procedure below to change the Table Weight parameter. The table weight is used by the Mobile Server/Synchronization to determin the sequence in which client records are applied to the Oracle database.
1. Run MGP to apply any changes in the InQueue to the Oracle databse
2. Change table weight using SetTemplateItemMetadata() method
3. Add/change constraint on the the base table which reflects the change in table weight
4. Synchronize
gl m8 -
Creating an unique index instaed of using primary key index
Hi ,
I heard in a debate sometimes it's better to create a unique index on a column and using it instaed of using primary key index in oracle.I couldn't understand what the reason propely.
Can anyone please help me in thsi topic if it is a valid one .
Thanks in advanceHi,
They are exactly NOT identical.
1. Unique key can have NULL values where primary keys can't.
2. Primary key is fundamentally those keys which do not change. I mean updating a primary key is not a good idea.
SQL> drop table test;
Table dropped.
SQL> create table test ( a number(2));
Table created.
SQL> ed
Wrote file afiedt.buf
1* create unique index test_idx on test(a)
SQL> /
Index created.
SQL> ed
Wrote file afiedt.buf
1* insert into test values(NULL)
SQL> /
1 row created.
SQL> drop table test;
Table dropped.
SQL>
SQL> create table test ( a number(2) primary key);
Table created.
SQL> insert into test values(NULL);
insert into test values(NULL)
ERROR at line 1:
ORA-01400: cannot insert NULL into ("HR"."TEST"."A")
SQL>Cheers,
Edited by: Avinash Tripathi on Nov 24, 2009 11:17 AM -
Unique Index Error while running the ETL process
Hi,
I have Installed Oracle BI Applications 7.9.4 and Informatica PowerCenter 7.1.4. I have done all the configuration steps as specified in the Oracle BI Applications Installation and Configuration Guide. While running the ETL process from DAC for Execution Plan 'Human Resources Oracle 11.5.10' some tasks going to status Failed.
When I checked the log files for these tasks, I found the following error
ANOMALY INFO::: Error while executing : CREATE INDEX:W_PAYROLL_F_ASSG_TMP:W_PRL_F_ASG_TMP_U1
MESSAGE:::java.lang.Exception: Error while execution : CREATE UNIQUE INDEX
W_PRL_F_ASG_TMP_U1
ON
W_PAYROLL_F_ASSG_TMP
INTEGRATION_ID ASC
,DATASOURCE_NUM_ID ASC
,EFFECTIVE_FROM_DT ASC
NOLOGGING PARALLEL
with error java.sql.SQLException: ORA-12801: error signaled in parallel query server P000
ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
EXCEPTION CLASS::: java.lang.Exception
I found some duplicate rows in the table W_PAYROLL_F_ASSG_TMP with the combination of the columns on which it is trying to create INDEX. Can anyone give me information for the following.
1. Why it is trying to create the unique index on the combination of columns which may not be unique.
2. Is it a problem with the data in the source database (means becoz of duplicate rows in the source system).
How we need to fix this error. Do we need to delete the duplicate rows from the table in the data warehouse manually and re-run the ETL process or is there any other way to fix the problem.This query will identify the duplicate in the Warehouse table preventing the Index from being built:
select count(*), integration_id, src_eff_from_dt from w_employee_ds group by integration_id, src_eff_from_dt having count(*)>1;
To get the ETL to finish issue this delete to the W_EMPLOYEE_DS table:
delete from w_employee_ds where integration_id = '2' and src_eff_from_dt ='04-JAN-91';
To fix it so this does not happen again on another load you need to find the record in the Vision DB, it is in the PER_ALL_PEOPLE_F table. I have a Vision source and this worked:
select rowid, person_id , LAST_NAME FROM PER_ALL_PEOPLE_F
where EFFECTIVE_START_DATE = '04-JAN-91';
ROWID PERSON_ID
LAST_NAME
AAAWXJAAMAAAwl/AAL 6272
Kang
AAAWXJAAMAAAwmAAAI 6272
Kang
AAAWXJAAMAAAwmAAA4 6307
Lee
delete from PER_ALL_PEOPLE_F
where ROWID = 'AAAWXJAAMAAAwl/AAL';
Maybe you are looking for
-
Dear All, We are using scenario where we are planning purchase requisitions in APO and sending them in ECC. In ECC we are converting them in to schedule lines. Once schedule lines they get firm in ECC and for APO as well. But we want to change them
-
Difference between free space reported by my iPod Touch and iTunes
Why is so different the free space reported by my iPod Touch and iTunes?, which of both devices is reporting the correct free space? also, I restored my iPod two days ago because "other" space was too big (almost a gig), three days later, is over 500
-
When browsing a fashion or shopping website, you often look at an item, then browse the colour choices, you have to go back multiple pages, before you can look at the next item. Where has the back multiple pages arrow gone?
-
Using iPhoto 5.0.4 with OS 10.4.5. When I click email in iPhoto, it opens Mail, but the actual email is behind the Mail application. While not a huge deal (i.e., it attaches the pic to the email), I have to hit F9 to see the email to send it. Previou
-
"No Service" keeps showing up!, "No Service" keeps showing up!
i have tried everything! please help..getting quite desperate