You can schedule regular database/transaction log backups for SAP Java Stack systems running on SAP on ASE (with no possibility to use an ABAP stack system to manage that from DBACockpit).
Environment:
SAP Adaptive Server Enterprise (ASE) 16.0
Pre-requisites:
- Job Scheduler database is installed and up and running
- Backup Server is up and running
You can schedule automatic dump jobs using AMC, under Backup & Recovery > Database Dumps > Create option.
If you want to schedule dump manually, you may proceed with the following steps:
Connect to ASE using isql command
sybadm> isql -Usapsa -PXXXX -S SMJ -X
Create a dump configuration if required. The advantage of the dump configuration is that you can reuse for others dumps.
sybadm> use master
sybadm> go
sybadm> sp_config_dump '<configname>',@stripe_dir='</path/to/backup/location>',@num_stripes='<#stripes>',@retry='1',@compression = '<compression level>'
sybadm>go
Example: sp_config_dump 'SMJDB',@stripe_dir='</backup/Backup/SOL/SMJ',@num_stripes='1',@retry='1',@compression = '101'
Create a scheduled job using sp_sjobcreate stored proc
Command syntax: sp_sjobcreate
sybadm> use sybmgmtdb
sybadm> go
Create database dump syntax:
sybadm> sp_sjobcreate @name='<schedulename>',@option="jname=<jobname>,jdesc=<job description>,jcmd=dump database <dbname> using config = '<configname>',days=<day1:day2..>,starttime=<hh:mm>"
sybadm> go
Example create database dump with "SMJDB" database name:
sybadm> sp_sjobcreate @name='DMP_SMJDB_SCH',@option="jname=DMP_SMJDB_JOB,jdesc=Nightly SMJDB dump at 22hrs,jcmd=dump database smjdb using config = 'dmpcfg_db',days=Monday:Tuesday:Wednesday:Thursday:Friday,starttime=10:00pm"
sybadm> go
Create transaction log dump with "SMJLOG" database name:
sybadm> sp_sjobcreate @name='DMPTX_SMJLOG_SCH',@option="jname=DMPTX_SMJLOG_JOB,jdesc=Hourly SMJLOG tran Dumps,jcmd=dump tran smjlog using config = 'dmpcfg_tx',starttime=06:00am,endtime=09:00pm,repeats=1hour,sproperties=continuous_run"
sybadm> go
To check the scheduled job:
smjadm> sp_sjobhelp @name='<schedulename>'
smjadm> go
Reference:
- SAP Snote
- SAP help
EmoticonEmoticon
Note: only a member of this blog may post a comment.