when I was working with restore at SAPDB, I have the problem, that the data from log are not in the database after restore.
Sequence: 1. Data Backup Migration 2. call sap_logtest.sh ... drop table TWS_TST create table TWS_TST add 3 records show records in TWS_TST perform backup log 01 add 3 records show records in TWS_TST perform backup log 02 add 3 records show records in TWS_TST perform backup log 03
3. restore Data Backup (1.) 4. call sap_restore_log.sh
restore data log 01 The log of the restore shows no error(rc 0). I expect the newly created table and the data from it in db.
but: show records in TWS_TST, gave me the error
ERR
-24988,ERR_SQL: sql error
-4004,Unknown table name:TWS_TST
Restore log 02 DBM-Api error ( -4'received a garbled packet')
For me I seems, that the restore of log 01 is not ok. This happens everytime on solaris,linux and nt4.
What must be done to restore log 02 and 03? What have I done wrong? Is this a bug?
Thanks in advance.
Best regards
Thorsten Weers
#!/bin/sh # # sap_restore.sh # function: resore sapdb initial # autor: TWS # 23.10.2003 #
# export PATH=/opt/sapdb/depend/bin:$PATH export SID=TST export MEDIA=logmedium export FILE=$HOME/logmedium.log export DBUSER=dba export DBPASS=dba export LOG=$HOME/sap_restore_log.log dbmcli -d $SID -u $DBUSER,$DBPASS db_warm >$LOG 2>&1 dbmcli -uUTL -d $SID -u $DBUSER,$DBPASS autolog_off >>$LOG 2>&1 dbmcli -d $SID -u $DBUSER,$DBPASS db_cold >>$LOG 2>&1 dbmcli -d $SID -u $DBUSER,$DBPASS db_state >>$LOG 2>&1 dbmcli -d $SID -u $DBUSER,$DBPASS medium_put $MEDIA $FILE FILE LOG 0 8 YES >>$LOG 2>&1 echo " Restore log 01" >>$LOG dbmcli -uUTL -d $SID -u $DBUSER,$DBPASS recover_start $MEDIA FILE 001 >>$LOG 2>&1 echo " " >>$LOG echo " Recover-status" >>$LOG dbmcli -uUTL -d $SID -u $DBUSER,$DBPASS recover_state echo " " >>$LOG echo " Restore log 02" >>$LOG dbmcli -uUTL -d $SID -u $DBUSER,$DBPASS recover_replace $MEDIA FILE 002 >>$LOG 2>&1 echo " " >>$LOG echo " Restore log 03" >>$LOG dbmcli -uUTL -d $SID -u $DBUSER,$DBPASS recover_replace $MEDIA FILE 003 >>$LOG 2>&1 # dbmcli -uUTL -d $SID -u $DBUSER,$DBPASS recover_ignore echo "DB warm" >>$LOG dbmcli -d $SID -u $DBUSER,$DBPASS db_warm >>$LOG echo " " >>$LOG echo " Tabelle nach Restore LOGs" dbmcli -d $SID -u $DBUSER,$DBPASS sql_execute SELECT *FROM TWS_TST >>$LOG 2>&1 clear more $LOG
#!/bin/sh # # sap_logtest_01.sh # function: test log 01 # autor: TWS # 23.10.2003 # export PATH=/opt/sapdb/depend/bin:$PATH export SID=TST export MEDIA=logmedium export FILE=$HOME/logmedium.log export DBUSER=dba export DBPASS=dba export LOG=$HOME/sap_logtest_01.log clear dbmcli -d $SID -u $DBUSER,$DBPASS db_warm >$LOG # rm $MEDIA # # Tabelle loeschen repmcli -d $SID -u $DBUSER,$DBPASS -b drop_user.sql >>$LOG 2>&1 # Tabelle neu anlegen repmcli -d $SID -u $DBUSER,$DBPASS -b create_user.sql >>$LOG 2>&1 # Benutzer 01 hinzufuegen repmcli -d $SID -u $DBUSER,$DBPASS -b add_user_01.sql >>$LOG 2>&1 dbmcli -d $SID -u $DBUSER,$DBPASS sql_execute SELECT *FROM TWS_TST >>$LOG 2>&1 dbmcli -d $SID -u $DBUSER,$DBPASS db_cold >>$LOG 2>&1 dbmcli -uUTL -d $SID -u $DBUSER,$DBPASS backup_history_open >>$LOG 2>&1 dbmcli -d $SID -u $DBUSER,$DBPASS medium_put $MEDIA $FILE FILE LOG 0 8 YES >>$LOG 2>&1 dbmcli -uUTL -d $SID -u $DBUSER,$DBPASS backup_start $MEDIA MIGRATION LOG >>$LOG 2>&1 # dbmcli -d $SID -u $DBUSER,$DBPASS medium_delete $MEDIA dbmcli -d $SID -u $DBUSER,$DBPASS db_warm >>$LOG clear more $LOG
OK OK OK OK State ADMIN OK Restore log 01 OK Returncode 0 Date 20031027 Time 00181230 Server linux Database TST Kernel Version Kernel 7.4.3 Build 010-000-035-462 Pages Transferred 40 Pages Left 0 Volumes 1 Medianame logmedium Location /home/sapdb/logmedium.log.002 Errortext Label LOG_00002 Is Consistent First LOG Page 978 Last LOG Page 1014 DB Stamp 1 Date 20031027 DB Stamp 1 Time 00174516 DB Stamp 2 Date 20031027 DB Stamp 2 Time 00174537 Page Count 36 Devices Used 1 Database ID linux:TST_20031027_174522 Max Used Data Page Recover-status ERR -24988,ERR_SQL: sql error -4004,Unknown table name:TWS_TST Restore log 02 DBM-Api error ( -4'received a garbled packet') Restore log 03 DBM-Api error ( -4'received a garbled packet') OK DB warm OK ERR -24988,ERR_SQL: sql error -4004,Unknown table name:TWS_TST
OK
Opened connection to Loader SERVER at node local host.
Loader Server Protocol File: '/var/opt/sapdb/indep_data/wrk/loader.prt'
User DBA connected to database TST on local host.
drop table TWS_TST
Error during execution
-->-25010
SQL error -4004 = Unknown table name:TWS_TST (error position: 12)
Defined maximum number of errors (1) reached
1 error(s) during execution of command file 'drop_user.sql'.
---> See log file(s) for more information.
Some error(s) occurred running command.
---> See log file(s) for more information.
Opened connection to Loader SERVER at node local host.
Loader Server Protocol File: '/var/opt/sapdb/indep_data/wrk/loader.prt'
User DBA connected to database TST on local host.
create table TWS_TST
(
TST_USER Char(20) ASCII ,
TST_PASS Char(20) ASCII ,
primary key (TST_USER)
)
Successfully executed
commit
Successfully executed
grant ALTER, DELETE, INDEX, SELECT, INSERT, UPDATE, REFERENCES on TWS_TST to public
Successfully executed
commit
Successfully executed
Opened connection to Loader SERVER at node local host.
Loader Server Protocol File: '/var/opt/sapdb/indep_data/wrk/loader.prt'
User DBA connected to database TST on local host.
INSERT INTO TWS_TST SET
TST_USER='TEST11',
TST_PASS ='PASSWD'
Successfully executed
COMMIT
Successfully executed
INSERT INTO TWS_TST SET
TST_USER='TEST12',
TST_PASS ='PASSWD'
Successfully executed
COMMIT
Successfully executed
INSERT INTO TWS_TST SET
TST_USER='TEST13',
TST_PASS ='PASSWD'
Successfully executed
COMMIT
Successfully executed
OK
END
'TEST11';'PASSWD'
'TEST12';'PASSWD'
'TEST13';'PASSWD'
OK
OK
OK
OK
Returncode 0
Date 20031027
Time 00174545
Server linux
Database TST
Kernel Version Kernel 7.4.3 Build 010-000-035-462
Pages Transferred 40
Pages Left 0
Volumes 1
Medianame logmedium
Location /home/sapdb/logmedium.log.002
Errortext
Label LOG_00002
Is Consistent
First LOG Page 978
Last LOG Page 1014
DB Stamp 1 Date 20031027
DB Stamp 1 Time 00174516
DB Stamp 2 Date 20031027
DB Stamp 2 Time 00174537
Page Count 40
Devices Used 1
Database ID linux:TST_20031027_174522
Max Used Data Page
OK
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
