Skip to Content
avatar image
Former Member

How to schedule a job in HANA ?

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

7 Answers

  • Jun 17, 2014 at 09:28 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • May 10, 2012 at 06:46 AM

    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)

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • avatar image
    Former Member
    May 14, 2012 at 12:37 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 24, 2012 at 10:38 AM

    SAP HANA schedule the job in HANA

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 04, 2013 at 09:54 PM

    Maybe in SPS 08?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 18, 2014 at 02:47 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 13, 2014 at 10:37 PM

    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

    Add comment
    10|10000 characters needed characters exceeded