Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket 5.12.0 migration to oracle database

SW
Contributor
August 8, 2018

Hi Everyone,

 

I am trying to migrate our Sandbox Bitbucket instance to Oracle PDB from Bitbucket internal database. 

But when I test the migration from migration wizard, I get following error,

The specified target database could not be validated due to an unexpected error. As a result, Bitbucket cannot migrate to the specified database.
com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:224)
com.atlassian.stash.internal.migration.DefaultMigrationService.validateConfiguration(DefaultMigrationService.java:85)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Failed to obtain snapshot. Database type: oracle; nested exception is liquibase.exception.DatabaseException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

com.atlassian.stash.internal.backup.liquibase.DefaultLiquibaseSession.getSnapshot(DefaultLiquibaseSession.java:77)
com.atlassian.stash.internal.backup.liquibase.LiquibaseMigrationTarget.hasNoClashingTables(LiquibaseMigrationTarget.java:54)
com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:63)
...
java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

liquibase.snapshot.jvm.CatalogSnapshotGenerator.snapshotObject(CatalogSnapshotGenerator.java:46)
liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:66)
liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
...
ORA-00942: table or view does not exist

oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
...
ORA-00942: table or view does not exist

oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
...

 

The connecting user 'bitbucket' has been created in following way and have following permissions

(I am aware that tablespace should be USERS  and not SYSTEM but it is kept intentionally to replicate same permissions from Production database[This is sandbox database] and later we change it to USERS tablespace? [is it really required, please comment] ),

CREATE USER bitbucket
  IDENTIFIED BY somePassword
  DEFAULT TABLESPACE SYSTEM
  QUOTA UNLIMITED ON SYSTEM;
GRANT CONNECT, RESOURCE, CREATE TABLE to bitbucket;
CREATE VIEW bitbucket.all_objects AS
  SELECT *
  FROM sys.all_objects
  WHERE owner = upper('bitbucket');

 

Please let me know what I am missing here. 

2 answers

1 accepted

0 votes
Answer accepted
SW
Contributor
August 17, 2018

It worked with providing dba privileges to bitbucket though I think this is not ideal solution. 

0 votes
Baskar Annamalai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2018

Hi @SW

The following trace is related to the permission of the bitbucket in the SYSTEM tablespace:

SQLSyntaxErrorException: ORA-00942: table or view does not exist

The following are the resolution you can attempt:

Regards.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events