db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Björn" <object...@robertb.eu>
Subject System tables and foreign key constraints issues with Oracle
Date Thu, 13 Sep 2007 16:50:14 GMT
Hi,

I'm having two problems with DdlUtils in conjunction with Oracle. I've
saved an XML representation of an existing database using
readModelFromDatabase(), added some foreign key constraints to the
XML, and am trying to modify the target database using the
alterDatabase() method.

a) The first problem is that while specifying the table types in the
readModelFromDatabase) call works fine -- I supply only the "TABLES"
type to avoid getting the system tables also -- this does not work for
alterDatabase(). As stated in the documentation, that argument affects
only what is being read and not what is being modified in the target
database. The result is that DdlUtils wants to remove all of the
system tables. I thus get "Error while executing SQL DROP TABLE
AUDIT_ACTIONS CASCADE CONSTRAINTS".

b) The second problem is that the foreign key constraints that I added
seem to result in DdlUtils wanting to add indices, for some reason
resulting in "Cannot write unnamed index".

Log snippet below. I am running DdlUtils 1.0 and Oracle 10g Enterprise
10.2.0.3.0.

Have browsed the docs and website extensively to no avail. Any help or
advice would be highly appreciated.

Best Regards,
Robert

---

356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Foreign key Foreign key [foreign table=TBL_WORKSTATION; 1 references]
needs to be created for table TBL_DEVICE
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Index null needs to be created for table TBL_DEVICE
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Foreign key Foreign key [foreign table=TBL_WORKSTATION; 1 references]
needs to be created for table TBL_DEVICE_ASSOCIATION
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Index null needs to be created for table TBL_DEVICE_ASSOCIATION
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Index null needs to be created for table TBL_WORKSTATION
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table AUDIT_ACTIONS needs to be removed
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table DUAL needs to be removed
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table HELP needs to be removed
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table IMPDP_STATS needs to be removed
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table MAP_OBJECT needs to be removed
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table PSTUBTBL needs to be removed
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table STMT_AUDIT_OPTION_MAP needs to be removed
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table SYSTEM_PRIVILEGE_MAP needs to be removed
356312 [main] INFO org.apache.ddlutils.alteration.ModelComparator  -
Table TABLE_PRIVILEGE_MAP needs to be removed
356343 [main] WARN org.apache.ddlutils.platform.SqlBuilder  -
Encountered a foreign key in table TBL_DEVICE that has no name.
DdlUtils will use the auto-generated and shortened name
TBL_DEVICE_FK_W_BL_WORKSTATION instead.
356343 [main] WARN org.apache.ddlutils.platform.SqlBuilder  - Cannot
write unnamed index Unique index [name=null; 1 columns]
356343 [main] WARN org.apache.ddlutils.platform.SqlBuilder  -
Encountered a foreign key in table TBL_DEVICE_ASSOCIATION that has no
name. DdlUtils will use the auto-generated and shortened name
TBL_DEVICE_ASSO_BL_WORKSTATION instead.
356343 [main] WARN org.apache.ddlutils.platform.SqlBuilder  - Cannot
write unnamed index Unique index [name=null; 1 columns]
356343 [main] WARN org.apache.ddlutils.platform.SqlBuilder  - Cannot
write unnamed index Unique index [name=null; 3 columns]

Mime
View raw message