Problem after migrating from mysql to oracle

Hi

we are getting the error message " ORA-00932: inconsistent datatypes: expected - got CLOB" while upgrading database manually via http://xxxx:9000/setup link. what we have done so far;

we moved all objects from mysql database to oracle database before that we stopped sonarqube service.
After that, edited sonar.properties file and changed jdbc.url,username and password parameters also we set the parameters jdbc.driver.class and jdbc.driver.path.After successfully connected to database which contains all migrated objects from mysql , have tried to upgrade the database by writing the link http://xxxx:9000/setup and below we got the error message from web.log .

2022.06.02 13:27:09 INFO  web[][o.s.s.p.Platform] Database needs to be migrated. Please refer to https://docs.sonarqube.org/latest/setup/upgrading
2022.06.02 13:27:09 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.ws.WebServiceFilter@6ea0811e [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/properties*, ...]}]
2022.06.02 13:27:09 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2022.06.02 13:27:19 INFO  web[][o.s.s.p.d.m.DatabaseMigrationImpl] Starting DB Migration and container restart
2022.06.02 13:27:19 INFO  web[][DbMigrations] Executing DB migrations...
2022.06.02 13:27:19 INFO  web[][DbMigrations] #2802 'Migrate property 'sonar.pullrequest.provider' value from VSTS to Azure DevOps'...
2022.06.02 13:27:19 ERROR web[][DbMigrations] #2802 'Migrate property 'sonar.pullrequest.provider' value from VSTS to Azure DevOps': failure | time=33ms
2022.06.02 13:27:19 ERROR web[][DbMigrations] Executed DB migrations: failure | time=34ms
2022.06.02 13:27:19 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=111ms
2022.06.02 13:27:19 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration ended with an exception
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #2802 'Migrate property 'sonar.pullrequest.provider' value from VSTS to Azure DevOps' failed
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:79)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:52)
        at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:68)
        at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:105)
        at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:80)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CLOB

        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:553)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:269)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:270)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:91)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:807)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:983)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666)
        at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1426)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3713)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1167)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)
        at org.sonar.server.platform.db.migration.step.SelectImpl.scroll(SelectImpl.java:75)
        at org.sonar.server.platform.db.migration.step.MassUpdate.execute(MassUpdate.java:92)
        at org.sonar.server.platform.db.migration.version.v79.MigrateVstsProviderToAzureDevOps.execute(MigrateVstsProviderToAzureDevOps.java:48)
        at org.sonar.server.platform.db.migration.step.DataChange.execute(DataChange.java:45)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75)
        ... 9 common frames omitted
Caused by: oracle.jdbc.OracleDatabaseException: ORA-00932: inconsistent datatypes: expected - got CLOB

        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:513)
        ... 30 common frames omitted

Hey there.

How did you perform the migration? Did you use SonarSource/mysql-migrator? This is the only supported way to move from MySQL to another database provider (any other method of backup/restore can cause issues).

Hello

thanks for reply.Is it possible by using this tool that migrating local database to oracle database located on the another server.Both local and target databases must be on local to use this tool?

Hey there.

The whole reason you provide configuration files to both -source and -target parameters is to specify connection strings – local or remote. So copying a local database to an oracle database on another server is exactly the goal of this tool.