You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

HANA 1.0 SPS12下能否定时备份Delivery Unit或Calculation Views(CVs)

HANA 1.0 SPS12: Scheduled Backups for Delivery Units & Calculation Views

Hey there! Let's break down how to set up scheduled backups for your Delivery Units (DUs) and Calculation Views (CVs) in HANA 1.0 SPS12. While HANA doesn't have a built-in one-click scheduler specifically for these objects, you can absolutely automate the process using a mix of HANA's export commands and operating system-level task tools. Here's the step-by-step:

Scheduled Backup for Delivery Units

  1. Write an HDBSQL export script
    Start by creating a script that uses HDBSQL to export your target Delivery Unit. The core command looks like this:

    EXPORT DELIVERY UNIT "MY_TARGET_DU" TO '/hana/backup/du_backups' WITH OVERWRITE;
    

    Swap out MY_TARGET_DU with your actual DU name, and /hana/backup/du_backups with a directory the HANA database user has write access to.

  2. Automate with OS scheduling

    • On Linux: Use cron to schedule the script to run at your desired time. For example, to run daily at 2 AM, add this line to the crontab of a user with HDBSQL access:
      0 2 * * * /usr/sap/<SID>/HDB<INSTANCE>/exe/hdbsql -i <INSTANCE> -U <SECURE_USER_STORE_KEY> -f /path/to/du_export_script.sql
      
      (Pro tip: Avoid plaintext passwords by using HANA's secure user store (hdbuserstore) instead of hardcoding credentials.)
    • On Windows: Use Task Scheduler to create a task that runs a batch file executing the HDBSQL command at your chosen interval.

Scheduled Backup for Calculation Views

Calculation Views are tied to design-time packages, so the most reliable way to back them up is to export their parent package (this captures dependencies like underlying tables or functions too):

  1. Export the package via HDBSQL
    Use this command in your script:

    EXPORT PACKAGE "MY_CV_PARENT_PACKAGE" TO '/hana/backup/cv_backups' WITH OVERWRITE;
    

    Replace MY_CV_PARENT_PACKAGE with the package containing your Calculation Views.

  2. Schedule the script
    Follow the same OS scheduling steps as above (cron for Linux, Task Scheduler for Windows) to run this script on your preferred timeline.

Important Notes

  • Permissions: Make sure the user running the script has the EXPORT system privilege in HANA, plus write access to the export directory.
  • Validation: Add a quick check in your script (like verifying the exported file size) to alert you if a backup fails—this helps catch issues early.
  • Version Context: HANA 1.0 SPS12 is end-of-life, so while these methods work perfectly for your current setup, upgrading to a newer HANA version would give you access to more integrated backup tools and ongoing support.

内容的提问来源于stack exchange,提问作者Anirudh D

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 06:30:24