Must-share information (formatted with Markdown):
- which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) => SonarQube Community v25.11.0.114957 + Delphi plugin (v1.18.3)
- how is SonarQube deployed: zip, Docker, Helm => Docker
- what are you trying to achieve => We are trying to migrate the data from our MS SQL database to a new PostgreSQL database
- what have you tried so far to achieve this => We deployed a new PostgreSQL database in Docker (same stack as our SonarQube instance), then used a temporary SonarQube instance (same version as our productive one) to get the schema into the new DB. Then we ran the SonarQube DB Copy Tool (v1.6.0.2092) to copy the existing data to the new DB, which seemed to work fine at first, but eventually ran into an error (see log).
The full log is attached; the error message can be found at the end:
23:18:35 INFO issue_changes 0 / 40558
23:18:42 INFO issue_changes 40558 / 40558 (5921.43 rps)
23:18:43 INFO issues 0 / 22883
23:18:48 INFO issues 22883 / 22883 (4203.21 rps)
23:18:49 INFO issues_fixed 0 / 0
23:18:49 INFO issues_fixed 0 / 0 (NaN rps)
23:18:49 INFO issues_impacts 0 / 22910
23:18:52 INFO issues_impacts 22910 / 22910 (8079.71 rps)
23:18:53 INFO jira_org_bindings 0 / 0
23:18:53 INFO jira_org_bindings 0 / 0 (NaN rps)
Exception in thread "main" com.sonar.dbcopy.utils.toolconfig.SqlDbCopyException: Problem to execute the adjustment of autoincrement with last id +1 :ALTER SEQUENCE null RESTART WITH 1; at TABLE : jira_org_bindings.
at com.sonar.dbcopy.reproduce.process.SequenceReseter.execute(SequenceReseter.java:66)
at com.sonar.dbcopy.reproduce.process.LoopByTable.execute(LoopByTable.java:89)
at com.sonar.dbcopy.StartApp.main(StartApp.java:116)
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "null"
Position: 16
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290)
at com.sonar.dbcopy.reproduce.process.SequenceReseter.execute(SequenceReseter.java:63)
... 2 more
DB Migration.txt (108.9 KB)