feat(hanatool): Add path discovery for hdbsql
This commit is contained in:
19
hanatool.sh
19
hanatool.sh
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Version: 1.5.5
|
||||
# Version: 1.5.6
|
||||
# Author: Tomi Eckert
|
||||
# ==============================================================================
|
||||
# SAP HANA Schema and Tenant Management Tool (hanatool.sh)
|
||||
@@ -8,7 +8,22 @@
|
||||
# ==============================================================================
|
||||
|
||||
# --- Default Settings ---
|
||||
HDBSQL_PATH="/usr/sap/hdbclient/hdbsql"
|
||||
# Define potential HDB client paths
|
||||
HDB_CLIENT_PATH_1="/usr/sap/hdbclient"
|
||||
HDB_CLIENT_PATH_2="/usr/sap/NDB/HDB00/exe"
|
||||
|
||||
# Determine the correct HDB_CLIENT_PATH
|
||||
if [ -d "$HDB_CLIENT_PATH_1" ]; then
|
||||
HDB_CLIENT_PATH="$HDB_CLIENT_PATH_1"
|
||||
elif [ -d "$HDB_CLIENT_PATH_2" ]; then
|
||||
HDB_CLIENT_PATH="$HDB_CLIENT_PATH_2"
|
||||
else
|
||||
echo "❌ Error: Neither '$HDB_CLIENT_PATH_1' nor '$HDB_CLIENT_PATH_2' found."
|
||||
echo "Please install the SAP HANA client or adjust the paths in the script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HDBSQL_PATH="${HDB_CLIENT_PATH}/hdbsql"
|
||||
COMPRESS=false
|
||||
THREADS=0 # 0 means auto-calculate later
|
||||
DRY_RUN=false
|
||||
|
||||
Reference in New Issue
Block a user