on 02-06-2010 4:29 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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%
-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.