Tech Tip: NFA Migration fails on Create Function

Document created by Charles_Nack Employee on Jul 25, 2014Last modified by Charles_Nack Employee on Jul 25, 2014
Version 2Show Document
  • View in full screen mode

ISSUE

Upgrading to NFA 9.2 fails on SQL Create Function

 

Frame #24: [SqlAction database=mysql port=3307 sql='CREATE FUNCTION v6_type RETURNS INTEGER SONAME 'nqUDF32.dll'']

INFO DriverManagerDataSource::setDriverClassName() - Loaded JDBC driver: com.mysql.jdbc.Driver INFO Projector::play() - Frame #24: [SqlAction database=mysql port=3307 sql='CREATE FUNCTION v6_type RETURNS STRING SONAME 'nqUDF32.dll''] FATAL TheSet::play() - Error playing back movie

 

  1. com.ca.im.migrator.exceptions.MigratorException: Movie playback failed.

 

                at com.ca.im.migrator.business.Projector.play(Unknown Source)

 

                at com.ca.im.migrator.TheSet.play(Unknown Source)

 

                at com.ca.im.migrator.TheSet.migrate(Unknown Source)

 

                at com.ca.im.migrator.MigratorApp.main(Unknown Source) Caused by: com.ca.im.migrator.exceptions.SqlActionExecutionException: SQL action failed

 

                at com.ca.im.migrator.business.action.SqlAction.execute(Unknown Source)

 

                ... 4 more

 

Caused by: java.sql.SQLException: Function 'v6_type' already exists

 

                at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)

 

                at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)

 

                at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)

 

                at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)

 

                at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)

 

                at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)

 

                at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2113)

 

                at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1364)

 

                at com.ca.im.migrator.data.BaseDao.executeNonQuery(Unknown Source)

 

                ... 5 more

 

INFO Library::putMovie() - Writing movie file E:\CA\NFA\collector_movie.xml INFO MigratorApp::main() - Exiting with code 1

 

 

 

RESOLUTION

 

Confirm the Database and port in the migration log (See highlighted above).

 

Drop the functions by running MySQL from a command prompt.

 

mysql -P 3307

 

use mysql;

 

DROP FUNCTION v6_type;

 

DROP FUNCTION v6_ntoa;

 

DROP FUNCTION v6_aton;

 

DROP FUNCTION associate;

 

DROP FUNCTION v6_subneta;

 

DROP FUNCTION v6_subnetn;

 

DROP FUNCTION v6_maskbits;

 

DROP FUNCTION format_bps;

 

DROP FUNCTION percentile;

 

DROP FUNCTION slope;

 

DROP FUNCTION yIntercept;

 

DROP FUNCTION smallest;

 

DROP FUNCTION largest;

 

Once all functions are dropped you will need to restart the migrator

 

Rerun the migrator by running from the command prompt (exit from Mysql)
\$NETQOSINSTALL\migrator\RunMigrator.vbs

 

Attachments

    Outcomes