Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DataDeploy Error
zainalab
Hi Everyone,
We are experiencing problems deploying entries in the DCR to a database table using DataDeploy and would appreciate it if anyone has any idea of why this is happening.
First on the configuration...
We are using DataDeploy 5.5.2 and TeamSite 5.5.2 running on a Windows platform using MS SQL Server.
The database configuration for DD looks like the following:
<database use="$dbname" real-update="yes" enforce-ri="no" update-type="standalone" delete-tracker="yes">
As for the table being used, we have 3 columns specified as primary keys (composite keys that is), namely Field1, Field2, and Field3. All these fields are VARCHAR fields.
The problem:
When we change something in either Field1, Field2, or Field3, DD failed reporting failure to insert duplicate key in the database. The error looks like the following:
*******************************************************
SQLException occured in TDbSchemaGroupCfg
Exception Message: [OURSERVER]Violation of PRIMARY KEY constraint 'our_db_table_key'. Cannot insert duplicate key in object 'our_db_table'.
Vendor Error Code: 2627
SQL state: 23000
*******************************************************
Further investigation shows that it only happens if the changes made are of case-sensitivity nature. What this means is that, say in Field2, you have the value "my text". If we were to change value to something else like "your word", DD works out OK without any errors. However, if we were to change the case to uppercase, i.e. "My Text", DD failed to update the database properly. Somehow, it went wrong somewhere during the comparison process.
Any ideas?
Thanks.
Find more posts tagged with
Comments
fish
I'm no expert on MS SQL but I think that the a default SQL Server installation is case insensitive, which means that SQL Server will not differentiate between upper and lower case characters/letters.
In the distant past I'm sure I came across this issue with querying.
So in you example i.e. "My Text" will be the same as i.e. "my text" thus your PRIMARY KEY constraint violation error.
There again I could be barking up the wrong tree...
Steve.
Steve North
Interwoven Consultant
Sony - Europe
zainalab
I am doubting that it's relating to SQL Server case-sensitivity. The reason behind this is that based on the output from DD execution via the command line, it look like DD sees it a new entry rather than a changed entry. This is because DD did not even conduct the "SELECT COUNT(*)" for that particular entry. Instead, it issues an "INSERT" directly without verifying whether the record exists. Apart from the case-changing action, the same error goes when we move the sequence of entries in the DCR. For example, suppose I have 3 entries, A, B, and C in my DCR and deployed the entries successfully. However, when I edit the DCR again and change the sequencing of the entries (say A goes as first entry, C as second, and B as third), DD reported a failure because somehow, DD thinks that in the entry C is a new entry and conducts an INSERT. But in fact, it was previously the 3rd entry that was moved as the second entry. Hmmm...