cancel
Showing results for 
Search instead for 
Did you mean: 

How to schedule a job in HANA ?

Former Member
0 Kudos

Hi Experts,

I would like to know, how can we schedule the job in HANA which deletes the data via SQL script ?

Thanks & regards,

Jomy

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi Jomy,

I have recently post a blog entry explaining how to schedule HANA job from SAP BW.  It may help

How to schedule SAP HANA procedures by using SA... | SCN

Former Member
0 Kudos

Hi Jomy,

HANA has a feature called "Scheduling XS Jobs". Scheduled jobs define recurring tasks that run in the background. The JavaScript API $.jobs allows developers to add and remove schedules from such jobs.

The xsjob file enables you to run a service (for example, an XS JavaScript or an SQLScript) at a scheduled

interval.

Please refer to section 8.7  Scheduling XS Jobs of HANA Developer Guide (http://help.sap.com/hana/SAP_HANA_Developer_Guide_en.pdf). The guide has clear example in detail how to schedule a job.

Hopefully, this topic can help your issue.

Best regards,

Hieu

0 Kudos

Hi Experts ,

It's a nice thread .  Do we have the scheduling functionality in SAP HANA SP7 or SP8 . Just eager to know why

this functionality does not exist . Is this because in HANA data is stored only once and all the views on the fly ..No Data redundancy?

But there are still some requirements where we need to store the data more than once in case of Inventory calculation where we need to go back and check the inventory status,dates etc.

Is this scheduling available ( like Info Package & DTP in BW)  in SP7 or SP8  .Can any experts comment on this .

Regards

Ramakrishnan Ramanathaiah

Former Member
0 Kudos

Maybe in SPS 08?

Former Member
0 Kudos

Even if there are features in SP08, I still think you need an interface with 3rd party tool. SAP Need to certified it with third party scheduling tool. I am sure many customers don't just use SAP Scheduling tool. Some customer might like to be able to use auto-sys to call the script. So, in short, SAP need to certified Vendors for executing of script on HANA database just like the Backup vendors.

Regards,


SS

Former Member
0 Kudos

For all modern RDBMS (Oracle, MS SQL, Sybase ASA, ASE, IQ, etc)

internal jobs manager is not a problem - why for HANA it must be a super P (problem)?

Former Member
0 Kudos

Mikhail, it is not just scheduling so simplistic. You have to look at things in a holistic manner.  SAP system(s) do have schduling capability to schedule jobs that run on SAP system(s) itself like for example SAP ECC. Why do you think many companies used tool like autosys to schdule job? There must be a reason right? Like job dependencies or for big Enterprises, they might want to have standard tool to do all the scheduling with that tool with all the alerts all in one place. You have to look at a high level not just what is one level. That is why there are chaos in organization where you have the DB scheduling tool, OS scheduling tool, application schduling tools instead of one standard scheduling tool to do it all. That is my take. I am not saying that having the scheduling on HANA is a problem. It is a start but we have to have a long-term view. Many companies demand that. When I first work for SAP consulting doing SAP HANA there were no backup tool and slowly SAP is certifying vendor(s) for it because we all contribute to ask for it to make the product better as customers who already have standard will demand it.

Former Member
0 Kudos

Stephen,

I am prefer BMC Control-M instead autosys for Enterprise scheduling.

Do not make usual things is to complicated. Not everyone have enough money, experience and vision for this 3rd party scheduling packages.

From HANA DBMS we need couple basic things - Jobs API (Server side), Jobs Client (in HANA Studio - for scheduling, and monitoring).  With HANA Jobs API you can connect and certify all 3rd party schedulers.

Nothing new.

Something like dbms_job in Oracle.

Former Member
0 Kudos

Mikhail, not making things complicated. Just stating the facts about adhering to some sort of standard within an organization. Do you think corporations who have been using autosys will change to BMC Control-M or vice-versa? Fat chance. They all have their niche. Corporations who have used scheduling tool  will not changed unless there is a used case. Just like why used different DB? Why not just used Oracle DB instead of SAP HANA? Because there is a use case and because business demands it. Corporation(s) have used case, there is no love-hate relationship. It is business requirements that drives the need not technology. Standard my friend not disparate tools, applications or systems all over the place is what I am trying to point out. Why should I used three different tool to do things where I can do all three things with one tool? and sometimes the tool offered is limited like alerts, monitoring, notification of job when dependencies failed. Yeah... you can write API, why? You are small company right? What if the guy who write the code quit and don't maintain documentation? Worse still, if he used 3rd party open source where no one in the organzation know how to use. You see the nightmare I am talking about? I rest my case.

Regards,


SS

Former Member
0 Kudos

How this correlated with this topic?

Are you working at SAP?

What is your propose about HANA jobs management?

Former Member
0 Kudos

SAP HANA schedule the job in HANA

https://cw.sdn.sap.com/cw/ideas/11359

Former Member
0 Kudos

Jomy, you will have to write SQL scripting on the Linux level. You have to experiment with the SQL command.

richard_bremer
Advisor
Advisor
0 Kudos

Hi Jomy,

HANA itself does not offer scheduling of tasks. However, you can for example use the hdbsql command line tool (see the HANA Database Administration Guide on http://help.sap.com/hana_appliance for details) to execute SQL in HANA. That tool can be called for example from Shell scripts and read the statements to execute from a text file. Such scripts can then be scheduled using standard OS tools such as the cron daemon in Linux.

You can also schedule jobs in DataServices - and again, such jobs can execute more or less any SQL in HANA. See the standard documentation on DataServices for details on how to schedule jobs there.

For deleting data, I don't see a reason to use SQLScript, plain SQL should normally do the job. If you do require SQLScript (so I assume you know what you plan do do and know SQLScript) see for example the HANA Development guide available in the SAP Library at http://help.sap.com/hana_appliance for details on how to create a SQL Script procedure that is write enabled.

Kind regards,

Richard

--

Dr. Richard Bremer

SAP AG, Customer Solution Adoption (CSA)

Former Member
0 Kudos

> HANA itself does not offer scheduling of tasks.

Must have features for any enterprise level db-management server.

Hope developers add this feature in SP04.

Former Member
0 Kudos

Hope developers add this feature in SP05  

Former Member
0 Kudos

Hi Mihail, you have to look at the SQL reference guide and write a script yourself to delete data from the HANA database. It deosn't matter if it is SP05 or SPxxx infinity. This has to be company based. This is not an easy stuff. The HANA database has to be guarded carefully by all means. The user should only be granted access to the table he owned and in HANA there are security access - Read (select) and  write (update, insert, delete...) that can be granted to the user in order that they can perform the job.