Problem with migration from server on-premise to cloud - Migration Assistant
Asked by Urudata Servicios:

Hello,

We are having problems to migrate from server on premise to cloud

<br />

++Our Infra++

* DB: Windows Server 2012 R2 - SQL Server 2012
* APP: Windows Server 2016 - Confluence 6.15.9
* Migration Assistant: 3.3.4

When we open the migration assistant we receive:  

### Cause {#toc-hId-1943288025}

org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInitialState' in class com.atlassian.migration.agent.web.AppAction threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: javax.persistence.PersistenceException: Failed to update database schema at /templates/app.vm\[line 21, column 44\]  
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)

caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: javax.persistence.PersistenceException: Failed to update database schema  
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

caused by: javax.persistence.PersistenceException: Failed to update database schema  
at com.atlassian.migration.agent.store.jpa.impl.LiquibaseSchemaUpgrader.upgrade(LiquibaseSchemaUpgrader.java:35)

caused by: liquibase.exception.MigrationFailedException: Migration failed for change set META-INF/db-changelog/5-attachment-migration-version.xml::5-attachment-migration-version-drop-index::MPT: Reason: META-INF/db-changelog/master.xml : Index Exists Precondition: MIG_ATTACH_SITE_PROGRESS_IDX on MIG_ATTACHMENT : The database name component of the object qualifier must be the name of the current database.  
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:559)

caused by: liquibase.exception.PreconditionErrorException: Precondition Error  
at liquibase.precondition.core.IndexExistsPrecondition.check(IndexExistsPrecondition.java:123)

caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: The database name component of the object qualifier must be the name of the current database.  
at liquibase.snapshot.jvm.ForeignKeySnapshotGenerator.addTo(ForeignKeySnapshotGenerator.java:110)

caused by: liquibase.exception.DatabaseException: com.microsoft.sqlserver.jdbc.SQLServerException: The database name component of the object qualifier must be the name of the current database.  
at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:101)

caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The database name component of the object qualifier must be the name of the current database.  
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:260)

We have tried the following without luck: [Restore the Confluence Cloud Migration Assistant to the default version](https://confluence.atlassian.com/confkb/restore-the-cloud-migration-assistant-for-confluence-to-the-default-version-974378747.html)


Answers:
author: Rob Horan
body: It sounds like you'll need to contact Atlassian directly - see this similar community post:

<https://community.atlassian.com/t5/Confluence-questions/Cloud-Migration-Assistant-Error-Table-Already-Exists/qaq-p/1812106>

comments: author: Urudata Servicios
body: Thanks Rob, I was able to solve it with:  

["The component of the database name of the object qualifier must be the name of the current database"](https://confluence.atlassian.com/confkb/the-component-of-the-database-name-of-the-object-qualifier-must-be-the-name-of-the-current-database-error-on-upgrade-to-confluence-6-1+-902076143.html)   

My database was named "Confluence" and in the configuration file was "confluence". After the change the app of migration assistant works fine.  

Regards.


author: Rob Horan
body: So the problem was case sensitivity? On prem is case insensitive in all areas except the CCMA?

I wonder if this is Confluence-specific, or if Jira and Bitbucket share this trait.


author: Urudata Servicios
body: Rob,

Sorry for the delay in the response.

Yes, exactly the problem was that because is case sensitivity.

Regards.


Tags: confluence-server

migration-customer-care

server