configimport.sh Fail to import a cem db config from postgre to Oracle

Document ID : KB000107134
Last Modified Date : 19/07/2018
Show Technical Document Details
Issue:
Next error message is received after run ./configimport.sh

7/18/18 08:10:54.768 PM COT [ERROR] [main] [root] [ConfigImport] - oracle.jdbc.driver.OraclePreparedStatementWrapper@2b546384 
java.sql.BatchUpdateException: ORA-12899: value too large for column "CEMDB"."TS_PARAMS"."TS_PATTERN" (actual: 1019, maximum: 1016) 

at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10070) 
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:213) 
at com.wily.apm.dbtools.importexport.ConfigImport$SaxHandler.startElement(ConfigImport.java:1365) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) 
at javax.xml.parsers.SAXParser.parse(Unknown Source) 
at com.wily.apm.dbtools.importexport.ConfigImport.importConfig(ConfigImport.java:958) 
at com.wily.apm.dbtools.importexport.ConfigImport.main(ConfigImport.java:415) 
7/18/18 08:10:54.774 PM COT [ERROR] [main] [root] [ConfigImport] - Error parsing export file at line: 47466. Cause: SQL insert error: ORA-12899: value too large for column "CEMDB"."TS_PARAMS"."TS_PATTERN" (actual: 1019, maximum: 1016) 
 
Environment:
APM versions: from 10.3.0.19 to 10.3.0.19 
DB versions: from postgreSQL 9.2 to Oracle 12.1 
MOM: migrate from MOM in Windows 2008 R2 to MOM in Linux RedHat 7.x
Cause:
The problem occurs because the origin column size is larger than the target column size.
 
Resolution:
The configimport.sh require an empty schema, so the only option here is to modify the SQL script createtables-oracle-10.3.0.0.sql modifying the size of the field from 1016 to 2048.
This will increase the size of the column to acommodate the content to import.
Additional Information:
Link to product documentation

https://docops.ca.com/ca-apm/10-3/en/administrating/configure-enterprise-manager/manage-the-apm-database/#ManagetheAPMDatabase-ImporttheAPMDatabaseConfiguration