db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Thalamati (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1667) Future Backups fails with "ERROR XSRS4: Error renaming file" after a consistency check is performed on the Backedup database
Date Thu, 10 Aug 2006 21:10:14 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1667?page=comments#action_12427347 ] 
            
Suresh Thalamati commented on DERBY-1667:
-----------------------------------------

I think this is not a bug.   In the above test case  connection is made directly to backup
copy and it  is not 
shutdown  before attempting another backup in the main database to the same location.  Backup
renames the old copy , before replacing it with new copy.   I think it is failing on  rename
because 
files in the old backup are opened when it is booted. 



> Future Backups fails with "ERROR XSRS4: Error renaming file" after a consistency check
is performed on the Backedup database
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1667
>                 URL: http://issues.apache.org/jira/browse/DERBY-1667
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.0.0, 10.1.3.0, 10.1.3.1
>            Reporter: Rajesh Kartha
>             Fix For: 10.2.0.0
>
>         Attachments: 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message