SAP BTP Integration
Integration with SAP Business Technology Platform for cloud database management.
Overview
HANA CLI includes commands to manage SAP HANA on SAP BTP and SAP Business Technology Platform resources.
BTP CLI Requirement
All BTP-related functionality requires the SAP BTP Command Line Interface to be installed.
Installation
Linux / macOS:
bash
# Use provided script
./install-btp.sh
# Or manual
curl -sL https://github.com/SAP-samples/btp-cli-Linux/releases/latest/download/btp -o ~/btp
chmod +x ~/btp
sudo mv ~/btp /usr/local/bin/
btp --versionWindows:
Download from GitHub and run installer.
BTP Commands
Global Account Management
bash
# List global accounts
hana-cli globalAccounts
# List directories in account
hana-cli directories
# List subaccounts
hana-cli subaccountsHANA Service Management
bash
# List HANA service instances
hana-cli hanaServiceInstances
# Get specific instance details
hana-cli hanaServiceInstances -i INSTANCE_ID
# Create new HANA instance
hana-cli createHANAService --name my-hana --plan standard
# Delete HANA instance
hana-cli deleteHANAService --name my-hanaEntitlements & Quotas
bash
# Check entitlements
hana-cli entitlements
# Request entitlements
hana-cli requestEntitlement --service hana --plan standard --quantity 1
# Assign entitlements
hana-cli assignEntitlement --subaccount SUB_ID --plan standardIntegration Workflows
Connect to BTP HANA Service
List available services:
bashhana-cli hanaServiceInstancesGet connection details:
bashhana-cli getServiceBinding --service-instance MY_HANASave credentials locally:
bashhana-cli connect -d <host> -u <user> -p <password> -sUse HANA CLI normally:
bashhana-cli tables
Deploy with HANA on BTP
Create new HANA service:
bashhana-cli createHANAService --name prod-db --plan standardWait for provisioning:
bashhana-cli hanaServiceInstances -i prod-dbGet connection info:
bashhana-cli getServiceBinding --service-instance prod-dbUse in application:
- Connection string stored in
VCAP_SERVICES - HANA CLI auto-detects for local development
- App uses same
default-env.json
- Connection string stored in
