Skip to Content
avatar image
Former Member

SAP ASE database restore

I am very new to SAP ASE.I have a situation where i have to restore the database from the backup..I have taken a OFFLINE backup in SAP ASE..My db version is 15.7.138.I had to do a refresh our SAP system from the offline db backup.I am saying offline here because i brought down the sap before taking the db backup using DUMP database command.I am coming from oracle background.I am trying to restore but i cant.I have deleted the sapdata_* and saplog_1 files from respective directories.I have deleted the /sybase/SID/sybdiag and /sybase/SID/saptemp files accidently but was very confident of the full file system backup taken by our backup team today.But to my shock,they have said the filesystem backup doesnt backup /sybase/SID/sybdiag and /sybase/SID/saptemp filesystem .

i gave the below commands to load the database..

1> use master
2> go
1> load database SID from "/backup/SID.DB.BACKUP.FULL.12-03-2017"
2> go
Msg 840, Level 17, State 2:
Server 'SID', Line 1:
Device 'SID_data_001' (with physical name
'/sybase/SID/sapdata_1/SID_data_001.dat', and virtual device number 9) has not
been correctly activated at startup time. Please contact a user with System
Administrator (SA) role.

I am really lost right now...Questions:

1.Is it possible to recreate the saptools_data_001.dat and saptools_log_001.dat under

/sybase/SID/sybdiag directory and saptempdb_data_001.dat under/sybase/SID/saptemp?

2.I have deleted the data files from /sybase/SID/sapdata_1,2,3 and log file from /sybase/SID/saplog_1.Is this the right way to restore the db using LOAD DATABASE command..I mainly followed the deletion based on oracle db refreshes in sap system.

3. Does the DUMP DATABASE command take the backup of sapdata_1,2,3 etc.. and saplog_1 ?If that is true then LOAD DATABASE command should restore the above *.dat files into the sapdata_1,2,3 and saplog_1 directories right???

Please advice..Very very urgent and critical situation...Any help would be really really great.

Thanks n Regards,

Akki

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Mar 23, 2017 at 04:41 PM

    NOTE: While I work with ASE, I do not work with SAP applications that use ASE; net result being that I can comment on general ASE issues but not necessarily SAP applications running on ASE.

    -----------------

    dump database makes a copy of the database's content (stored in those filee, ie, ASE device files), and writes said content to the desired dump file(s).

    When you run load database the contents of the dump file(s) are written to the ASE device files.

    ----------------

    Under normal circumstances you do *NOT* delete the ASE device files (eg, /sybase/SID/*). [In other words, you've basically shot yourself in the foot by deleting the ASE device files.]

    If you don't have OS level backups of those ASE device files then you'll have to recreate them (eg, disk init ...); what I can't answer is if SAP has any KBA/notes to cover this situation, or KBA/notes on how to rebuild your ASE dataserver from scratch (followed by loading your databases from the dump files).

    I also suggest in the future you use ASE specific KBA/notes to refresh a ASE-based system (ie, don't use Oracle specific instructions to refresh a ASE-based system).

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 23, 2017 at 04:48 PM

    Hi Mark,

    Is it possible if i follow the below procedure..and then LOAD DATABASE...

    use master

    go

    disk resize name = "<Device_Name>", size = "<Size>"

    go

    2.Add the new space on device <Device_Name> to database <DB_Name>

    use master

    go

    alter database <DB_Name> on <Device_Name> = "<Size>"

    go

    Thanks n Regards,

    Akki

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 23, 2017 at 04:59 PM

    Well, you can try it and see what happens, but my guess is you're going to have to get someone to:

    - drop the (now corrupted) databases that reside on the (now missing) devices

    - drop the (now missing) devices from the dataserver

    - re-add the devices via the disk init command

    - re-create the databases (create/alter database ... for load)

    - run load database

    --------------

    The steps needed to get your databases back up and online are too numerous/detailed to perform in this forum.

    If you don't have an experienced ASE DBA onsite ... and you're in a hurry ... I suggest you open a case with tech support.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 23, 2017 at 05:39 PM

    This is a "disaster recovery" type of situation where you have to rebuild the ASE instance and then user databases.

    Not trying to underestimate your efforts/understanding of ASE but restoring ASE database is a complex operation as Mark has pointed out.

    If you are new to SAP ASE please do seek a professional help from SAP or from third party consultants.

    HTH

    Avinash

    Add comment
    10|10000 characters needed characters exceeded