Hi SAP DB developers!
History:
SAP DB v. 7.4.3.31(but the same issue with v.v. 7.4.3.10/7.4.3.17/7.4.3.27)
Log Mode: Autosave is ON.
Medium for Backup created as:
"medium_put data %DATA%\%SID%\DATA\datasave FILE DATA 0 8 YES"
"medium_put auto %DATA%\%SID%\LOG\autosave FILE AUTO"
Problem:
How to restore the DB`s state completely from the backup within the C++ programm (i.e.
not using the DBMGUI)?
For example I performed the Complete Data Backup at 01.01.2004. After that some
important data were deleted...
At 02.01.2004 I need to restore DB`s state for the last Complete Data Backup state.
How can I do it?
1. "recover_start data DATA" failed:
- "recover_start data DATA UNTIL <date> <time>" returnes error;
- "recover_start auto LOG UNTIL <date> <time>" doesn`t work because the absence of
the "Log Backup".
2. With DBMGUI recovery does succeed but after that DB is on the "Log Mode -Autosave
is OFF" state and failed to turn to the "Log Mode -Autosave is ON".
It is possible to turn the DB to the "Log Mode -Autosave is ON" but only after once
more Complete Data Backup.
Is that normal? Are my actions wrong?
I used to solve the problem through the loadercli:
- unloading:
"tableextract ALL DATA OUTSTREAM backup_file PAGES" - success
(
// *
// M LOAD TRANSFORMATIONPACKAGE x'01000000226731F6F00700007C760000BC37159EF0956402'
// *
// M Number of tables to transform: 24
// *
// M Number of views to transform: 0
// *
// M Number of synonyms to transform: 0
// *
// M CONFIGURE TRANSFORMATIONPACKAGE
// *
// M EXECUTE PACKAGE TO TRANSFORM DATA
// *
// M Number of tables transformed : 24
// *
// M Loader 7.4.3 Build 031-123-060-910
// *
// M Loader instance started at ws-denim for database DB1
// *
// M Starting protocol at 2004020400142319
// *
// *
// *
// M START 20040204 00142319
// *
);
- loading:
"tableload ALL DATA INSTREAM backup_file0001 PAGES" returnes error
(
// *
// M LOAD TRANSFORMATIONPACKAGE x'01000000276731F63C0A0000047100008E4EBBCF1F36A082'
// *
// M Number of tables to transform: 24
// *
// M Number of views to transform: 0
// *
// M Number of synonyms to transform: 0
// *
// M CONFIGURE TRANSFORMATIONPACKAGE
// *
// M EXECUTE PACKAGE TO TRANSFORM DATA
// *
// E -25602: Error restoring table A; table is not empty
// E -25801: Internal error [vls28_TLoad.cpp, 2292, -25602]; contact technical
support
// M UNLOAD TRANSFORMATIONPACKAGE
x'01000000276731F63C0A0000047100008E4EBBCF1F36A082'
// *
).
Help documentation says: "The target tables must be empty. If the tables are not
empty, the Loader attempts to delete the contents of the tables."
But the table A doesn`t linked with any other table. Cleaning the tables by hand is
not right.
Is there any way to restore the state of sequences and columns defined as "DEFAULT
SERIAL(n)"?
With best regards.
Denis