Hi,
i am running with a issue of update in SQL server 2000.
It works fine for new DCR. But if same DCr is deployed again, it throws a referential integrity error. I tried with,
ri-constraint-rule="ON DELETE CASCADE" option for cascade delete. but it still throwed the same error.
Following is hoe my database tag look in dd config file.
user = "$user^"
password = "$psw^"
vendor = "microsoft-inetuna"
timeout = "4"
real-update = "no"
delete-tracker = "yes"
enforce-ri = "yes"
commit-batch-size="1"
schema-helper-cleanup="yes"
>
and following cascade delete entry for child tables.
foreign-key parent-group="ctmContent" ri-constraint-rule="ON DELETE CASCADE"
column-pair parent-column="ContentID" child-column="ContentId"
foreign-key
But got following error.
DBD: ERROR:
java.sql.SQLException: [WNY02KDEV3]INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'fkctmContentTaxonomyContentId_ctmContentContendId'. The conflict occurred in database 'TESTDB', table 'ctmContent', column 'ContentId'.
at com.inet.tds.e.a(Unknown Source)
at com.inet.tds.e.a(Unknown Source)
at com.inet.tds.b.new(Unknown Source)
at com.inet.tds.b.executeUpdate(Unknown Source)
at com.interwoven.dd100.dd.TDbSchemaGroupCfg.PerformInsertForColumnArray(TDbSchemaGroupCfg.java:1284)
at com.interwoven.dd100.dd.TDbSchemaGroupCfg.InsertForSingleReplicant(TDbSchemaGroupCfg.java:1523)
at com.interwoven.dd100.dd.TDbSchemaGroupCfg.PerformReplicantInsert(TDbSchemaGroupCfg.java:1339)
at com.interwoven.dd100.dd.TDbSchemaGroupCfg.DoInsert(TDbSchemaGroupCfg.java:1135)
at com.interwoven.dd100.dd.TDbSchemaCfg.InsertWithGroupTree(TDbSchemaCfg.java:456)
at com.interwoven.dd100.dd.TDbSchemaCfg.Insert(TDbSchemaCfg.java:409)
at com.interwoven.dd100.dd.TDbSchemaAgent.BasicWriteTuple(TDbSchemaAgent.java:455)
at com.interwoven.dd100.dd.TDbSchemaAgent.WriteTuple(TDbSchemaAgent.java:334)
at com.interwoven.dd100.dd.TConsumerManager.WriteConsumerInternal(TConsumerManager.java:398)
at com.interwoven.dd100.dd.TConsumerManager.WriteConsumers(TConsumerManager.java:387)
at com.interwoven.dd100.dd.TAgentClient.DoOneTeamSiteSource(TAgentClient.java:974)
at com.interwoven.dd100.dd.TAgentClient.DoTeamSiteSources(TAgentClient.java:474)
at com.interwoven.dd100.dd.TAgentClient.DoOneDeployment(TAgentClient.java:261)
at com.interwoven.dd100.dd.TAgentClient.Go(TAgentClient.java:194)
at com.interwoven.dd100.dd.IWDataDeploy.Go(IWDataDeploy.java:545)
at com.interwoven.dd100.dd.TDASThread.ProcessItem(TDASThread.java:203)
at com.interwoven.dd100.dd.TDASThread.run(TDASThread.java:128)
DBD: ERROR
oInsert() failed for group [ctmContentTaxonomylob].
DBD: -- Failed So i tried to use
real-update=yes. But, I read that we can not modify the primary key in that case. And it also throwed the same error.
Finaly, after getting frustrated with all this, I went to execute a store proc to delete the entry from DB before actual insert in DB.
but it too gave following error
DBD: SQLException occured in TDbAgent::ExecuteProcedure():EXECUTE BEGIN
DELETE FROM ctmcontenttaxonomy where ContentId = '888B0096-B30C-465A-AC53-52ECDA8E14E5'
END
DBD: Exception Message: [WNY02KDEV3]Incorrect syntax near the keyword 'BEGIN'.
DBD: Vendor Error Code: 156
DBD: SQL state: 01000
DBD: *******************************************************
DBD:
DBD: *******STACK TRACE*************
DBD: ERROR:
java.sql.SQLException: [WNY02KDEV3]Incorrect syntax near the keyword 'BEGIN'.
at com.inet.tds.e.a(Unknown Source)
at com.inet.tds.g.if(Unknown Source)
at com.inet.tds.g.a(Unknown Source)
at com.inet.tds.g.for(Unknown Source)
at com.inet.tds.b.new(Unknown Source)
at com.inet.tds.b.execute(Unknown Source)
at com.interwoven.dd100.dd.TDbAgent.ExecuteProcedure(TDbAgent.java:3390)
at com.interwoven.dd100.dd.TDbAgent.DoSql(TDbAgent.java:3072)
at com.interwoven.dd100.dd.TCommand.Do(TCommand.java:244)
at com.interwoven.dd100.dd.TAgentClient.Go(TAgentClient.java:147)
at com.interwoven.dd100.dd.IWDataDeploy.Go(IWDataDeploy.java:545)
at com.interwoven.dd100.dd.TDASThread.ProcessItem(TDASThread.java:203)
at com.interwoven.dd100.dd.TDASThread.run(TDASThread.java:128)
DBD: Error occured in TDbAgent::ExecuteProcedure()
DBD: Error occured in area outside TDbAgent consumer (explicit rollback initiated)
following is the entry in dd config file
area="$area^" area-type="ts-filesystem">
user = "$user^"
password = "$psw^"
vendor = "microsoft-inetuna"
table = "dummy_table"
>
BEGIN
DELETE FROM ctmcontenttaxonomy where ContentId = '888B0096-B30C-465A-AC53-52ECDA8E14E5'
END
I am getting mad with this..
if i do not get any solution out of this, i have to go for delete and insert SQL statements for update in perl script, then the questions come why to use DD?
I can drop it and user only sql statement for complete deployment.
or am i missing something ?
help is appreciated....
ENV: TS 6.5 ,OD 6.1.1 on windows server 2003 DB: SQL server 2003
thanks in advance,
amit