Restoration failed: Error executing update for SQL statement 'DROP TABLE
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Following error thrown during restoration, restoration failed, hit to 505 error
The following appears in the atlassian-jira.log
1
2
3
4
5
6
7
8
9
10
/secure/SetupDatabase.jspa [c.a.jira.startup.DatabaseInitialImporter] Error importing data: com.atlassian.activeobjects.spi.ActiveObjectsImportExportException: There was an error during import/export with plugin JIRA DVCS Connector Plugin(com.atlassian.jira.plugins.jira-bitbucket-connector-plugin) #3.3.30 (table AO_E8B6CC_REPOSITORY_MAPPING):Error executing update for SQL statement 'DROP TABLE "AO_E8B6CC_REPOSITORY_MAPPING" PURGE'
at com.atlassian.activeobjects.backup.ImportExportErrorServiceImpl.newImportExportSqlException(ImportExportErrorServiceImpl.java:26)
at com.atlassian.activeobjects.backup.SqlUtils.onSqlException(SqlUtils.java:46)
at com.atlassian.activeobjects.backup.SqlUtils.executeUpdate(SqlUtils.java:37)
at com.atlassian.activeobjects.backup.ActiveObjectsDatabaseCleaner.doCleanup(ActiveObjectsDatabaseCleaner.java:67)
at com.atlassian.activeobjects.backup.ActiveObjectsDatabaseCleaner.cleanup(ActiveObjectsDatabaseCleaner.java:45)
at com.atlassian.activeobjects.backup.ActiveObjectsBackup.clear(ActiveObjectsBackup.java:160)
at com.atlassian.jira.bc.dataimport.DefaultDataImportService.removeActiveObjects(DefaultDataImportService.java:1162)
...
Caused by: java.sql.SQLException: ORA-02449: unique/primary keys in table referenced by foreign keys
Diagnosis
Environment
Using Oracle DB
Cause
This error is referring to a missing permission in the database, it seems the user used to connect with the database is missing the DROP permission. However, by default this permission is not needed, and the problem originates from the JIRA DVCS Connector Plugin itself.
Workaround
Provide the 'drop' permission to the database user. Seek assistance from ORACLE dba on this.
Was this helpful?