AnsweredAssumed Answered

13.3 - Upgrade Fails at 13.2 - Object Already in Database

Question asked by ken.kpmcorp on Jun 4, 2014
Latest reply on Jun 11, 2014 by ken.kpmcorp
I have Support engaged on this, but wanted to pose the problem to the forum. I'm upgrading from 13.1.0.0248 to 13.3.0.286. The install errors out during the 13.2 upgrade process. 
 
The install is trying to create a table that already exists (PPA_TRANSCONTROL) and errors out. Per Support, I have verified that this is not a permission issue and other than the new column, the current table matches to the database schema.
 
Support had me copy PPA_TRANSCONTROL.xml from the 13.3 install directory and had me run DBPATCH -install -file E:\niku\clarity\database\schema\table\PPA_TRANSCONTROL.xml -apply, which runs an alter statement and adds the new column (COST_TYPE) and rerun the install after rolling back to the original database and files.
 
But the install continues to fail at the same point. If the install app is doing a comparison between the schema and database, and it detects an already existing table, why it doesn't just run an ALTER statement or if the table exists, write any data off to a temp table, drop the table, create it and then populate the data back from the temp table?
 
The odd thing, is that in attempting to create the table, it is trying to create it with only the new column (CREATE TABLE PPA_TRANSCONTROL ( COST_TYPE nvarchar ( 30 ) DEFAULT 'OPERATING' NOT NULL )).
 
I've tried dropping the table prior to the install, but it creates the table with just one column.
 
This is the first time I've attempted an upgrade, so it is possible I may have missed something, but once it begins the database part of the upgrade process, there's no settings that I aware of other than making sure that NIKU has the correct permissions. I also verified that synonyms are not being used.
 
Any thoughts on this?
 
Error snippet below:
 
6/04/14 10:42 AM (ExecTask) java.sql.SQLSyntaxErrorException: [CA Clarity][SQLServer JDBC Driver][SQLServer]There is already an object named 'PPA_TRANSCONTROL' in the database.
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddcg.b(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddcg.a(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddcf.b(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddcf.a(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserver.tds.ddr.w(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserver.tds.ddr.a(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserver.tds.ddr.a(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserver.ddj.m(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddes.e(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddes.a(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddes.v(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddes.r(Unknown Source)
6/04/14 10:42 AM (ExecTask) at com.ca.clarity.jdbc.sqlserverbase.ddes.execute(Unknown Source)
6/04/14 10:42 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
6/04/14 10:42 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
6/04/14 10:42 AM (ExecTask) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
6/04/14 10:42 AM (ExecTask) at java.lang.reflect.Method.invoke(Method.java:606)
6/04/14 10:42 AM (ExecTask) at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68)
6/04/14 10:42 AM (ExecTask) at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$ac35d8d6.execute(<generated>)
6/04/14 10:42 AM (ExecTask) at com.niku.dbtools.Utilities.executeAndCommitSql(Utilities.java:2692)
6/04/14 10:42 AM (ExecTask) at com.niku.dbtools.DriverApp.apply(DriverApp.java:1486)
6/04/14 10:42 AM (ExecTask) at com.niku.dbtools.DriverApp.installSchemaDriver(DriverApp.java:706)
6/04/14 10:42 AM (ExecTask) at com.niku.dbtools.Utilities.run(Utilities.java:1836)
6/04/14 10:42 AM (ExecTask) at com.niku.dbtools.Utilities.main(Utilities.java:954)
6/04/14 10:42 AM (ExecTask) Process - table: PFM_CONTENT_FILTERS.xml
6/04/14 10:42 AM (ExecTask) Process - table: PPA_TRANSCONTROL.xml
6/04/14 10:42 AM (ExecTask) 
6/04/14 10:42 AM (ExecTask) SQL Text:
6/04/14 10:42 AM (ExecTask) 
6/04/14 10:42 AM (ExecTask) CREATE TABLE PPA_TRANSCONTROL ( COST_TYPE nvarchar ( 30 ) DEFAULT 'OPERATING' NOT NULL )
6/04/14 10:42 AM (ExecTask) 
6/04/14 10:42 AM (ExecTask) Note: Foreign Keys and Triggers have been enabled
6/04/14 10:42 AM (ExecTask) 
6/04/14 10:42 AM (ExecTask) DBDriver failed to install!
6/04/14 10:42 AM (ExecTask) Exception in thread "main" java.lang.Exception: DBDriver failed to install
6/04/14 10:42 AM (ExecTask) 
6/04/14 10:42 AM (ExecTask) Total time: 0H:0M:7S
6/04/14 10:42 AM (ExecTask) at com.niku.dbtools.DriverApp.installSchemaDriver(DriverApp.java:904)
6/04/14 10:42 AM (ExecTask) at com.niku.dbtools.Utilities.run(Utilities.java:1836)
6/04/14 10:42 AM (ExecTask) at com.niku.dbtools.Utilities.main(Utilities.java:954)
6/04/14 10:42 AM (ExecTask) Caused by: java.sql.SQLSyntaxErrorException: [CA Clarity][SQLServer JDBC Driver][SQLServer]There is already an object named 'PPA_TRANSCONTROL' in the database.

Outcomes