Wednesday 27 November 2019

Sybase DB Restore with Full Backup


Follow below steps to restore Sybase DB with a Full Backup

Simple steps to restore your DB with a up-to-date full backup in the case of a emergency situation

1. Stop SAP Application & DB
2. Go to the below location,

Windows - <Drive>:\sybase\SID\ASE-16_0\install 
Unix        -   /sybase/SID/ASE-16_0/install

3. Database need to change single user mode before the restoration, (below steps)

4. Edit RUN_SID File 
5. Add the below entry to RUN_SID File,

The last entry of the RUN_SID file will be like below,

"D:\sybase\SID\ASE-16_0\bin\sqlsrvr.exe" -d"D:\sybase\SID\sybsystem\master.dat" -sSID -e"D:\sybase\SID\ASE-16_0\install\ES1.log" -c"D:\sybase\SID\SID.cfg" -N"D:\sybase\ES1\ASE-16_0\sysam\SID.properties" -i"D:\sybase\SID\ini" -M"D:\sybase\SID\ASE-16_0"

add -m parameter to the file like below,

"D:\sybase\SID\ASE-16_0\bin\sqlsrvr.exe" -d"D:\sybase\SID\sybsystem\master.dat" -sSID -e"D:\sybase\SID\ASE-16_0\install\ES1.log" -c"D:\sybase\SID\SID.cfg" -N"D:\sybase\ES1\ASE-16_0\sysam\SID.properties" -i"D:\sybase\SID\ini" -M"D:\sybase\SID\ASE-16_0" -m

5. Save the File RUN_SID

6. Start Sybase DB (DB will be in Single user mode now)
7. Restore the DB using below commands,

login to isql -

isql -Uspsa -P<Passowrd> -S<SID> -X

> use master
> go

> load Database SID from "backup location\backup File name"
> go

8. Once the restoration completed use below commands in isql to change the DB in online mode,

> online Database SID
> go

9. After this step Stop the DB
10. Go to the below location to edit RUN_SID

Windows - <Drive>:\sybase\SID\ASE-16_0\install 
Unix        -   /sybase/SID/ASE-16_0/install

11. Remove the -m parameter added to the RUN_SID File,
12. Save RUN_SID File,

13. Start DB & Application

See Common Issues in DB Restore:-



Thanks for reading, Please share your valuable feedback.  

Share this

9 Responses to "Sybase DB Restore with Full Backup"

  1. Thanks for sharing this topic, very nice.
    Keep sharing your knowledge.

    ReplyDelete
  2. This is applicable only if encryption keys on source and target are same. If source and target encryption keys are different we need to use swpm to rebuild target database with source backup mentioning source encryption key and source master password. In one step of swpm it will ask to load the backups and there we need to use the same load database and load tran commands.

    ReplyDelete
  3. Such an informative article.

    ReplyDelete