Skip to Content
avatar image
Former Member

How to recover data and log

Hello, everyone

I re-installed my windows XP due to virus with the maxdb data and log files left. After that I reinstalled maxdb 7.6 again. How can I recover the db with the existed data and log ? I did not backup the db. I can not figure out a way. Please help me.

Chu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 24, 2008 at 12:52 PM

    Hi Chu,

    creating a MaxDB instance from the data- and logvolumes is not difficult, but some requirements have to be fullfilled:

    - you still have the parameter file left

    - you still know the password of the database manager operator (DBM in OpenSource or CONTROL for SAP instances)

    That given, all you've to do is to re-register the database, via the db_create command:

    dbmcli -R "

    So, let's go for an example.

    I've a database called DB77, the dbm operator is called control, password is also control.

    I'll drop the database but keep the files (just like you have it ... hopefully) and re-register the database afterwards:

    >dbmcli db_enum OK DB77 C:sapdbdb77db 7.7.02.16 fast offline DB77 C:sapdbdb77db 7.7.02.16 slow offline >dir c:sapdbdataconfig Datenträger in Laufwerk C: ist Boot Volumeseriennummer: 08C7-EC59 Verzeichnis von c:sapdbdataconfig 24.03.2008 13:37 <DIR> . 24.03.2008 13:37 <DIR> .. 25.10.2007 14:11 12.739 .M770216 25.10.2007 14:11 97.900 .M770216.pah 25.10.2007 14:11 1.536 .M770216.upc 14.02.2008 02:21 20.579 .M770323 14.02.2008 02:21 201.850 .M770323.pah 14.02.2008 02:21 1.536 .M770323.upc 14.03.2008 02:23 20.795 .UMDB 14.02.2008 02:24 20.795 .UMDB.01 25.10.2007 14:24 20.795 .UMDB.02 14.03.2008 02:23 26 .UMDB.cfg 14.02.2008 02:24 207.625 .UMDB.pah 25.10.2007 14:24 2.048 .UMDB.upc 14.03.2008 09:23 13.405 DB77 13.03.2008 23:51 13.405 DB77.01 11.03.2008 20:10 13.405 DB77.02 14.02.2008 02:21 13.405 DB77.03 14.02.2008 02:17 13.405 DB77.04 24.01.2008 19:06 13.405 DB77.05 11.01.2008 18:57 13.405 DB77.06 31.12.2007 01:40 13.405 DB77.07 26.12.2007 14:40 13.404 DB77.08 26.12.2007 14:20 13.181 DB77.09 26.12.2007 14:01 13.181 DB77.10 14.03.2008 09:23 75 DB77.cfg 02.12.2007 18:24 648 DB77.mmm 11.03.2008 20:16 343.475 DB77.pah 24.03.2008 13:37 2.048 DB77.upc 14.02.2008 02:20 <DIR> install 27 Datei(en) 1.101.476 Bytes 3 Verzeichnis(se), 20.064.083.968 Bytes frei Ok, the database is currently correctly registered and the parameter file is present. Now let's drop the database: >dbmcli -d db77 -u control,control db_drop withoutfiles OK >dir c:sapdbdataconfig Datenträger in Laufwerk C: ist Boot Volumeseriennummer: 08C7-EC59 Verzeichnis von c:sapdbdataconfig 24.03.2008 13:37 <DIR> . 24.03.2008 13:37 <DIR> .. 25.10.2007 14:11 12.739 .M770216 25.10.2007 14:11 97.900 .M770216.pah 25.10.2007 14:11 1.536 .M770216.upc 14.02.2008 02:21 20.579 .M770323 14.02.2008 02:21 201.850 .M770323.pah 14.02.2008 02:21 1.536 .M770323.upc 14.03.2008 02:23 20.795 .UMDB 14.02.2008 02:24 20.795 .UMDB.01 25.10.2007 14:24 20.795 .UMDB.02 14.03.2008 02:23 26 .UMDB.cfg 14.02.2008 02:24 207.625 .UMDB.pah 25.10.2007 14:24 2.048 .UMDB.upc 14.03.2008 09:23 13.405 DB77 13.03.2008 23:51 13.405 DB77.01 11.03.2008 20:10 13.405 DB77.02 14.02.2008 02:21 13.405 DB77.03 14.02.2008 02:17 13.405 DB77.04 24.01.2008 19:06 13.405 DB77.05 11.01.2008 18:57 13.405 DB77.06 31.12.2007 01:40 13.405 DB77.07 26.12.2007 14:40 13.404 DB77.08 26.12.2007 14:20 13.181 DB77.09 26.12.2007 14:01 13.181 DB77.10 14.03.2008 09:23 75 DB77.cfg 02.12.2007 18:24 648 DB77.mmm 11.03.2008 20:16 343.475 DB77.pah 24.03.2008 13:37 2.048 DB77.upc 14.02.2008 02:20 <DIR> install 27 Datei(en) 1.101.476 Bytes 3 Verzeichnis(se), 20.064.083.968 Bytes frei >dbmcli db_enum OK As we see, the database is gone - but due to the withoutfiles flag all files are left in place. Therefore we can reregister the database rightaway: >dbmcli -R C:sapdbdb77db db_create DB77 control,control OK >dbmcli db_enum OK DB77 C:sapdbdb77db 7.7.02.16 fast offline DB77 C:sapdbdb77db 7.7.02.16 slow offline >dir c:sapdbdataconfig Datenträger in Laufwerk C: ist Boot Volumeseriennummer: 08C7-EC59 Verzeichnis von c:sapdbdataconfig 24.03.2008 13:42 <DIR> . 24.03.2008 13:42 <DIR> .. 25.10.2007 14:11 12.739 .M770216 25.10.2007 14:11 97.900 .M770216.pah 25.10.2007 14:11 1.536 .M770216.upc 14.02.2008 02:21 20.579 .M770323 14.02.2008 02:21 201.850 .M770323.pah 14.02.2008 02:21 1.536 .M770323.upc 14.03.2008 02:23 20.795 .UMDB 14.02.2008 02:24 20.795 .UMDB.01 25.10.2007 14:24 20.795 .UMDB.02 14.03.2008 02:23 26 .UMDB.cfg 14.02.2008 02:24 207.625 .UMDB.pah 25.10.2007 14:24 2.048 .UMDB.upc 14.03.2008 09:23 13.405 DB77 13.03.2008 23:51 13.405 DB77.01 11.03.2008 20:10 13.405 DB77.02 14.02.2008 02:21 13.405 DB77.03 14.02.2008 02:17 13.405 DB77.04 24.01.2008 19:06 13.405 DB77.05 11.01.2008 18:57 13.405 DB77.06 31.12.2007 01:40 13.405 DB77.07 26.12.2007 14:40 13.404 DB77.08 26.12.2007 14:20 13.181 DB77.09 26.12.2007 14:01 13.181 DB77.10 14.03.2008 09:23 75 DB77.cfg 02.12.2007 18:24 648 DB77.mmm 11.03.2008 20:16 343.475 DB77.pah 24.03.2008 13:42 2.048 DB77.upc 14.02.2008 02:20 <DIR> install 27 Datei(en) 1.101.476 Bytes 3 Verzeichnis(se), 20.064.083.968 Bytes frei >dbmcli -d db77 -u control,control db_online OK Database reregistered, all files are OK, database online. We're done.

    Anyhow, you should in any case perform a backup before you reinstall your machine the next time. I don't know if you've still got all the files I mentioned, but if not - it's not possible to get your database back easily - if at all.

    Hope that helps,

    Lars

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello, KR lars

      Because the data is very important for me, I searched the hard disk again and found the initial backup data and serveral log files afterwards.

      When I restore db from the initial backup data, I only got the initial data. Is there a way to use the several log files to restore the the last state of db?

      Sorry for troubling you so much.

      Chu