Database migration to Oracle fails

Still need help?

The Atlassian Community is here for you.

Ask the community

Cannot restore old backup into Oracle

You may try and restore a backup from an older version of Fisheye/Crucible into Oracle, but this will not work.

The Fisheye instance should be upgraded first to (at least) 2.5.0 and then the database should be exported. Oracle supports starts at version 71 so that's why no Oracle db scripts for version 69 can be found.

Creating table definitions...
java.io.IOException: Error talking to database: Problem opening create tables script
	at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:205)
	at com.atlassian.crucible.migration.item.SQLBackup$1.restore(SQLBackup.java:172)
	at com.cenqua.fisheye.ctl.Restore.run(Restore.java:159)
	at com.cenqua.fisheye.ctl.Restore.main(Restore.java:228)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:113)
	at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:41)
Caused by: com.cenqua.crucible.hibernate.CruDBException: Problem opening create tables script
	at com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:279)
	at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:127)
	at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:191)
	... 9 more
Caused by: java.io.FileNotFoundException: /usr/local/fecru/fecru-2.5.0/sql/ORACLE/schema/tables_69.sql (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at java.io.FileReader.<init>(FileReader.java:55)
	at com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:274)
	... 11 more

ORA-01653: unable to extend table

Whilst restoring a Fisheye backup to Oracle, the following error (or similar) may be presented for large datasets:

    [java] Database error at cru_fr_detail:1879999 (table:row) of the
input: ORA-01653: unable to extend table CRUCIBLE.CRU_FR_DETAIL by
1024 in tablespace SYSTEM
    [java]
    [java] java.io.IOException: Error writing to the database:
ORA-01653: unable to extend table CRUCIBLE.CRU_FR_DETAIL by 1024 in
tablespace SYSTEM

Oracle installations should always be configured with the AUTOEXTEND property enabled. This instructs Oracle to increase the size of the tablespace as required. To check the value of the AUTOEXTEND property, run the following command from the sqlplus prompt:

SQL> select file_name, autoextensible from dba_data_files where tablespace_name='SYSTEM';

FILE_NAME
--------------------------------------------------------------------------------
AUTOEXTEN
---------
/usr/lib/oracle/xe/oradata/XE/system.dbf
NO

If the property is set to NO then it should be enabled (modify the filepath to be the same as the output of the previous command)

SQL> alter database datafile '/usr/lib/oracle/xe/oradata/XE/system.dbf' AUTOEXTEND ON

If the property is set to YES then it is likely that the entire tablespace size has been exhausted.

SQL> select file_name, bytes, autoextensible, maxbytes from dba_data_files where tablespace_name='SYSTEM';

FILE_NAME
--------------------------------------------------------------------------------
     BYTES AUTOEXTEN   MAXBYTES
---------- --------- ----------
/usr/lib/oracle/xe/oradata/XE/system.dbf
 629145600 YES	     629145600

You will see that BYTES == MAXBYTES so we will need to increase the limit for the table space. Use your judgement for the max size. For example the above limit is ~600MB, the following command will increase the size to 1GB

alter database datafile '/usr/lib/oracle/xe/oradata/XE/system.dbf'  autoextend on maxsize 1073741824;
Last modified on Jul 31, 2018

Was this helpful?

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