Skip to Content
0
Feb 27, 2007 at 10:27 PM

Run external program (dos batch) after database backup (Newbie!)

280 Views

I am implementing an intermediate database backup solution for our SAP systems in our SANDBOX environment. The idea behind is backup SQL Database using DB13 to the local disk and then run a windows batch file to copy the files to the external file server. After doing some research, I am able to define and run a batch program using SM36 (Job maintenance). I scheduled database backup using DB13. Now I am trying to run the job I defined in SM36 after the scheduled database backup in DB13 automatically.

I also did some research on background events, how to create user defined events and how to raise events in ABAP program and from external programs using SAPEVT. I came up with two options:

Option 1:

1. Identify the job which I scheduled in DB13 under SM36.

2. Add this job as step1

3. Add the external program (batch file) as step2

Questions Regarding Option1:

1. Is it possible to add the database backup job as a step in SM36?

Option 2

1. Create user defined event.

2. Create job with the external program with the job marked as “after event”.

3. Raise this user defined event after database backup (scheduled using DB13).

Questions Regarding Option2:

1. Is it possible to raise user defined event after completion of the database backup in DB13?

The following are the alternative options. But I am trying to do everything within SAP:

<b>1) Schedule backup in SQL Server using Management Studio using SSIS with custom task.

2) Schedule the DOS batch file under control panel. This requires a longer gap so that the database backup does not conflict.

3) Use backup software agents (vertias) to directly backup the database.

</b>

Let me know if you think of any alternative options.

Any help towards this is highly appreciated.

Message was edited by:

R.T.