cancel
Showing results for 
Search instead for 
Did you mean: 

Offline backup of SAP system

Former Member
0 Kudos

Hi Gurus ,

We are using SAP ECC 6.0 with Oracle 102 and Windows 2003 server X64 bit . Now we planned to shedule the offline backup from OS level . So We need to shutdown automatically all SAP services , consloes and Oracle database .Then only i need to shedule the offline backup . So kindl tell me the batch file script for auto shutdown commands for SAP and Oracle .

Regards

Selvan.SP

Accepted Solutions (1)

Accepted Solutions (1)

former_member524429
Active Contributor
0 Kudos

Continue....

The backup will be performed based on the values set for backup related parameters in init<SID>.sap file. such as backup_dev_type, util_par_file, etc..etc.

ORA<SID>_OFFLINE_BKP.bat

::Taking Offline Backup of ORA<SID>

set logfile=<drive>:\Scripts\log\<SID>_Stop_LOG.txt

set sdate=%date%

set stime=%time%

echo. >> %logfile%

echo %sdate% >> %logfile%

echo %stime% >> %logfile%

echo. >> %logfile%

brbackup -u system/manager -c -m all -t offline

echo. >> %logfile%

echo %sdate% >> %logfile%

echo %stime% >> %logfile%

echo. >> %logfile%

-


<SID>_ON.bat

:: To Start SAP System <SID>

set logfile=<drive>:\Scripts\log\<SID>_STARTUP_LOG.txt

set sdate=%date%

set stime=%time%

echo. >> %logfile%

echo %sdate% >> %logfile%

echo %stime% >> %logfile%

echo. >> %logfile%

echo Starting All SAP Services . . . >> %logfile%

echo. >> %logfile%

net start SAPOsCol >> %logfile%

sc config SAPOsCol start= auto >> %logfile%

echo. >> %logfile%

net start SAP<SID>_01 >> %logfile%

sc config SAP<SID>_01 start= auto >> %logfile%

echo. >> %logfile%

net start SAP<SID>_00 >> %logfile%

sc config SAP<SID>_00 start= auto >> %logfile%

echo. >> %logfile%

echo Starting SAP <SID> Instance 01 >> %logfile%

<drive>:\usr\sap\<SID>\DVEBMGS00\exe\startsap name=<SID> nr=01 SAPDIAHOST=hostname >> %logfile%

echo. >> %logfile%

echo Starting SAP <SID> Instance 00 >> %logfile%

<drive>:\usr\sap\<SID>\DVEBMGS00\exe\startsap name=<SID> nr=00 SAPDIAHOST=hostname >> %logfile%

echo. >> %logfile%

-


Regards,

Bhavik G. Shroff

Answers (1)

Answers (1)

former_member524429
Active Contributor
0 Kudos

Hi,

You can prepare 3 different scripts(.bat files) or All-in-one script for your requirement and schedule it using Task Scheduler in Windows, according to your SAP system complete Start-up and Shutdown Time.

You can use additional start/stop statements in sequence for different instances with which your SAP system is installed and running.

Here I am giving some sample script with proper log generation.

<SID>_OFF.bat

:: To Stop SAP System <SID>

set logfile=<drive>:\Scripts\log\<SID>_Stop_LOG.txt

set sdate=%date%

set stime=%time%

echo. >> %logfile%

echo %sdate% >> %logfile%

echo %stime% >> %logfile%

echo. >> %logfile%

echo Stopping SAP <SID> Instance 01 >> %logfile%

<drive>:\usr\sap\<SID>\DVEBMGS00\exe\stopsap name=<SID> nr=01 SAPDIAHOST=hostname >> %logfile%

echo. >> %logfile%

echo Stopping SAP <SID> Instance 00 >> %logfile%

<drive>:\usr\sap\<SID>\DVEBMGS00\exe\stopsap name=<SID> nr=00 SAPDIAHOST=hostname >> %logfile%

echo. >> %logfile%

net stop SAP<SID>_01 >> %logfile%

sc config SAP<SID>_01 start= demand >> %logfile%

echo. >> %logfile%

net stop SAP<SID>_00 >> %logfile%

sc config SAP<SID>_00 start= demand >> %logfile%

echo. >> %logfile%

net stop SAPOsCol >> %logfile%

sc config SAPOsCol start= demand >> %logfile%

echo. >> %logfile%

echo. >> %logfile%

echo %sdate% >> %logfile%

echo %stime% >> %logfile%

echo. >> %logfile%

-