blob: 7fc62f57259f324d92862b781c08815d934696d7 [file] [log] [blame]
ij> --
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
CREATE PROCEDURE RENAME_FILE(LOCATION VARCHAR(32000), NAME VARCHAR(32000), NEW_NAME VARCHAR(32000)) DYNAMIC RESULT SETS 0 LANGUAGE JAVA EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.FTFileUtil.renameFile' PARAMETER STYLE JAVA;
0 rows inserted/updated/deleted
ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.storage.logArchiveMode');
1
--------------------------------------------------------------------------------------------------------------------------------
NULL
ij> --check whether log archive mode enabling method is working
call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 0);
0 rows inserted/updated/deleted
ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.storage.logArchiveMode');
1
--------------------------------------------------------------------------------------------------------------------------------
true
ij> --check whether the logArchive Mode is persistent across boots
disconnect;
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> connect 'wombat';
ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.storage.logArchiveMode');
1
--------------------------------------------------------------------------------------------------------------------------------
true
ij> --check whether log archive mode disabling method is working
call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);
0 rows inserted/updated/deleted
ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.storage.logArchiveMode');
1
--------------------------------------------------------------------------------------------------------------------------------
false
ij> --check whether the logArchive Mode disabling persistent across boots
disconnect;
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> connect 'wombat';
ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.storage.logArchiveMode');
1
--------------------------------------------------------------------------------------------------------------------------------
false
ij> -- reenable the log archive mode again to see whether the
-- disabling has any side effects.
call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 0);
0 rows inserted/updated/deleted
ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.storage.logArchiveMode');
1
--------------------------------------------------------------------------------------------------------------------------------
true
ij> disconnect;
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> connect 'wombat';
ij> values SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.storage.logArchiveMode');
1
--------------------------------------------------------------------------------------------------------------------------------
true
ij> --END OF PROPERTY ARCHIVE CHECKS
---PERFORM DIFFERENT TYPES OF RESTORE
create table t1(a int ) ;
0 rows inserted/updated/deleted
ij> insert into t1 values(1) ;
1 row inserted/updated/deleted
ij> insert into t1 values(2) ;
1 row inserted/updated/deleted
ij> insert into t1 values(3 ) ;
1 row inserted/updated/deleted
ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 0);
0 rows inserted/updated/deleted
ij> insert into t1 values(4) ;
1 row inserted/updated/deleted
ij> insert into t1 values(5);
1 row inserted/updated/deleted
ij> insert into t1 values(6);
1 row inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --performa rollforward recovery
connect 'wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';
ij> select * from t1 ;
A
-----------
1
2
3
4
5
6
ij> insert into t1 values(7);
1 row inserted/updated/deleted
ij> insert into t1 values(8);
1 row inserted/updated/deleted
ij> insert into t1 values(9);
1 row inserted/updated/deleted
ij> --take a backup again
call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 1);
0 rows inserted/updated/deleted
ij> insert into t1 values(10);
1 row inserted/updated/deleted
ij> insert into t1 values(11);
1 row inserted/updated/deleted
ij> insert into t1 values(12);
1 row inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --perform complete version restore
connect 'wombat;restoreFrom=extinout/mybackup/wombat';
ij> select * from t1 ;
A
-----------
1
2
3
4
5
6
7
8
9
ij> insert into t1 values(10);
1 row inserted/updated/deleted
ij> insert into t1 values(11);
1 row inserted/updated/deleted
ij> insert into t1 values(12);
1 row inserted/updated/deleted
ij> insert into t1 values(13);
1 row inserted/updated/deleted
ij> insert into t1 values(14);
1 row inserted/updated/deleted
ij> insert into t1 values(15);
1 row inserted/updated/deleted
ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 1);
0 rows inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --create a new database using wombat db backup copy with a different database name
connect 'wombat1;createFrom=extinout/mybackup/wombat';
ij> select * from t1;
A
-----------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ij> insert into t1 values(16);
1 row inserted/updated/deleted
ij> insert into t1 values(17);
1 row inserted/updated/deleted
ij> insert into t1 values(18);
1 row inserted/updated/deleted
ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 1);
0 rows inserted/updated/deleted
ij> connect 'wombat1;shutdown=true';
ERROR 08006: Database 'wombat1' shutdown.
ij> disconnect;
ij> ---BACKUP AND RESTORE USING LOGDEVICE.
connect 'crwombat;createFrom=extinout/mybackup/wombat;logDevice=extinout/crwombatlog';
ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('crwombatlog',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),11);
1
-----------
crwombatlog
ij> select * from t1;
A
-----------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ij> insert into t1 values(19);
1 row inserted/updated/deleted
ij> insert into t1 values(20);
1 row inserted/updated/deleted
ij> insert into t1 values(21);
1 row inserted/updated/deleted
ij> connect 'crwombat;shutdown=true';
ERROR 08006: Database 'crwombat' shutdown.
ij> disconnect;
ij> --do a plain boot , we should have the log device specified earlier.
connect 'crwombat';
ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('crwombatlog',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),11);
1
-----------
crwombatlog
ij> select * from t1;
A
-----------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
19
20
21
ij> insert into t1 values(22);
1 row inserted/updated/deleted
ij> insert into t1 values(23);
1 row inserted/updated/deleted
ij> insert into t1 values(24);
1 row inserted/updated/deleted
ij> connect 'crwombat;shutdown=true';
ERROR 08006: Database 'crwombat' shutdown.
ij> disconnect;
ij> ---check the error case of log device only existing when
-- we try to do createFrom .
--following connection shoul fail.
connect 'erwombat;createFrom=extinout/mybackup/wombat;logDevice=extinout/crwombatlog';
ERROR XJ040: Failed to start database 'erwombat' with class loader XXXX, see the next exception for details.
ERROR XSLAT: The log directory 'extinout<ps>crwombatlog<ps>log' exists. The directory might belong to another database. Check that the location specified for the logDevice attribute is correct.
ij> connect 'wombat;restoreFrom=extinout/mybackup/wombat;logDevice=extinout/wombatlog';
ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('wombatlog',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),9);
1
---------
wombatlog
ij> select * from t1 ;
A
-----------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ij> insert into t1 values(19);
1 row inserted/updated/deleted
ij> insert into t1 values(20);
1 row inserted/updated/deleted
ij> insert into t1 values(21);
1 row inserted/updated/deleted
ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 1);
0 rows inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --restore again from backup case to make sure
--backups are getting the log device property.
connect 'wombat;restoreFrom=extinout/mybackup/wombat';
ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('wombatlog',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),9);
1
---------
wombatlog
ij> select * from t1;
A
-----------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
19
20
21
ij> insert into t1 values(22);
1 row inserted/updated/deleted
ij> insert into t1 values(23);
1 row inserted/updated/deleted
ij> insert into t1 values(24);
1 row inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --do a vannila boot and see the device to make sure the log device is still intact.
connect 'wombat';
ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('wombatlog',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),9);
1
---------
wombatlog
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
ij> autocommit off;
ij> insert into t1 values(25);
1 row inserted/updated/deleted
ij> insert into t1 values(26);
1 row inserted/updated/deleted
ij> insert into t1 values(27);
1 row inserted/updated/deleted
ij> rollback;
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --performa rollforward recovery with logDevice specified at backup
connect 'wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';
ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('wombatlog',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),9);
1
---------
wombatlog
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
ij> insert into t1 values(25);
1 row inserted/updated/deleted
ij> insert into t1 values(26);
1 row inserted/updated/deleted
ij> insert into t1 values(27);
1 row inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --perform a rollforward recovery with log device is moved
--to some other place than what it was when backup was taken.
--move the log to different dir name.
connect 'dummycondb;createFrom=extinout/mybackup/wombat;logDevice=extinout/wombatlog1';
ij> call RENAME_FILE(null,'extinout/wombatlog','extinout/wombatlogmoved');
0 rows inserted/updated/deleted
ij> disconnect;
ij> connect 'wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat;logDevice=extinout/wombatlogmoved';
ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('wombatlogmoved',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),14);
1
--------------
wombatlogmoved
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
ij> insert into t1 values(30);
1 row inserted/updated/deleted
ij> insert into t1 values(31);
1 row inserted/updated/deleted
ij> insert into t1 values(32);
1 row inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --do a plain boot and verify the log device.
connect 'wombat';
ij> values SUBSTR(SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice'), LOCATE('wombatlogmoved',SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('logDevice')),14);
1
--------------
wombatlogmoved
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
ij> insert into t1 values(33);
1 row inserted/updated/deleted
ij> insert into t1 values(34);
1 row inserted/updated/deleted
ij> insert into t1 values(35);
1 row inserted/updated/deleted
ij> --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/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --restore and check the results;
connect '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
--------------
wombatlogmoved
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(36);
1 row inserted/updated/deleted
ij> insert into t1 values(37);
1 row inserted/updated/deleted
ij> insert into t1 values(38);
1 row inserted/updated/deleted
ij> connect '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 'dummycondb';
--call RENAME_FILE('rollForwardBackup', 'wombat', 'wombat.old');
--call RENAME_FILE(null, 'extinout/mybackup/wombat', 'rollForwardBackup/wombat');
---disconnect;
---connect '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 'wombat;shutdown=true';
--disconnect;
---createFrom without logDevice specified on URL should have null value.
connect '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/deleted
ij> insert into t1 values(40);
1 row inserted/updated/deleted
ij> insert into t1 values(41);
1 row inserted/updated/deleted
ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 1);
0 rows inserted/updated/deleted
ij> connect 'tempwombat;shutdown=true';
ERROR 08006: Database 'tempwombat' shutdown.
ij> disconnect;
ij> connect '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/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> ---Using plain backup mechanism rstore/recreate db using restoreFrom/createFrom
connect 'wombat';
ij> call SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1);
0 rows inserted/updated/deleted
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
ij> insert into t1 values(42);
1 row inserted/updated/deleted
ij> insert into t1 values(43);
1 row inserted/updated/deleted
ij> insert into t1 values(44);
1 row inserted/updated/deleted
ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE('extinout/mybackup');
0 rows inserted/updated/deleted
ij> --following inserted values should not be there
--when we do restore from the above backup.
insert into t1 values(45);
1 row inserted/updated/deleted
ij> insert into t1 values(46);
1 row inserted/updated/deleted
ij> insert into t1 values(47);
1 row inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> connect '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/deleted
ij> insert into t1 values(46);
1 row inserted/updated/deleted
ij> insert into t1 values(47);
1 row inserted/updated/deleted
ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE('extinout/mybackup');
0 rows inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> connect '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/deleted
ij> insert into t1 values(49);
1 row inserted/updated/deleted
ij> insert into t1 values(50);
1 row inserted/updated/deleted
ij> connect 'wombatnew;shutdown=true';
ERROR 08006: Database 'wombatnew' shutdown.
ij> disconnect;
ij> --enable the log archive mode again.
connect 'wombat';
ij> call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
'extinout/mybackup', 1);
0 rows inserted/updated/deleted
ij> connect 'wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> disconnect;
ij> --NEGATIVE TEST with RESTORE FLAGS
-- with createFrom option should give erro on existing database
connect 'wombat;createFrom=extinout/mybackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, see the next exception for details.
ERROR XBM0J: Directory DBLOCATION/wombat already exists.
ij> -- specify conflictint attributes; it should fail.
connect 'wombat;create=true;createFrom=extinout/mybackup/wombat';
ERROR XJ049: Conflicting create attributes specified.
ij> connect 'wombat;create=true;rollForwardRecoveryFrom=extinout/mybackup/wombat';
ERROR XJ049: Conflicting create attributes specified.
ij> connect 'wombat;create=true;restoreFrom=extinout/mybackup/wombat';
ERROR XJ049: Conflicting create attributes specified.
ij> connect 'wombat;restoreFrom=extinout/mybackup/wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';
ERROR XJ081: Conflicting create/restore/recovery attributes specified.
ij> connect '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 'wombat;rollForwardRecoveryFrom=nobackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, 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 'wombat;restoreFrom=nobackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, 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 'wombat2;createFrom=nobackup/wombat';
ERROR XJ040: Failed to start database 'wombat2' with class loader XXXX, 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 'wombat2;restoreFrom=extinout/mybackup/wombat';
ij> call RENAME_FILE('extinout/mybackup/wombat/','service.properties','service.properties.old');
0 rows inserted/updated/deleted
ij> connect 'wombat;restoreFrom=extinout/mybackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, 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/deleted
ij> call RENAME_FILE('extinout/mybackup/wombat/','log','log.old');
0 rows inserted/updated/deleted
ij> connect 'wombat;restoreFrom=extinout/mybackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, 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/deleted
ij> call RENAME_FILE('extinout/mybackup/wombat/','seg0','data.old');
0 rows inserted/updated/deleted
ij> connect 'wombat;restoreFrom=extinout/mybackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, 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/deleted
ij> --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/deleted
ij> connect 'wombat;createFrom=extinout/mybackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, 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/deleted
ij> call RENAME_FILE('extinout/mybackup/wombat/','log','log.old');
0 rows inserted/updated/deleted
ij> connect 'wombat;createFrom=extinout/mybackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, 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/deleted
ij> call RENAME_FILE('extinout/mybackup/wombat/','seg0','data.old');
0 rows inserted/updated/deleted
ij> connect 'wombat;createFrom=extinout/mybackup/wombat';
ERROR XJ040: Failed to start database 'wombat' with class loader XXXX, 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/deleted
ij> drop procedure RENAME_FILE;
0 rows inserted/updated/deleted
ij>