Home
TeamSite
CLOB fields are inserted but not updated
pbenn
DataDeploy Version 5.6.0 Build 19499 Interwoven 20030506
Database Vendor set to oracle
TS 6.1SP2 Sol 9
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
I'm seeing an issue where CLOB fields are set correctly from my DCR on insert, but when I data deploy after the DCR updates, the CLOB fields are erased. All other non CLOB fields are preserved.
The DCR contains the CLOB data. The size of the field is currently less than 100 chars (but will get much bigger, thus the need for a CLOB).
No errors appear in the dd command output. 1 DCR updates successfully.
My dd config:
<data-deploy-configuration>
<data-deploy-elements filepath="/cms/iw-home/dd-home/datadeploy/conf/database.xml" />
<client>
<!-- database.xml contains all the parameters used to connect to Oracle database -->
<!-- This deployment is synchronizing JOB DCR's to the JOB table structure in Oracle -->
<!-- deployment name is used to deploy at iwdd.ipl -->
<deployment name="irc_job">
<source>
<teamsite-templating-records options ="wide" area = "/default/main/CCMC/WORKAREA/development" custom="yes">
<path name = "$dcr_to_deploy" visit-directory = "deep" />
</teamsite-templating-records>
</source>
<!-- custom="yes" indicates that this is a customised dd config file. It is a very important parameter. The info about other parameters such as Path Name, and Visit Direcotry can be found in DataDeploy 5.6 manual -->
<destinations>
<database use ="ccmc_dev" update-type = "standalone" delete-tracker="yes">
<dbschema>
<group name="Job" table="Job" root-group="yes">
<attrmap>
<column name="ProjectID" data-type="varchar2(10)" value-from-field="job/0/ProjectID/0" data-format="04yyyynnnn" allows-null="no" />
<column name="StatementOfWork" data-type="CLOB" value-from-field="job/0/StatementOfWork/0" />
</attrmap>
<keys>
<primary-key >
<key-column name="ProjectID" />
</primary-key>
</keys>
</group>
</dbschema>
</database>
</destinations>
</deployment>
</data-deploy-configuration>
Find more posts tagged with
Comments
nipper
Can you run one a DD from the commandline and post the output ?
Also include a credit card number.
pbenn
Thanks, nipper. I should also mention we can manually update CLOB fields with sqlplus, np
/cms/iw-home/dd-home/datadeploy/bin/iwdd.ipl cfg=irc_dd_test.cfg deployment=irc_job "dcr_to_deploy=/templatedata/CCMC/job/data/0420056451~Dorwin Miss
ile Proof Glass"
DataDeploy Version 5.6.0 Build 19499 Interwoven 20030506
Database Vendor set to oracle
SQL datatype for column ProjectID is varchar2(10)
SQL datatype for column StatementOfWork is CLOB
# of columns: 2
# of primary key columns specified: 1
# of groups defined in <dbschema> element: 1
Area VPath:/default/main/CCMC/WORKAREA/development
Setting up TDbSchemaAgent.
>>> Loading drivers <<<
url : xx.xx.xx.xx:1526:ce
login : dev
login timeout=3
Connecting to the database...
Try connecting using jdbc
racle:thin:
@xx
.xx.xx.xx:1526:ce...
Connected to jdbc
racle:thin:
@xx
.xx.xx.xx:1526:ce
Driver Oracle JDBC driver
Version 9.0.1.0.0
Connected to [xx.xx.xx.xx:1526:ce]
SELECT * FROM USER_TABLES WHERE TABLE_NAME='IWOV_IDMAPS'
Building mappings cache...
Built mapping cache(s) successfully.
# column mappings: 0
# table mappings: 0
# view mappings: 0
# constraint mappings: 0
SELECT * FROM USER_TABLES WHERE TABLE_NAME='IWDELTRACKER'
SELECT * FROM USER_TABLES WHERE TABLE_NAME='JOB'
Table [JOB] exists.
Running deployment [irc_job]
extraction type=default
tuple mode=wide
area=/default/main/CCMC/WORKAREA/development
/default/main/CCMC/WORKAREA/development//templatedata/CCMC/job/data/0420056451~D
Generate DirectoryContents start:Wed May 18 15:51:55 EDT 2005
Generate DirectoryContents end :Wed May 18 15:51:55 EDT 2005
Generate TCustomDCRTupleProducer start:Wed May 18 15:51:55 EDT 2005
Generate TCustomDCRTupleProducer end :Wed May 18 15:51:55 EDT 2005
Building replicant order column information.
Building replicant order column information... Done.
TUPLE={job/0/Contract/0/contractnum/0=654, job/0/ProjectTeam/0=
, job/0/EvaluateAs/0=innovative, job/0/ProjectContact/0=
, job/0/Code/0=
, job/0/JobDates/0/EvalDates/0/EvalDraftDate/0=2005-06-29, job/0/StatementOfWo
- identify the technical performance issues to be addressed to establis
nded use;
- identify the applicable requirements of the National Building Code (N
- consult with the Provinces and Territories to identify code variances
nce of your product.
Evaluation Plan
- consult with technical experts from NRC or other organizations on the
n;
- liaise with the Standing Committee on Technical Evaluations (SCTE) to
nd
(Note: The SCTE is an external independent body of experts selected from diffe
anada.)
- identify the cost and time frame for the development of the Technical
n Report.
(Note: A Technical Guide includes the test methods and technical criteria that
test results are conclusive, CCMC issues an Evaluation Report identified with a
Deliverables
- Scope and Evaluation Report.
- Proposal for development of the Technical Guide and Evaluation Report
/EvalDocsRequestDate/0=2005-06-29, job/0/JobDates/0/EvalDates/0/EvalEditDate/0=2
tEndDate/0=2005-05-18, job/0/JobDates/0/TGDates/0/TGDraftDate/0=2005-06-29, job/
, job/0/JobDates/0/nottakenupdate/0=2005-06-29, job/0/JobDates/0/EvalDates/0
es/0/EvalDates/0/EvalInvRequestDate/0=2005-06-29, job/0/ProjectTypeCode/0=JOB, j
-06-29, job/0/ProjectContact/0/maincontact/0=1100002603, job/0/JobDates/0/OntMin
0=This is an evaluation., job/0/Code/0/Standards/2=Slightly less, job/0/Code/0/S
=None, job/0/JobDates/0=
, job/0/JobDates/0/EvalDates/0/EvalInvSentDate/0=2005-06-29, job/0/JobDates/0/
Dates/0/SEPDates/0/SEPDraftDate/0=2005-05-18, job/0/EvaluationApplication/0/Desc
Description
Description
Description
Description, job/0/JobDates/0/EvalDates/0/EvalInvPaidDate/0=2005-06-29, job/0/Jo
/0/TGDates/0/TGTranslateDate/0=2005-06-29, job/0/JobDates/0/CloseDate/0=2005-06-
eceiveDate/0=2005-06-29, path=templatedata/CCMC/job/data/0420056451~Dorwin Missi
PFinalDraftDate/0=2005-05-18, job/0/WorkflowModifiable/0=, job/0/JobDates/0/TGDa
, job/0/JobDates/0/SEPDates/0/SEPPTPlanEndDate/0=2005-06-01, job/0/JobDates/
ob/0/JobDates/0/applicationdate/0=2005-05-18, job/0/JobDates/0/EvalDates/0/EvalP
oassigned/0=1100002603, job/0/JobDates/0/EvalDates/0/EvalApproveDate/0=2005-06-2
, job/0/product/0=, job/0/JobDates/0/ApproveCloseDate/0=2005-06-29, job/0/JobD
, job/0/JobDates/0/SEPDates/0/SEPTranslateDate/0=2005-06-29, job/0/JobDates/
ProjectID/0=0420056451, job/0/JobDates/0/SEPDates/0/SEPActEndDate/0=2005-06-29,
/0/CodeReference/0=65463, job/0/JobDates/0/TGDates/0/TGFinalDraftDate/0=2005-06-
tes/0/SEPDates/0/SEPInvSentDate/0=2005-05-18, job/0/JobDates/0/TGDates/0/TGInvPa
ype=CCMC/job, job/0/JobDates/0/SEPDates/0/SEPInvPaidDate/0=2005-05-18, job/0/Eva
e/Limitation
Usage/Limitation
Usage/Limitation
Usage/Limitation
Usage/Limitation
Usage/Limitation, job/0/Contract/0=
, job/0/JobDates/0/TGDates/0/TGInvRequestDate/0=2005-06-29, job/0/JobDates/0/E
JobDates/0/EvalDates/0/EvalIssueDate/0=2005-06-29, job/0/JobDates/0/EvalDates/0/
Dates/0/SEPDates/0/SEPPlanEndDate/0=2005-06-29, job/0/JobDates/0/EvalDates/0/Eva
/0/peerassigned/0=1100002603, job/0/Contract/0/ccnumber/0=655, job/0/JobDates/0/
JobDates/0/SEPDates/0/SEPPTStartDate/0=2005-05-18, IWOV_PROC_FLAG=true, job/0/Jo
job/0/ProductID/0=0500004488, state=Original, job/0/JobDates/0/TGDates/0/TGEdit
, job/0/JobDates/0/TGDates/0/TGApproveDate/0=2005-06-29, job/0/JobDates/0/eoassi
TDbSchemaGroupCfg:RowsExistForTuple
ELECT COUNT(*) FROM JOB WHERE ProjectID IN
TTableSchemaHelper not found in cache for [JOB]. Creating new.
Performing delete+insert
Only one group is defined. Skipping delete for update.
TTableSchemaHelper object for [JOB] found in cache.
TTableSchemaHelper object for [JOB] found in cache.
SELECT KEYCOLNAME , KEYCOLVALUE FROM IWDELTRACKER WHERE PATH = ? AND AREA
0 PK values retrieved from iwdeltracker for templatedata/CCMC/job/data/042005645
MC/WORKAREA/development
TTableSchemaHelper object for [JOB] found in cache.
SelectCurrentRows
ELECT StatementOfWork,ProjectID FROM JOB WHERE ProjectID = ?
Column: ProjectID, field: job/0/ProjectID/0, Index: 1,Converting '0420056451' to
SelectCurrentRows: 1 rows selected.
UPDATE JOB SET StatementOfWork = ? WHERE ProjectID = ?
length of CLOB/LONG data = 1310
Column: StatementOfWork, field: job/0/StatementOfWork/0, Index: 1,Converting '..
>.....' to CLOB
Column: ProjectID, field: job/0/ProjectID/0, Index: 2,Converting '0420056451' to
1 rows inserted into iwdeltracker for templatedata/CCMC/job/data/0420056451~Dorw
KAREA/development
-- Updated
Stat for group [Job]:
-----------------------------------
Rows inserted : 0
Rows updated : 1
Rows deleted : 0
Rows failed : 0
Rows rolled back : 0
Rows skipped : 0
-----------------------------------
Committing database [xx.xx.xx.xx:1526:ce]...
Deployment[irc_job]
-----------------------------------
DCRs inserted : 0
DCRs updated : 1
DCRs deleted : 0
DCRs failed : 0
DCRs rolled back : 0
DCRs skipped : 0
-----------------------------------
Started : Wed May 18 15:51:54 EDT 2005
Finished: Wed May 18 15:51:56 EDT 2005
### IWDataDeploy DONE ###
nipper
thank *looks* like it completed. Can you check the Oracle logs and see
if any request made it to Oracle ? What was processed ?
Michael
A wild stab in the dark perhaps...but if nothing else works then this might be something to consider. We are using oracle and deploying clobs. It all seems to work fine. The only difference I noticed was that our DataDeploy is using the oci driver - not the thin driver.
Connecting to the database...
Try connecting using jdbc
racle
ci8:
@oracleserver
.com...
Connected to jdbc
racle
ci8:
@oracleserver
.com
Driver Oracle JDBC driver
Version 9.2.0.1.0
Connected to [oracleserver.com]
pbenn
Please excuse me if there is an RTFM reference (I had a quick look at the 5.6 dd ref manual and nothing jumped out at me) for this ...
Where did you specify the driver for dd to use? In database.xml? In the db field?
Thanks,
P.
nipper
I know there is a bug filed with DD pushing clobs using JDBC. We used a seperate
preprocessor statement to push the CLOB into Oracle. IIRC it worked with the Oracle
Client Drivers but not with the JDBC drivers.
Andy
Michael
In our database.xml we have something like this:
<database name="production-db"
db="foo"
user="bar"
password="waa"
vendor = "oracle"
use-oci="yes">
</database>
Hope that helps.
Cheers
Michael
PS: I am not 100% sure, but you may need the Oracle client installed on your server to use the OCI driver...
pbenn
Thanks, that was the trick to get the oci driver loaded by DD. Now, I'm having our DBA look into this a bit further. I'm seeing the following error message, which is probably a Oracle client config/install issue. As a workaround, I've tested a solution which involves using DBI to insert CLOB fields _after_ I do the data deploy from my externalt task. Ugly, to be sure ...
I'll post back with the results when we get this problem fixed ...
Area VPath:/default/main/CCMC/WORKAREA/development
Setting up TDbSchemaAgent.
>>> Loading drivers <<<
url : xx.xx.xx.xx:1526:ce
login : dev
login timeout=3
Connecting to the database...
Try connecting using jdbc
racle
ci8:
@xx
.xx.xx.xx:1526:ce...
Exception in thread "main" java.lang.NoSuchFieldError: OCIEnvHandle
at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:287)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:172)
at com.interwoven.dd100.dd.JdbcCheckup.MakeConnection(JdbcCheckup.java:361)
at com.interwoven.dd100.dd.JdbcCheckup.TryConnect(JdbcCheckup.java:462)
at com.interwoven.dd100.dd.TDbConnectionManager.GetConnection(TDbConnectionManager.java:75)
at com.interwoven.dd100.dd.TDbAgent.EstablishConnection(TDbAgent.java:514)
at com.interwoven.dd100.dd.TDbAgent.<init>(TDbAgent.java:239)
at com.interwoven.dd100.dd.TDbSchemaAgent.<init>(TDbSchemaAgent.java:61)
at com.interwoven.dd100.dd.TConsumerManager.CheckDbSchemaPresent(TConsumerManager.java:513)
at com.interwoven.dd100.dd.TConsumerManager.SetupConsumer(TConsumerManager.java:586)
at com.interwoven.dd100.dd.TConsumerManager.SetupConsumersForOneDeployment(TConsumerManager.java:191)
at com.interwoven.dd100.dd.TConsumerManager.SetupConsumers(TConsumerManager.java:133)
at com.interwoven.dd100.dd.TAgentClient.Go(TAgentClient.java:97)
at com.interwoven.dd100.dd.IWDataDeploy.Go(IWDataDeploy.java:487)
at com.interwoven.dd100.dd.IWDataDeploy.runDeploy(IWDataDeploy.java:527)
at com.interwoven.dd100.dd.IWDataDeploy.main(IWDataDeploy.java:508)
pbenn
Thought I'd update this ...
Tried updating our classes12.jar file without much success. One thing, I was prefixing the classes12 file to the classpath using the -Xbootclasspath/p: option to iw_dd.ipl. Didn't work with the following error:
Connecting to the database...
Try connecting using jdbc
racle
ci8:
@xx
.xx.xx.xx1526:ce...
Link failure
Attempt to connect using jdbc
racle
ci8:
@xx
.xx.xx.xx:1526:ce failed.
You must fix the problem before proceeding, because Oracle specific data types are being used.
ERROR:Unable to connect to xx.xx.xx.xx:1526:ce
ERROR:TDbAgent constructor failed.
Error occured in TDbSchemaAgent
Downloaded the latest jdbc drivers from a variety of sources (including otn) ... all had the same error.
My plan now is to manually insert updated CLOB fields using DBI, which is a royal pain.