Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Data Deploy Urgent
HemaKK
Consider the following 2 tables:
SPONSOR_DETAIL TABLE: with the following fields
Sponsor_detail_id (Primary key)
Sponsor_id (Foreign Key)
Show_id (Foreign key)
SPONSOR_SHIP TABLE: with the following fields
Sponsor_id (Primary Key)
Sponsor_picture
Sponsor_description
Here the Sponsor_id in SPONSOR_SHIP table is used as the foreign key in SPONSOR_DETAIL.
During DataDeployment, the following problem is happening:
During each datadeploy, records need to be inserted only into the SPONSOR_DETAIL Table:
If there is a recordset as
INSERT INTO SPONSOR_DETAIL (Sponsor_detail_id, Sponsor_id, show_id) values (111, 222, 333) ;
The problem that takes places, before the above insertion, deletion operation is performed as:
DELETE FROM SPONSOR_DETAIL where Sponsor_id=222;
So all records of different show_id’s with sponsor_id = 222 gets deleted. Which is not supposed to happen.
I have given the following database setting in the deployement config file:
“<database db="10.25.2.22:1521:WPDEV" user="INTERWOVEN" password="*****" vendor="oracle" update-type="standalone" state-field="state" real-update="yes" delete-tracker="yes" enforce-ri="yes" ri-constraint-rule="ON DELETE CASCADE">”
Find more posts tagged with
Comments
Michael
Hi
In your database element you appear to be trying to use real updates and enforcing RI. These are incompatible. Here is a snippet from the DD manual to explain...
Real Updates
By default, DataDeploy performs updates by deleting existing rows and then inserting new
rows into the database tables. Alternatively, instead of this “delete followed by insert”
sequence, you can configure DataDeploy to perform “real updates”. A real update is when
DataDeploy executes a series of UPDATE SQL statements.
Real updates can only be performed if referential integrity is not being enforced (that is, the
database element’s enforce-ri attribute must not be set to "yes" in the configuration
file). If referential integrity is being enforced, DataDeploy will only perform default
(deletes followed by inserts) updates, because relational databases do not allow the
modification of values or fields that are mapped to a primary/foreign key column due to
constraint violation errors.
If the enforce-ri attribute is not set or set to "no", real updates are performed by setting
the real-update attribute to "yes" in the database element.
If you are only deploying to one table in your deployment (SPONSOR_DETAIL) you don't need enforce RI do you? If you turn that off then perhaps you will receive the results you expect.
HTH
Cheers
Michael