[
https://issues.apache.org/jira/browse/DERBY-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kim Haase closed DERBY-1667.
----------------------------
Resolution: Won't Fix
Users don't seem to encounter this situation often, so documenting it seems
unnecessary.
> Future Backups fails with "ERROR XSRS4: Error renaming file" after a
> consistency check is performed on the Backedup database and is not shutdown
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1667
> URL: https://issues.apache.org/jira/browse/DERBY-1667
> Project: Derby
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 10.1.3.1, 10.2.1.6
> Reporter: Rajesh Kartha
> Priority: Minor
> Labels: derby_triage10_5_2
> Attachments: ASF.LICENSE.NOT.GRANTED--onlinebackup_embed.sql
>
>
> After performing a consistency check on the backedup database, all future
> attempts to backup the original database fails. this happens with both
> SYSCS_UTIL.SYSCS_ONLINE_BACKUP_DATABASE (online and offline) and
> SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE (online and
> offline).
> Following is the reproduction of this scenario using online backup:
> Derby version: latest synced up trunk - 10.2.0.5 alpha - (430519). The
> offline backup version in 10.1.3 also fails with the same error.
> ij version 10.2
> ij> connect 'jdbc:derby:testdb;create=true';
> ij> --
> -- Attempt for an online backup - SUCCESS
> --
> CALL
> SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT('backupdir',1);
> 0 rows inserted/updated/deleted
> ij> create table t(id int, col1 char(2));
> 0 rows inserted/updated/deleted
> ij> insert into t values(1,'ca');
> 1 row inserted/updated/deleted
> ij> insert into t values(2,'wa');
> 1 row inserted/updated/deleted
> ij> --
> -- Attempt for an online backup - SUCCESS
> --
> CALL
> SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT('backupdir',1);
> 0 rows inserted/updated/deleted
> ij> connect 'jdbc:derby:backupdir/testdb';
> ij(CONNECTION1)> --
> -- Check consistency on the backedup dir
> --
> SELECT schemaname, tablename, SYSCS_UTIL.SYSCS_CHECK_TABLE(schemaname,
> tablename) FROM sys.sysschemas s, sys.systables t WHERE s.schemaid =
> t.schemaid;
> SCHEMANAME
> |TABLENAME
>
> |3
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> SYS
> |SYSALIASES
>
> |1
> SYS
> |SYSCHECKS
>
> |1
> SYS
> |SYSCOLPERMS
>
> |1
> SYS
> |SYSCOLUMNS
>
> |1
> SYS
> |SYSCONGLOMERATES
>
> |1
> SYS
> |SYSCONSTRAINTS
>
> |1
> SYS
> |SYSDEPENDS
>
> |1
> SYSIBM
> |SYSDUMMY1
>
> |1
> SYS
> |SYSFILES
>
> |1
> SYS
> |SYSFOREIGNKEYS
>
> |1
> SYS
> |SYSKEYS
>
> |1
> SYS
> |SYSREQUIREDPERM
>
> |1
> SYS
> |SYSROUTINEPERMS
>
> |1
> SYS
> |SYSSCHEMAS
>
> |1
> SYS
> |SYSSTATEMENTS
>
> |1
> SYS
> |SYSSTATISTICS
>
> |1
> SYS
> |SYSTABLEPERMS
>
> |1
> SYS
> |SYSTABLES
>
> |1
> SYS
> |SYSTRIGGERS
>
> |1
> SYS
> |SYSVIEWS
>
> |1
> APP
> |T
>
> |1
> 21 rows selected
> ij(CONNECTION1)> disconnect;
> ij> show connections;
> CONNECTION0 - jdbc:derby:testdb
> No current connection
> ij> --
> -- Reconnect to the same original db
> --
> set connection CONNECTION0;
> ij> show connections;
> CONNECTION0* - jdbc:derby:testdb
> * = current connection
> ij> --
> -- Third attempt for an online backup - FAILS
> --
> CALL
> SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT('backupdir',1);
> ERROR XSRS4: Error renaming file (during backup) from backupdir\testdb to
> backupdir\testdb.OLD.
> ij> disconnect;
> ij> --
> -- No connections present
> --
> show connections;
> No connections available.
> ij> connect 'jdbc:derby:testdb;create=true';
> WARNING 01J01: Database 'testdb' not created, connection made to existing
> database instead.
> ij> --
> -- Another attempt for an online backup with a fresh connection - FAILS TOO
> --
> CALL
> SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT('backupdir',1);
> ERROR XSRS4: Error renaming file (during backup) from backupdir\testdb to
> backupdir\testdb.OLD.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
