Hi all.
A customer of mine, yesterday, performed a bad processing with our PB application on a Sybase SQL Anywhere 10 database and unintentionally deleted a lot of data in various tables. He has no backup of the db (not to mention) but the database has the complete log since creation.
I tried to recover the data acting like this:
- transform the log into SQL with dbtran;
- edit the obtained SQL file (9GB) and remove all yesterday's operations (checkpoint dates can help me);
- create a brand new db with dbinit and execute the modified SQL file on it, obtaining the "restored" db.
I was able to carry out the first two steps without problems; at the third, however, the execution stops me because the SQL file contains strange statements such as:
load into table DBA.pbcattbl from '\\\\. \\ pipe \\ 2792-ASANP_table \ ...
Seems it's trying to import data from a "pipe" which obviously does not exist, blocking everything.
Do you know how to overcome this problem? Are there any alternative solutions to recover customer data?
Thank you so much,
Luca
I guess the LOAD TABLE statements have been generated by DBUNLOAD some years ago when I upgraded the db by using DBUNLOAD -ac (infact there's no real filename in the statement, but a "pipe"). I didn't know that SQL Anywhere does not log the "real" INSERT statements but just the LOAD TABLE statements, which are totally useless since of course I don't have the old db anymore.
My customer has been lucky since I found an old backup of the same database and was able to apply the remainder of the log on it... but if I had to recover it just from the log it would have been impossible.
Best,
Luca