SQL Server migration fails due to wrong Database user permissions

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Migration to external SQL Server database fails with UI error below:

Creating table definitions...
Problem with create tables script C:\atlassian-fisheye-crucible\sql\SQLSERVER2008\schema\tables_76.sql
Database migration failed: com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script C:\atlassian-fisheye-crucible\sql\SQLSERVER2008\schema\tables_76.sql

The following is logged in fisheye-debug.log 

2012-07-10 10:23:03,240 ERROR [ThreadPool1 ] fisheye.app DBEditHelper-doGet - Database migration failed: com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script C:\atlassian-fisheye-crucible\sql\SQLSERVER2008\schema\tables_76.sql
com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script C:\atlassian-fisheye-crucible\sql\SQLSERVER2008\schema\tables_76.sql
	at com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:292)
	at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:138)
	at com.atlassian.crucible.actions.admin.database.DBEditHelper$ImportRunner.call(DBEditHelper.java:91)
	at com.atlassian.crucible.actions.admin.database.DBEditHelper$ImportRunner.call(DBEditHelper.java:73)
	at java.lang.Thread.run(Thread.java:662)
Caused by: com.cenqua.crucible.hibernate.CruDBException: SQL script error on line 1: "create table cru_base_star_model (cru_star_id int not null, cru_item_type nvarchar(80) not null, cru_string_key1 nvarchar(255) null, cru_string_key2 nvarchar(255) null, cru_string_key3 nvarchar(255) null, cru_string_key4 nvarchar(255) null, cru_string_key5 nvarchar(255) null, cru_int_key1 int null, cru_int_key2 int null, cru_int_key3 int null, cru_int_key4 int null, cru_int_key5 int null, cru_text_key1 nvarchar(max) null, cru_text_key2 nvarchar(max) null, cru_user_name nvarchar(255) null, cru_date_created numeric(19,0) null, cru_label nvarchar(255) null, primary key (cru_star_id));" 
(CREATE TABLE permission denied in database 'fisheyedb'.), please contact http://www.atlassian.com/support/
	at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:483)
	at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:414)
	at com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:286)
	... 10 more
Caused by: java.sql.SQLException: CREATE TABLE permission denied in database 'fisheyedb'.
	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
	... 12 more

Cause

The migration script tries to create a table in the Fisheye database, but the user doesn't have permission to create tables.

Resolution

Make sure that the user that Fisheye uses to connect to the database has all the needed permission. Please refer to our documentation about Migration to SQL Server for more information.

 

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.