So does Documentum support unknown columns in DB table or not?
![ilya basin](https://secure.gravatar.com/avatar/6cd0e86bf74524b5e7793dc404c554ff/?default=https%3A%2F%2Fvanillicon.com%2F6402247eb4ea2bc035761eb84d1191cd_200.png&rating=g&size=200)
ilya basin
Member
Documentum does not use the list of columns when it formats the INSERT SQL for a created object. Instead, it uses the alternate syntax with the values listed in the order in which the table columns are defined. For instance, if the table is defined like this:
CREATE TABLE mytype_s ( r_object_id, i_partition, myattr)
INSERT INTO mytype_s VALUES ('0b02254c814a181f', 0,'****')
After some experiments we found that if the DB table has columns that are not attributes (e.g. result of manual DDL manipulation), then Documentum adds the default value for this column (usually NULL).
CREATE TABLE mytype_s ( r_object_id, i_partition, old_column, myattr)<br>
_
INSERT INTO mytype_s VALUES ('0b02254c814a181f', 0, NULL, '****')
_
It's not clear at what moment Documentum reads the table schema from DB. Unlikely at server start only because it usually works fine after ALTER TABLE + ALTER TYPE.
But now we faced an issue that some object creations fail with Postgres error "INSERT has more expressions than target columns". After the last attribute change we restarted the server many times and the worst is that the error is not reproducible: the next object creation succeeds.
![](https://us.v-cdn.net/6030023/uploads/editor/rs/70rwolfqfgxd.png)
In our DB table we have one unknown column, but the INSERT SQL has two NULLs, one of them is positioned at wrong place!
0
Comments
-
As far as I know, Documentum Server simply passes the INSERT statement to the underlying database and passes the result back.To avoid such issues, simply specify the columns you want to set, e.g. INSERT INTO my_type_s (col1, col2, col3) VALUES ('val1', 'val2', 'val3')0
-
bacham3, TejrajThe problem is with INSERT statements that are generated by Documentum when we run a CREATE OBJECT DQL or API call
0 -
-
I can't dump the object because it's not created. However, now I see that the error only happens on the second Content Server Node:Success:$idql efxpbase -Uefxpm -Pignored
OpenText Documentum idql - Interactive document query interface
Copyright (c) 2017. OpenText Corporation
All rights reserved.
Client Library Release 7.3.0190.0080
Connecting to Server using docbase efxpbase
[DM_SESSION_I_SESSION_START]info: "Session 0102254c80675542 started for user efxpm."
Connected to OpenText Documentum Server running Release 7.3.0210.0150 Linux64.Postgres
1> create efx_component_digital object link '/Temp', set object_name = 'testpostgres', set dcmi_title = 'testpostgres', set dcmi_identifier_isbn = 'Not assigned'
2> go
object_created
----------------
0b02254c814ed594
(1 row affected)
1> delete efx_component objects where object_name = 'testpostgres'
go
2> objects_deleted
---------------
1
(1 row affected)Failure:$idql efxpbase.efxpbase2 -Uefxpm -Pignored
OpenText Documentum idql - Interactive document query interface
Copyright (c) 2017. OpenText Corporation
All rights reserved.
Client Library Release 7.3.0190.0080
Connecting to Server using docbase efxpbase.efxpbase2
[DM_SESSION_I_SESSION_START]info: "Session 0102254c80675178 started for user efxpm."
Connected to OpenText Documentum Server running Release 7.3.0210.0150 Linux64.Postgres
1> create efx_component_digital object link '/Temp', set object_name = 'testpostgres', set dcmi_title = 'testpostgres', set dcmi_identifier_isbn = 'Not assigned'
2> go
[DM_OBJ_MGR_E_SAVE_FAIL]error: "save failed for object with handle 0b02254c814ed440 of type efx_component_digital: table on which save failed was efx_component_s; error from database system was STATE=42601, CODE=7, MSG=ERROR: INSERT has more expressions than target columns;
Error while executing the query
"
1> create efx_component_digital object link '/Temp', set object_name = 'testpostgres', set dcmi_title = 'testpostgres', set dcmi_identifier_isbn = 'Not assigned'
go
2> [DM_OBJ_MGR_E_SAVE_FAIL]error: "save failed for object with handle 0b02254c814ed441 of type efx_component_digital: table on which save failed was efx_component_s; error from database system was STATE=42601, CODE=7, MSG=ERROR: INSERT has more expressions than target columns;
Error while executing the query
"
0 -
0
-
Thanks @Tejraj . That helped.
1
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 156 General Questions
- 152 Thrust Services
- 56 Developer Hackathon
- 38 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 919 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 34 eDOCS
- 193 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories