Duplicate Unique Key declaration in DDL export

Using v1.1.2.25 of the product, I performed a DDL export of selected tables and noted in the resulting file that my two Unique Keys were duplicated (created twice). This caused no real problem except a couple of error message that will confuse customers, so I have to manually extract the second declarations. Did I miss something, or is this a bug?

Define key_element as a key (or unique)! Check the schema specification at http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions. If you're up to a challenge translate the specification from W3-ese to a meaningfult language, or take a short cut and read the example in section 3.11.2.
Support for keys in validation is sometimes spotty, but it's pretty easy to code up your own checks if needed.

Similar Messages

  • Cannot create DDL for Unique Key

    I have a relational model with a unique key constraint. When I go to Export -> DDL File for my model, and look at the PK and UK constraints tab for "DDL Generation Options", the UK is checked. But upon inspecting the generated DDL file, it is not being generated! The target database in Oracle 11.1 and I am using DM 4.0.3.853.

    Hi,
    Very strange.  Is there anything unusual about the Table or its Unique Key column(s)?
    Is everything else being generated as expected?
    Are there any relevant error messages in the log?  (You can use External Log on the View menu to display the log.)
    David

  • *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAss

    *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAssignedMachine
    CCCRT::RunSQLStoredProc - Failed to execute SQL cmd exec [sp_CP_CheckNewAssignedMachine] N'xxx', 1
    CCRQueueRequest::GetRequestFromQueue - Failed to execute SQL cmd sp_CP_CheckNewAssignedMachine
    I get the above issue and the one below at a client site; the error started with the error below then changed to the one reported above and back to the one below. Everything is working as it should but the issues
    started when one of the admins at the data-centre incorrectly applied a gpo which affected a number of service accounts (sccm inclusive) and they expired....hence reporting in sccm got broke as well as this error in the ccm.log file appeared.
    Remote client install still works but I believe this error affects new client discovered by sccm, so in other words devices discovered by sccm do not get the client installed automatically....but if all access and permissions are in place...pushing out the
    client to the new discovered system works, it just not done automatically, which kinda defeats one the reasons for using sccm.
    I have searched the breadth of the tinternet and I can only find two technet reference to the same error  - one says to edit the stored procedure on the sql server which I don't think should be done... Like Jason said and I concur....its bad joo joos.
    The second suggestion, said you should select all the options in the Client Push Installation properties, I have tried this but hasn't solved the problem.
    I am planning to upgrade the site to the R2 CU3 before the end of the year but I would like to resolve this error before the upgrade.
    The site is currently sccm 2012 sp1 
    Any idea?> Resolution? sil vous plait!
    Merci

    Hi ,
    Please back up the database of the SCCM site. Then run the following query against the Site DB and see how it goes.
    DELETE FROM System_SMS_Resident_ARR
    WHERE ItemKey IN (
    SELECT ItemKey FROM vSystem_SMS_Resident_ARR
    GROUP BY ItemKey
    HAVING COUNT(ItemKey) > 1
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Error in Duplicate record validation in EntityObject using unique key contraint

    I have implemented Unique key validation in Entity Object by creating Alternate key in Entity object.
    So the problem is that whenever the duplicate record is found,the duplicate record error is shown, but the page becomes blank, and no error is shown in the log.
    I wanted to know what may be the possible cause of it.
    I am using Jdev 11.1.2.4.

    After duplication, clear the PK item, then populate from the sequence in a PRE-INSERT block-level trigger.
    Francois

  • Diff b/w primary key and unique key?

    what is the diff b/w primary key and unique key?

    Hi,
    With respect to functionality both are same.
    But in ABAP we only have Primary key for the Database tables declared in the Data Dictionary.
    Unique is generally is the term used with declaring key's for internal tables.
    Both primary and Unique keys can identify one record of a table.
    Regards,
    Sesh

  • Duplicate Semantic Key in Write Optimized DSO

    Gurus
    Duplicate semantic keys have a unique index KEY in the key fields of the DSO when WRITE OPTIMIZED DSO is used. (Of course this is assuming the Do not check uniqueness of data indicator is not checked..)
    See help https://help.sap.com/saphelp_crm60/helpdata/en/a6/1205406640c442e10000000a1550b0/frameset.htm
    This means that the DSO can contain duplicate records.
    My question is: What happens to these duplicates when a request level delta update is done to a Standard DSO or Infocube?
    Do duplicates end up in the error stack? Are they simply aggregated in further loads? - because this would be a problem for reporting (double-counting).
    thanks
    tony

    Hi Tony,
    It will aggregate the data in some undesired way.
    Read on...
    https://help.sap.com/saphelp_crm60/helpdata/en/b6/de1c42128a5733e10000000a155106/frameset.htm
    If you want to use write-optimized DataStore objects in BEx queries, we recommend that they have a semantic key and that you run a check to ensure that the data is unique. In this case, the write-optimized DataStore object behaves like a standard DataStore object. If the DataStore object does not have these properties, unexpected results may be produced when the data is aggregated in the query.
    Hope it helps...
    Regards,
    Ashish

  • A duplicate attribute key has been found when processing

    Hi
    When I process one of my dimensions it fails and I get the following error:
    Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'Customers', Column: 'DisplayName', Value: 'Stephen Grant'. The attribute is 'Display Name'.
    I don't know if this is significant, but the attribute to which it is making reference was added through BIDS 2008 (the cube was originally created with BIDS 2005). 
    There are no duplicates of 'Stephen Grant' in the DisplayName column. Not that it should matter if there were as this attribute has a cardinality of Many, with an rigid attribute relationship directly to the dimension's key attribute. The Key column for the Display Name attribute simply refers back to the same (DisplayName) column in the table.
    If I delete this record, or even just update the DisplayName field from 'Stephen Grant' to something else, the dimension processes just fine. I can't work out what it is about this record that is stopping the dimension from being able to process.
    Can anyone help me figure out what's going on?
    Julia.
    P.S. I am using SSAS 2008 on Windows Server 2008

    Hello there,
    Does anybody has the complete resolution for duplicate entries data. I am showing the data below .
    RegionName
    BranchName
    LoanOfficerFullName
    PRIME - TEAM NORTHEASTERN
    CALIFORNIA
    ALONA  HAYES
    PRIME - TEAM WESTERN
    RENO-DAMONTE RANCH
    VINCENT LOTITO
    PRIME - TEAM WARTON
    NEWARK (Chicago)
    CHRISTOPHER CLIFTON
    PRIME - TEAM WARTON
    GRAND HAVEN (West Michigan)
    SEAN  FOLEY
    PRIME - TEAM SALMANS
    LAWTON (Amarillo)
    THOMAS  STEARNS
    PRIME - TEAM BARTON
    CALIFORNIA
    ALONA  HAYES
    PRIME - TEAM ROBINSON
    LAS VEGAS
    ANGELA DEATON
    PRIME - TEAM ROBINSON
    LAS VEGAS
    HERMAN  VANDER VELDT
    PRIME - TEAM ROBINSON
    LAS VEGAS
    DAWN ROBINSON
    PRIME - TEAM ROBINSON
    LAS VEGAS
    MICHAEL  BIRK
     Here i have the Hierachies in order LoanOfficerFullName-->BranchName-->RegionName. Loan Officer is the lowest level. I had created another column and make that unique entries so that I could make the unique column as the Key and the hierachies i have linked with the key column value. The issue
    is that i am getting the expected result in OLAP  from data side. But the data is not getting aggregated like Team Barton is coming twice though for the Dimension I make IsAggregatable property to True. If anybody can help me I will aprecciate. If any other clarification need I can provide.

  • Jso.getAnnots() returning duplicate name (key) stamps

    I'm using VBA to parse a document for comments, and storing them in a dictionary object. I ran into an issue where jso.getAnnots is returning a duplicate name for an item.
    Looking into the issue, there are comments with the same text that don't cause this issue.
    Looking for a fix and the cause of this issue.
    Why would it generate an identical name for a different comment? We've run hundreds of documents with this before and this issue has never occurred before. The name seems to be a unique key, such as "820edea8-c848-432a-aadd-987316a9ea7f".
    Here's a snippet of the code:
         jso.syncAnnotScan()
          Annots = jso.getAnnots()
          ' Pass one - get all the comments.
    Dim Annots As Object
          Dim Annot As Object
          Dim acroAnnotation As Annotation
          Dim childAnnotation As Annotation
          Dim annotationSet As New Dictionary(Of String, Annotation)
          Dim rootAnnotations As New Dictionary(Of String, Annotation)
            For Each Annot In Annots
                    acroAnnotation = New Annotation(Annot, FromFilename)
                    annotationSet.Add(Annot.name, acroAnnotation)
                    If Annot.inReplyTo = "" Then
                        rootAnnotations.Add(Annot.name, acroAnnotation)
                    End If
            Next Annot
    It crashes at annotationSet.Add(Annot.name,acroAnnotation)

    Ok I managed to get 4.3.1 working in the end. It turned out that because I was using Skinny Wars in maven, it has unforseen side effects with the ChangeAwareClassLoader. I thought I tried this problem without using Skinny Wars, but I guess I didn't.
    Edited by: 1002618 on May 1, 2013 9:57 PM

  • Duplicate attribute key in date Dimension

    Hi,
    I have created a date dimension using this code
    http://www.codeproject.com/Articles/647950/Create-and-Populate-Date-Dimension-for-Data-Wareho
    It contains one attribute 'Month'
    I have created one fact table which contains the following dates
    StartDate
    EndDate
    CreationDate
    CompletionDate
    AssignedDate
    ReceivedDate
    ActualStartDate
    AcutualEndDate
    DecisionDate
    I have created a relationship with date dimension created by using above code. Relationship of above attributes have been created with DimDate.Date attribute. I have not created Calendar Hierarchy yet. 
    When I am processing the cube I am getting the following error
    Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'dim_Date', Column: 'Month', Value: '10'. The attribute is 'Month'.
    In date dimension have data from 1990 to 2050. so Month is being repeated for each year. I am not sure Why am I getting this error.
    Any Help much appreciated.
    MH

    Hi Mustafah,
    For the error "Errors in the OLAP storage engine: A duplicate attribute key has been found when rocessing: Table: <tablename>, Column: <columnname>. Value: <value>. The attribute is <attributename>", it  can occur in multiple
    situations. In many cases, the recommended solution is to change the KeyColumn by setting it to a unique attribute, or by creating a composite key that results in a unique value when multiple attributes are evaluated as a unit. Here are some document which
    describe this error and the solution of it.
    References:
    Analysis Services: Errors in the OLAP storage engine:
    A duplicate attribute key has been found when processing
    You get “A duplicate attribute key has been found when processing ..” error message when processing a dimension
    A duplicate attribute key has been found when processing
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • How to control unique key target table mapping!

    Hi all,
    Is there any way to map a source table to target,the source table contains some duplicate rows,and only one of them is needed for the target table,can OWB manage to insert only one of these duplicate rows and ignore other rows according to an unique key and continue to execute the map?
    Thanks in advance!

    If you have duplicates and want to filter them out, try creating a view on the target table and use the rownum() function in the view.
    Than in your mapping use this view as you source and put a filter on it where the rownumber = 1. This will only select the unique records.

  • "Unique Key" in an array of elements

    Hi all.
    I'm attaching here a piece of an XSD I'm writing:
              <xs:element name="main_element" maxOccurs="unbounded">
           <xs:complexType>
              <xs:sequence>
                   <xs:element name="key_element" type="xs:string"/>
                      <xs:element name="element_2" type="xs:integer"/>
                 </xs:sequence>
              </xs:complexType>
              </xs:element>What I'd like is defining "key_element" as a unique key of the array "main_element", that is forcing the resulting array not to contain duplicate values for "key_element".
    Is there any way to accomplish that?
    Thanks in advance for any help!

    Define key_element as a key (or unique)! Check the schema specification at http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions. If you're up to a challenge translate the specification from W3-ese to a meaningfult language, or take a short cut and read the example in section 3.11.2.
    Support for keys in validation is sometimes spotty, but it's pretty easy to code up your own checks if needed.

  • Creating an Incremental Unique Key in Transfer Rules Routine

    Hello Experts,
    In my Infosource, I have created a routine in the transfer rules on my infoobject.  I am trying to load my data from a flat file and create a unique key by autonumbering a field in my infosource/datatarget. 
    I am new to ABAP and can not figure out why my code will not return a value...
    Under "Use of Transfer Structure Fields" I chose my field to change only, and entered the following code:
    Under Global Code I declared my counter because I want it to maintain its value during the entire load:
      DATA: COUNTER TYPE I VALUE 0.
    Then in my routine I have the following code:
      COUNTER = COUNTER + 1.
      RESULT = COUNTER.
      RETURNCODE = 0.
      ABORT = 0.
    I expect this to return 1 for the first record, 2 for the second, and so on - therefore giving me a unique key.  Any assistance in my code or other ways to automate this process in BW would be greatly appreciated.
    Thank you.

    Sean,
    It looks like your routine is basically correct.  Have you tried using single quotes around the S instead?  Also - you may want to add a statement to indicate what 0AMOUNT should be in the instance where your condition isn't true.  Something like this:
    IF tran_structure-shkzg  = 'S'.
    RESULT = tran_structure-wrbtr * -1.
    ELSE.
    result = ???
    ENDIF.
    Good luck!  The syntax check in the transfer rules leaves a bit to be desired, doesn't it?

  • Java OracleXML putXML & non-unique keys

    I am using the XML SQL Utility for java on the client (NT) to insert multi-row XML documents into an ORACLE table. Everything works fine until I hit a row with a non-unique key. It appears insertXML throws an error and the insert stops at that point. Rows after the non-unique key row are not processed.
    Is there any way to process all rows of an XML document, telling me how many read, how many inserted, how many not processed??
    Also, what about update capabilities? Presently I am not needing to update from XML into ORACLE, all I can do now is insert.
    Thanks in advance,
    Rick

    One way to make this work would be to take advantage of Oracle8i's INSTEAD OF triggers on views.
    Basically, you would:
    (1) CREATE VIEW someview
    AS SELECT * FROM sometable;
    (2) CREATE TRIGGER someview_trig
    INSTEAD OF INSERT ON someview
    DECLARE
    BEGIN
    -- Check for existence of
    -- row using the value of
    -- :NEW.pk_column_name
    IF (you-found-an-existing-one) THEN
    -- Do something here like
    -- NULL; to ignore the insert altogether
    -- or possible an INSERT into
    -- and EXCEPTIONS table...
    ELSE
    INSERT INTO sometable
    VALUES (:NEW.column1, ..., :NEW.columnn);
    END IF;
    END;
    (3) Then point XML SQL Utility at someview
    instead of sometable
    and you'll be in business, as they say.

  • AMT enrollment error - Violation of UNIQUE KEY constraint 'EN_EnrollmentRecords_AK'.

    Hello,
    I've trouble enrolling AMT computer with SCCM 2012
    I've foud the following error in Amtproxymgr.log
    15/05/2014 14:54:50     
    Found instruction file: D:\Apps\Microsoft Configuration Manager\inboxes\amtproxymgr.box\{C6B0AAB5-BB02-4673-B44A-118917419389}.OTP
    15/05/2014 14:54:50     
    It's client provisioning request to be processed.
    15/05/2014 14:54:50     
    Stored provisioning request into database. SMSID: Machine_GUID
    15/05/2014 14:54:50     
    Target machine SMSID:Machine_GUID is a AMT capable machine.
    15/05/2014 14:54:50     
    Passed SanityCheckBeforeProvision(). FQDN is MYCOMPUTERNAME.domain.
    15/05/2014 14:54:50     
    BASE64 string OTP is : OTP_STRING
    15/05/2014 14:54:58      *** EN_EnrollmentAdminInsert @ProfileId = '16777217', @AssignedSiteCode = N'SITE_CODE', @DeviceName = N'MYCOMPUTERNAME', @ResourceID = '16816953', @OwnerIdentity = N'', @ClientType
    = '1', @OrganizationUnit = N'LDAP://OU=OU_NAME
    15/05/2014 14:54:58     
    *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'EN_EnrollmentRecords_AK'. Cannot insert duplicate key in object 'dbo.EN_EnrollmentRecords'. The duplicate key value is (MYCOMPUTERNAME). : EN_EnrollmentAdminInsert
    15/05/2014 14:54:58     
    Fail to insert Enrollment Record!
    15/05/2014 14:54:58     
    Error: Failed to create enrollment record.
    If I do a query on V_R_SYSTEM the resource ID for MYCOMPUTERNAME is 16816953.
    If I do a query on EN_EnrollmentRecords the Ressource Id associated  to
    MYCOMPUTERNAME is 16777351
    So there is already a record for MYCOMPUTERNAME in
    EN_EnrollmentRecords.
    I think the reason is that the computer resource has been removed from SCCM and then readded. The computer has now a new Ressource ID. But the deletion of the previous computer ID did not removed the record from
    EN_EnrollmentRecords.
    How can I solve this ?

    Open Sql Server Management Studio, and do the query below.
    select * from dbo.en_EnrollmentRecords where ResourceID ='16777351'
    delete from dbo.EN_EnrollmentRecords where ResourceID = '16777351'
    Delete the Device from console and AD and try provisioning again.
    Note: Please backup your Database before doing this modification. Modifying database will be at your own risk.
    Juke Chou
    TechNet Community Support

  • Rich/Narendran - uh oh!! Does the shared buffer require unique key per id??

    Rich/Narendran -
    Something just occurred to me:
    Does "shared buffer" mean that more than one user can be sharing the same buffer, or is the buffer unique to each user session and is merely "shared" between work processes?
    If multiple users are sharing the same "shared buffer", then I can assign a unique key when I export the data in the first exit.
    But short of using a custom z table, how can I figure out what this key is in the second exit?  I can't "save" the key anywhere, because that's the problem in the first place ...
    I'm hoping that you'll tell me that the "shared buffer" is shared between different work processes for the same user, and not among different users as well !!
    Thanks for whatever you can tell me about this.
    djh

    Hi Naren -
    I've worked on DBMS's in the past where you could pick up a user's thread # in addition to his or her ID - if SAP had anything like that then that would do the job.  Maybe there's a "hidden" sy-something that actually gives you the unique thread ID ... ????
    djh

Maybe you are looking for

  • Business Rules Not Visible in Planning.............

    Hi All, I have created business rules in Essbase & works well.But Those are not showed in planning App.Here , While i'm creating Business Rules ,able to access for essbase only , when click on planning to shows unable login planning. Plzzzzzzzz help

  • How to fit placed items multiple up?

    Hello, I am new to InDesign CC, and apologize if what I am looking for is a simple command and I am just not calling it the right thing. I am wanting to know if there is a way to automatically fill a blank document with placed items making it multipl

  • RCA - E2E_BI_DELETE entries are less

    Hi All, After the diagnostics configuration BI housekeeping job E2E_HK_CONTROLLER is scheduled successfully. But when i check E2E_BI_DELETE table entries which are used by the E2E_HK_CONTROLLER job to delete data their is only 1 entry. But in case of

  • How to use iTunes installed in PC as video converter

    I just got new ipad & understood that video format other than .mov & .mp4 will not play in Ipads.  Somewhere I read that the iTunes software installed in my windows PC can do the conversion job  from avi to mp4  format, so that after that  it can be

  • Downloaded pictures from e-mail. It covers the whole screen. How do I get back to e-mails?

    I downloaded pictures on my new I-Pad 2 from email. It covers the whole page. How do I get back to my e-mails?