⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rollforwardbackup.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 2 页
字号:
24         25         26         27         ij> insert into t1 values(30);1 row inserted/updated/deletedij> insert into t1 values(31);1 row inserted/updated/deletedij> insert into t1 values(32);1 row inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> --do a plain boot and verify the log device.connect 'jdbc:derby:wombat';ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('wombatlogmoved',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),14);1             --------------wombatlogmovedij> select * from t1 ;A          -----------1          2          3          4          5          6          7          8          9          10         11         12         13         14         15         19         20         21         22         23         24         25         26         27         30         31         32         ij> insert into t1 values(33);1 row inserted/updated/deletedij> insert into t1 values(34);1 row inserted/updated/deletedij> insert into t1 values(35);1 row inserted/updated/deletedij> --take a fresh backup again with moved log device.call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(    'extinout/mybackup', 1);0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> --restore and check the results;connect 'jdbc:derby:wombat;restoreFrom=extinout/mybackup/wombat';ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('wombatlogmoved',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),14);1             --------------wombatlogmovedij> select * from t1;A          -----------1          2          3          4          5          6          7          8          9          10         11         12         13         14         15         19         20         21         22         23         24         25         26         27         30         31         32         33         34         35         ij> insert into t1 values(36);1 row inserted/updated/deletedij> insert into t1 values(37);1 row inserted/updated/deletedij> insert into t1 values(38);1 row inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> --simulate OS type copy and then boot(Commented because it does not work in nightlies)--connect 'jdbc:derby:dummycondb';--call RENAME_FILE('rollForwardBackup', 'wombat', 'wombat.old');--call RENAME_FILE(null, 'extinout/mybackup/wombat', 'rollForwardBackup/wombat');---disconnect;---connect 'jdbc:derby:wombat';--Following SHOULD SHOW NULL value.--values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice');--select * from t1;--call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(--     'extinout/mybackup', 1);--connect 'jdbc:derby:wombat;shutdown=true';--disconnect;---createFrom without logDevice specified on URL should have null value.connect 'jdbc:derby:tempwombat;createFrom=extinout/mybackup/wombat';ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice');1                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------NULL                                                                                                                            ij> select * from t1;A          -----------1          2          3          4          5          6          7          8          9          10         11         12         13         14         15         19         20         21         22         23         24         25         26         27         30         31         32         33         34         35         ij> insert into t1 values(39);1 row inserted/updated/deletedij> insert into t1 values(40);1 row inserted/updated/deletedij> insert into t1 values(41);1 row inserted/updated/deletedij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(    'extinout/mybackup', 1);0 rows inserted/updated/deletedij> connect 'jdbc:derby:tempwombat;shutdown=true';ERROR 08006: Database 'tempwombat' shutdown.ij> disconnect;ij> connect 'jdbc:derby:wombat;restoreFrom=extinout/mybackup/tempwombat';ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice');1                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------NULL                                                                                                                            ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(    'extinout/mybackup', 1);0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> ---Using plain backup mechanism rstore/recreate db using  restoreFrom/createFromconnect 'jdbc:derby:wombat';ij> call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);0 rows inserted/updated/deletedij> select * from t1;A          -----------1          2          3          4          5          6          7          8          9          10         11         12         13         14         15         19         20         21         22         23         24         25         26         27         30         31         32         33         34         35         39         40         41         ij> insert into t1 values(42);1 row inserted/updated/deletedij> insert into t1 values(43);1 row inserted/updated/deletedij> insert into t1 values(44);1 row inserted/updated/deletedij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE('extinout/mybackup');0 rows inserted/updated/deletedij> --following inserted values should not be there--when we do restore from the above backup.insert into t1 values(45);1 row inserted/updated/deletedij> insert into t1 values(46);1 row inserted/updated/deletedij> insert into t1 values(47);1 row inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> connect 'jdbc:derby:wombat;restoreFrom=extinout/mybackup/wombat';ij> select * from t1;A          -----------1          2          3          4          5          6          7          8          9          10         11         12         13         14         15         19         20         21         22         23         24         25         26         27         30         31         32         33         34         35         39         40         41         42         43         44         ij> insert into t1 values(45);1 row inserted/updated/deletedij> insert into t1 values(46);1 row inserted/updated/deletedij> insert into t1 values(47);1 row inserted/updated/deletedij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE('extinout/mybackup');0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> connect 'jdbc:derby:wombatnew;createFrom=extinout/mybackup/wombat';ij> select * from t1;A          -----------1          2          3          4          5          6          7          8          9          10         11         12         13         14         15         19         20         21         22         23         24         25         26         27         30         31         32         33         34         35         39         40         41         42         43         44         45         46         47         ij> insert into t1 values(48);1 row inserted/updated/deletedij> insert into t1 values(49);1 row inserted/updated/deletedij> insert into t1 values(50);1 row inserted/updated/deletedij> connect 'jdbc:derby:wombatnew;shutdown=true';ERROR 08006: Database 'wombatnew' shutdown.ij> disconnect;ij> --enable the log archive mode again.connect 'jdbc:derby:wombat';ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(    'extinout/mybackup', 1);0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> --NEGATIVE TEST with  RESTORE FLAGS-- with createFrom option should give erro on existing databaseconnect 'jdbc:derby:wombat;createFrom=extinout/mybackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XBM0J: Directory DBLOCATION/wombat already exists.ij> -- specify conflictint attributes; it should fail.connect 'jdbc:derby:wombat;create=true;createFrom=extinout/mybackup/wombat';ERROR XJ049: Conflicting create attributes specified.ij> connect 'jdbc:derby:wombat;create=true;rollForwardRecoveryFrom=extinout/mybackup/wombat';ERROR XJ049: Conflicting create attributes specified.ij> connect 'jdbc:derby:wombat;create=true;restoreFrom=extinout/mybackup/wombat';ERROR XJ049: Conflicting create attributes specified.ij> connect 'jdbc:derby:wombat;restoreFrom=extinout/mybackup/wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';ERROR XJ081: Conflicting create/restore/recovery attributes specified.ij> connect 'jdbc:derby:wombat;createFrom=extinout/mybackup/wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';ERROR XJ081: Conflicting create/restore/recovery attributes specified.ij> -- With wrong back up path name it shoud fail.connect 'jdbc:derby:wombat;rollForwardRecoveryFrom=nobackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XBM0Y: Backup database directory nobackup<ps>wombat not found. Please make sure that the specified backup path is right.ij> connect 'jdbc:derby:wombat;restoreFrom=nobackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XBM0Y: Backup database directory nobackup<ps>wombat not found. Please make sure that the specified backup path is right.ij> connect 'jdbc:derby:wombat2;createFrom=nobackup/wombat';ERROR XJ040: Failed to start database 'wombat2', see the next exception for details.ERROR XBM0Y: Backup database directory nobackup<ps>wombat not found. Please make sure that the specified backup path is right.ij> --Simulate missing files by renaming some files in backup(like a corrupted backup and check --whether we get proper error messages--Get a connection because it is required to make any calls in ij connect 'jdbc:derby:wombat2;restoreFrom=extinout/mybackup/wombat';ij> call RENAME_FILE('extinout/mybackup/wombat/','service.properties','service.properties.old');0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;restoreFrom=extinout/mybackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XBM0Q: File extinout<ps>mybackup<ps>wombat<ps>service.properties not found. Please make sure that backup copy is the correct one and it is not corrupted.ij> call RENAME_FILE('extinout/mybackup/wombat/','service.properties.old','service.properties');0 rows inserted/updated/deletedij> call RENAME_FILE('extinout/mybackup/wombat/','log','log.old');0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;restoreFrom=extinout/mybackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XSLAS: Log directory extinout<ps>mybackup<ps>wombat<ps>log not found in backup during restore. Please make sure that backup copy is the correct one and it is not corrupted.ij> call RENAME_FILE('extinout/mybackup/wombat/','log.old','log');0 rows inserted/updated/deletedij> call RENAME_FILE('extinout/mybackup/wombat/','seg0','data.old');0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;restoreFrom=extinout/mybackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XSDG6: Data segment directory not found in extinout<ps>mybackup<ps>wombat backup during restore. Please make sure that backup copy is the right one and it is not corrupted.ij> call RENAME_FILE('extinout/mybackup/wombat/','data.old','seg0');0 rows inserted/updated/deletedij> --try error cases with createFrom;if root created is not getting cleaned up,--next createFrom call will fail with DBLOCATION/wombat exist error.call RENAME_FILE('extinout/mybackup/wombat/','service.properties','service.properties.old');0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;createFrom=extinout/mybackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XBM0Q: File extinout<ps>mybackup<ps>wombat<ps>service.properties not found. Please make sure that backup copy is the correct one and it is not corrupted.ij> call RENAME_FILE('extinout/mybackup/wombat/','service.properties.old','service.properties');0 rows inserted/updated/deletedij> call RENAME_FILE('extinout/mybackup/wombat/','log','log.old');0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;createFrom=extinout/mybackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XSLAS: Log directory extinout<ps>mybackup<ps>wombat<ps>log not found in backup during restore. Please make sure that backup copy is the correct one and it is not corrupted.ij> call RENAME_FILE('extinout/mybackup/wombat/','log.old','log');0 rows inserted/updated/deletedij> call RENAME_FILE('extinout/mybackup/wombat/','seg0','data.old');0 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;createFrom=extinout/mybackup/wombat';ERROR XJ040: Failed to start database 'wombat', see the next exception for details.ERROR XSDG6: Data segment directory not found in extinout<ps>mybackup<ps>wombat backup during restore. Please make sure that backup copy is the right one and it is not corrupted.ij> call RENAME_FILE('extinout/mybackup/wombat/','data.old','seg0');0 rows inserted/updated/deletedij> drop procedure RENAME_FILE;0 rows inserted/updated/deletedij> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -