Troubleshooting
Use this guide to troubleshoot common hana-cli errors, verify fixes, and get back to work quickly. If you are just getting started, see the Installation Guide and Configuration Guide.
Quick Links
- Connection issues
- Command execution issues
- Data import issues
- Output & format issues
- Performance issues
- Language & localization
- Business Application Studio
- Getting help
- Tips & tricks
- MCP server issues
Common Issues & Solutions
Connection Issues
If you suspect a connection problem, start with a fast sanity check:
hana-cli status
hana-cli systemInfo --output basicCannot Connect to Database
Error: Error: Cannot connect to database
Solutions:
Verify credentials
bash# Check default-env.json exists and is valid JSON cat default-env.json | jq '.' # Or check environment variables echo $HANA_CLI_HOST $HANA_CLI_PORT $HANA_CLI_USEROn Windows (PowerShell):
powershellGet-Content .\default-env.json | ConvertFrom-Json "$env:HANA_CLI_HOST $env:HANA_CLI_PORT $env:HANA_CLI_USER"Test network connectivity
bash# Windows ping hana.example.com # Linux/Mac ping -c 3 hana.example.comVerify port is correct
- Standard SQL port: 30013 (or 30015 for cloud)
- Check with HANA administrators
Check firewall
- Ensure port is open to your machine
Connection Timeout
Error: Error: Connection timeout after 30000ms
Solutions:
Check network connectivity
- Ping HANA server
- Check for firewall rules
- Verify proxy settings if behind corporate proxy
Increase timeout
bashexport HANA_CONNECTION_TIMEOUT=60000 # 60 seconds hana-cli systemInfoOn Windows (PowerShell):
powershell$env:HANA_CONNECTION_TIMEOUT = 60000 hana-cli systemInfoCheck HANA service is running
- Contact HANA administrator
- Verify service status on HANA administrative web UI
SSL Certificate Error
Error: Error: self signed certificate
Solutions:
For development - SSL certificate validation is disabled by default in hana-cli, so self-signed certificates should work without additional configuration.
For production with trusted certificate - Use a trust store:
Via command line when connecting:
bashhana-cli connect -n host:port -u USER -p PASSWORD --trustStore /path/to/truststore.pemOr add to your
default-env.json:json{ "VCAP_SERVICES": { "hana": [{ "credentials": { "host": "hana.example.com", "port": 30015, "sslTrustStore": "/path/to/truststore.pem", "sslValidateCertificate": true } }] } }
Connection Configuration Not Found
Error: ❌ No Connection Configuration Found
Solutions:
Check the resolution order
default-env-admin.json(when--admin).cdsrc-private.json(CAPcds bind).envwithVCAP_SERVICES--conn <file>(current or parent dirs, then~/.hana-cli/)default-env.json(current or parent dirs)~/.hana-cli/default.json(last resort)
Validate the file you expect hana-cli to use
bash# Check JSON validity cat default-env.json | jq '.'If using CAP bindings
- Ensure
.cdsrc-private.jsonexists in the project or a parent directory - Run
cds bindand retry the command
- Ensure
Verify CDS bind connection
Check if
.cdsrc-private.jsonexists:bash# Windows dir .cdsrc-private.json # Linux/Mac ls -la .cdsrc-private.jsonValidate the binding configuration:
bash# Verify CDS can read the binding cds env get requires.db.credentials # Test the connection with hana-cli hana-cli systemInfo --debugIf bindings are missing or invalid:
bash# Re-create bindings from Cloud Foundry cds bind --to <service-instance-name> # Or bind to a local configuration cds bind --to <service-instance-name> --kind hana
Proxy or Corporate TLS Issues
Symptoms: TLS handshake failures, intermittent timeouts, or blocked ports
Solutions:
Confirm proxy settings
- Ensure your shell has proxy environment variables set if required by policy
Test raw connectivity
- Ping the host and verify the SQL port is reachable
Use trusted certificates
- Install the corporate CA certificate
- Use the
--trustStoreoption when connecting:hana-cli connect --trustStore /path/to/ca-cert.pem - Or add
sslTrustStoreto your connection configuration file
Verify proxy variables
Linux/macOS:
bashecho $HTTPS_PROXY echo $HTTP_PROXYWindows (PowerShell):
powershell$env:HTTPS_PROXY $env:HTTP_PROXY
Central Certificate Installation
Instead of adding certificates to each connection configuration, you can install them centrally for your entire environment. This approach is preferred for team/production setups as it avoids certificate duplication and makes onboarding easier.
Option 1: Local Environment Setup (Recommended)
Use the NODE_EXTRA_CA_CERTS environment variable to point Node.js to your corporate CA certificate bundle.
Windows (PowerShell):
# Set for current session only
$env:NODE_EXTRA_CA_CERTS = "C:\certs\company-ca.pem"
hana-cli systemInfo
# Set permanently (current user)
[Environment]::SetEnvironmentVariable("NODE_EXTRA_CA_CERTS", "C:\certs\company-ca.pem", "User")
# Or in Command Prompt
set NODE_EXTRA_CA_CERTS=C:\certs\company-ca.pem
hana-cli systemInfoLinux/Mac:
# Set for current session only
export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/company-ca.pem
hana-cli systemInfo
# Set permanently (add to ~/.bashrc or ~/.zshrc)
echo 'export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/company-ca.pem' >> ~/.bashrc
source ~/.bashrcPreparing your certificate file:
If you have multiple certificates or need to convert formats:
# Combine multiple PEM certificates
cat cert1.pem cert2.pem > company-ca.pem
# Convert .crt to PEM
openssl x509 -inform DER -in certificate.crt -out certificate.pem
# Extract certificate from .p12/.pfx
openssl pkcs12 -in certificate.p12 -cacerts -nokeys -out certificate.pemOption 2: Docker/Container Deployment
When deploying hana-cli or the included UI5 app in containers:
Dockerfile example:
FROM node:18
# Copy your company CA certificate
COPY company-ca.pem /etc/ssl/certs/company-ca.pem
# Set Node.js to use the certificate
ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/company-ca.pem
# Install hana-cli
RUN npm install -g hana-cli
# Your application setup
WORKDIR /app
COPY . .
RUN npm install
# Your command here
CMD ["hana-cli", "systemInfo"]Docker Compose example:
version: '3.8'
services:
hana-cli:
image: node:18
environment:
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/company-ca.pem
HANA_CLI_HOST: hana.example.com
HANA_CLI_PORT: 30015
HANA_CLI_USER: admin
HANA_CLI_PASSWORD: password
volumes:
- ./company-ca.pem:/etc/ssl/certs/company-ca.pem:ro
command: npx hana-cli systemInfoOption 3: Corporate/Proxy Environment
If your organization uses a corporate proxy or firewall with certificate inspection:
# 1. Get the corporate CA certificate from your IT team
# 2. Set it for Node.js (see Option 1 above)
# 3. Also configure npm if you need to install packages
npm config set cafile /path/to/company-ca.pem
# 4. Verify npm can reach the registry
npm pingIf you're behind a proxy that requires authentication:
# Configure npm proxy
npm config set proxy http://username:password@proxy.company.com:8080
npm config set https-proxy http://username:password@proxy.company.com:8080
# Then set CA certificate
npm config set cafile /path/to/company-ca.pemReference: Certificate Configuration Options
| Method | Use Case | Scope |
|---|---|---|
NODE_EXTRA_CA_CERTS env var | System-wide, all Node.js apps | All commands, all connections |
--trustStore flag | Single connection, one-off use | Current command only |
sslTrustStore in config | Persistent per connection | Stored in configuration file |
| Docker/Container volume mount | Containerized deployments | Container environment |
npm config set cafile | npm registry access | npm operations only |
See also:
- SSL Certificate Error - Per-connection certificate setup
- Proxy or Corporate TLS Issues - Troubleshooting TLS problems
Command Execution Issues
If a command fails unexpectedly, re-run it with debug output to capture context:
hana-cli <command> --debug --verboseOn Windows (PowerShell), you can capture output to a file for sharing:
hana-cli <command> --debug --verbose | Tee-Object -FilePath hana-cli-debug.logCommand Not Found
Error: hana-cli: command not found
Solutions:
Check available commands
bash# View all available commands hana-cli --helpReview the Commands documentation
- Visit the Commands documentation for a complete list of available commands and their usage
Verify command spelling
- Ensure you're using the correct command name (case-sensitive)
- Check for typos in the command name
Permission Denied
Error: EACCES: permission denied
Solutions:
Linux/Mac - Fix npm permissions
bashmkdir ~/.npm-global npm config set prefix '~/.npm-global' export PATH=~/.npm-global/bin:$PATH npm install -g hana-cliWindows - Run as Administrator
- Right-click PowerShell/CMD → Run as Administrator
Use sudo (not recommended)
bashsudo npm install -g hana-cli
@sap/cds-dk Not Installed (CAP Bind / CDS Features)
Symptoms: CAP binding errors, CDS preview failures, or messages indicating @sap/cds-dk is required
Solutions:
Install the CDS Development Kit globally
bashnpm install -g @sap/cds-dkVerify availability
bashcds --versionRe-run CAP binding
- From your CAP project root:
cds bind - Then retry your hana-cli command
- From your CAP project root:
BTP CLI Missing or Not Logged In
Symptoms: BTP-related commands fail or return no target/global account
Solutions:
Verify CLI is installed
bashbtp --versionLogin and target
- Run
btp login, then set the global account and subaccount
- Run
Confirm target
bashhana-cli btp
Cloud Foundry CLI Missing or Not Logged In
Symptoms: HANA Cloud instance queries return empty results or login errors
Solutions:
Verify CLI is installed
bashcf --versionLogin and target space
- Run
cf loginand target the correct org/space
- Run
Re-run the hana-cli command
- Commands like
hana-cli hcandhana-cli hdidepend on CF context
- Commands like
hdbsql Not Found
Symptoms: hana-cli hdbsql fails or hdbsql is not recognized
Solutions:
Install SAP HANA Client
- Ensure the HANA client package is installed for your OS
Verify PATH
bashhdbsql -versionRestart your terminal
- PATH changes often require a new shell session
Node.js Version Mismatch
Symptoms: startup failures, dependency install errors, or engines warnings
Solutions:
Verify your Node.js version
bashnode --versionUpgrade to the required version
- hana-cli requires Node.js 20.19.0 or later
- See the Installation Guide for platform-specific steps
Insufficient Privileges
Error: Error: Insufficient privileges for operation
Solutions:
Check user permissions
- User must have SELECT privilege on tables
- For admin operations, use --admin flag
Diagnose missing privileges
Use the SAP HANA system procedure to identify exactly which privileges are missing:
bashhana-cli callProcedure -s SYS -p GET_INSUFFICIENT_PRIVILEGE_ERROR_DETAILS --parameters GUIDReplace
GUIDwith the value from the original error message.This stored procedure will provide detailed information about missing authorizations and help guide your DBA in granting the correct privileges.
See SAP HANA Documentation for more details.
Use admin credentials
bashhana-cli schemaClone -s SOURCE -t TARGET --adminRequest permissions from DBA
- Contact SAP HANA administrator
- Provide the output from
GET_INSUFFICIENT_PRIVILEGE_ERROR_DETAILSprocedure - Ask for specific schema/table privileges
Data Import Issues
File Not Found
Error: Error: File not found: data.csv
Solutions:
Use absolute path
bashhana-cli import -n /full/path/to/data.csv -t TABLECheck file exists
bash# Windows dir data.csv # Linux/Mac ls -la data.csvCheck working directory
bash# Show current directory pwd # Linux/MacWindows (PowerShell):
powershellGet-Location
CSV Encoding Issues
Error: Error: Invalid character encoding
Solutions:
# Specify encoding
hana-cli import -n data.csv -t TABLE --encoding utf-8
# Convert file encoding
iconv -f ISO-8859-1 -t UTF-8 input.csv > output.csv
hana-cli import -n output.csv -t TABLEColumn Mismatch
Error: Error: Column mismatch at row X
Solutions:
Use name matching
bashhana-cli import -n data.csv -t TABLE -m nameCheck column names
bashhana-cli tables -s SCHEMA -t TABLEPrepare data file
- Ensure headers match table columns
- Use
--truncateif starting fresh - Preview table metadata with
hana-cli inspectTable --schema SCHEMA --table TABLE
Output & Format Issues
Output Format Error
Error: Error: Invalid output format
Solutions:
# Use supported formats
hana-cli export -s SCHEMA -t TABLE --output json
hana-cli export -s SCHEMA -t TABLE --output csv
hana-cli export -s SCHEMA -t TABLE --output textLarge Export Timeout
Error: Error: Operation timeout - export too large
Solutions:
Export in batches
bash# Limit rows hana-cli export -s SCHEMA -t TABLE --limit 10000 -o part1.csvUse pagination
bash# Export first 1000 rows hana-cli export -s SCHEMA -t TABLE --offset 0 --limit 1000 # Export next 1000 rows hana-cli export -s SCHEMA -t TABLE --offset 1000 --limit 1000Filter data
bashhana-cli export -s SCHEMA -t TABLE -w "STATUS='ACTIVE'" -o active.csv
Performance Issues
Slow Command Execution
Solutions:
Enable debug to see timing
bashhana-cli dataProfile -s SCHEMA -t TABLE --debugCheck table size and access patterns
bashhana-cli tableHotspots --schema SCHEMA --table TABLEInspect expensive tables
bashhana-cli inspectTable --schema SCHEMA --table TABLEUse limit for large tables
bashhana-cli export -s SCHEMA -t TABLE --limit 1000
High Memory Usage
Solutions:
Process in chunks
bashhana-cli export -s SCHEMA -t TABLE --batch-size 500Increase Node.js heap
bashnode --max-old-space-size=4096 $(which hana-cli) export ...On Windows (PowerShell):
powershellnode --max-old-space-size=4096 (Get-Command hana-cli).Source export ...
Language & Localization
Wrong Language Output
Solution: hana-cli uses your system locale settings. Change the locale using the appropriate method for your operating system.
Windows (PowerShell):
# View current locale
[System.Globalization.CultureInfo]::CurrentCulture
# You can also check Windows system language settings
# Settings > Time & Language > Language & regionWindows (Command Prompt):
# View current locale
chcpTo change the system locale on Windows, use Settings > Time & Language > Language & region or adjust regional settings through Control Panel.
Linux/Mac:
# Set for current session only
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
hana-cli systemInfo
# Set permanently (add to ~/.bashrc or ~/.zshrc)
echo 'export LANG=en_US.UTF-8' >> ~/.bashrc
echo 'export LC_ALL=en_US.UTF-8' >> ~/.bashrc
source ~/.bashrcAvailable locale examples:
en_US.UTF-8- English (United States)de_DE.UTF-8- German (Germany)es_ES.UTF-8- Spanish (Spain)fr_FR.UTF-8- French (France)ja_JP.UTF-8- Japanese (Japan)ko_KR.UTF-8- Korean (Korea)pt_PT.UTF-8- Portuguese (Portugal)zh_CN.UTF-8- Simplified Chinese (China)hi_IN.UTF-8- Hindi (India)pl_PL.UTF-8- Polish (Poland)
Business Application Studio (BAS)
This section covers troubleshooting tips specific to running hana-cli within SAP Business Application Studio (BAS), the cloud-native development environment integrated with SAP BTP.
hana-cli Not Found in BAS Terminal
Symptoms: Running hana-cli in the BAS integrated terminal returns "command not found" or similar error
Solutions:
Install hana-cli in the workspace
If hana-cli is not pre-installed in your BAS workspace, install it locally:
bashnpm install hana-cliThen run it via npx:
bashnpx hana-cli systemInfoInstall globally in the dev container (if using a custom dev container)
Edit your
.devcontainer/devcontainer.json:json{ "postCreateCommand": "npm install -g hana-cli" }Then rebuild the container in VS Code.
Verify the workspace has Node.js installed
bashnode --version npm --versionIf Node.js is not available, request a workspace with the necessary runtime environment from your BAS administrator.
CDS Binding Not Found in BAS
Symptoms: Error: ❌ No Connection Configuration Found when running commands in a CAP project
Solutions:
Ensure project uses
cds bind(recommended)In your CAP project root:
bash# List available service instances in your BTP subaccount cds add hana --ucap # Bind to a specific HANA instance cds bind --to my-hana-service-instanceThis creates
.cdsrc-private.jsonin your workspace with connection credentials.Verify
.cdsrc-private.jsonexistsbash# Check if the binding file exists ls -la .cdsrc-private.json # Validate it contains hana credentials cat .cdsrc-private.json | jq '.requires.db.credentials'Re-bind if credentials are stale
bash# Remove the old binding rm .cdsrc-private.json # Create a fresh binding cds bind --to my-hana-service-instance # Test the connection hana-cli statusCheck BTP service instance is accessible
Use BTP CLI to verify the service instance exists in your target subaccount:
bashbtp login btp target --subaccount <subaccount-ID> btp list services/instancesIf the instance is not listed, verify you have the correct subaccount targeted and the service instance hasn't been deleted.
Workspace Is Read-Only / Permission Denied Errors
Symptoms: EACCES: permission denied, EROFS: read-only file system, or file modification fails in BAS
Solutions:
Check workspace storage quota
In BAS, the workspace storage is limited. Run:
bash# Check disk usage df -h # Check workspace size du -sh ~If you're near quota, contact your BAS administrator to request increased storage.
Verify file permissions on imported data
If you imported CSV files or created configuration files outside BAS:
bash# Check current permissions ls -la data.csv # Fix if needed (Linux/Mac) chmod 644 data.csvWorkspace might be locked by another session
If multiple windows or sessions have the same workspace open:
- Close all other editor windows/tabs for this workspace
- Reload the current window: Press
F1→ search for "Reload Window"
Clear BAS cache if issues persist
- In BAS UI, go to File → Preferences → Settings
- Search for "Exclude Patterns" and ensure data directories are not excluded
- Restart the workspace
BAS Workspace Timeout During Long-Running Commands
Symptoms: Commands time out, connection drops, or commands don't complete in BAS terminal
Solutions:
Increase command timeout for long operations
Set environment variables in the BAS terminal:
bash# Increase connection timeout to 2 minutes export HANA_CONNECTION_TIMEOUT=120000 # For export operations with large datasets export HANA_QUERY_TIMEOUT=300000 # Then run your command hana-cli export -s SCHEMA -t LARGE_TABLE -o output.csvUse pagination for large exports instead of single operations
bash# Export in batches to avoid timeout hana-cli export -s SCHEMA -t LARGE_TABLE --offset 0 --limit 100000 -o part1.csv hana-cli export -s SCHEMA -t LARGE_TABLE --offset 100000 --limit 100000 -o part2.csvKeep BAS workspace active
The workspace may suspend idle sessions:
- Keep the terminal open and active
- Avoid leaving long-running commands unattended for extended periods
- Consider running large operations during off-peak hours if the system is heavily used
Check BAS network connectivity
If timeouts are frequent:
bash# Test network connectivity ping hana.example.com # Test DNS resolution nslookup hana.example.comIf connectivity is unstable, contact your network/BTP administrator.
Environment Variables Not Persisting in BAS Terminal
Symptoms: Environment variables set in one terminal session vanish in a new tab or after closing the terminal
Solutions:
Set variables persistently in
.bashrcor.zshrcAdd variables to your shell profile:
bash# Open or create ~/.bashrc cat >> ~/.bashrc << 'EOF' export HANA_CLI_HOST=hana.example.com export HANA_CLI_PORT=30015 export HANA_CLI_USER=myuser EOF # Source the file in current session source ~/.bashrcFor CAP projects, use
.envfileCreate a
.envfile in your project root (this persists across terminal sessions):bashHANA_CLI_HOST=hana.example.com HANA_CLI_PORT=30015 HANA_CLI_USER=myuser HANA_CLI_PASSWORD=mypasswordThen load it in your terminal:
bashsource .env hana-cli statusFor BAS workspace-wide settings, use workspace settings
Edit
.vscode/settings.jsonin your workspace root to document environment setup (for team reference):json{ "terminal.integrated.env.linux": { "HANA_CLI_HOST": "hana.example.com", "HANA_CLI_PORT": "30015" } }Then set secrets / passwords separately using BAS Secrets feature.
Git / Source Control Issues in BAS when using hana-cli
Symptoms: Adding configuration files to Git, credential leaks, or merge conflicts with generated files
Solutions:
Protect sensitive configuration files
Add connection config files to
.gitignore:bash# In your .gitignore default-env.json default-env-admin.json .env .cdsrc-private.json # Already done by CAP ~/.hana-cli/ # Home directory configsUse
.cdsrc-private.jsonfor credentials (handled by CAP) or CAP's config management for secrets.Commit only non-sensitive files
bash# Commit sample/template config without credentials git add .cdsrc-template.json git commit -m "Add sample CDS config template" # .cdsrc-private.json with credentials is git-ignoredResolve merge conflicts in package-lock.json
If two developers run
npm installand conflict:bashnpm install git add package-lock.json git commit -m "Resolve package-lock merge conflict"
Default HANA Connection Not Detected in CAP Project
Symptoms: hana-cli works outside a CAP project but fails inside, returning connection not found errors
Solutions:
Verify CAP project structure
A valid CAP project contains
package.jsonwith@sap/cdsdependency and adb/orsrv/folder:bashls -la package.json db/ srv/Check
.cdsrc-private.jsonis in the project rootbash# Should be at project root level, not in subdirectories ls -la .cdsrc-private.json cat .cdsrc-private.json | jq '.requires.db.credentials'Ensure CDS finds the binding
bash# Verify CDS can read the binding cds env get requires.dbIf this returns undefined, re-run
cds bind.If using a workspace with multiple projects, specify the project
Navigate to the correct CAP project directory before running hana-cli:
bashcd my-cap-project/ hana-cli systemInfo
Connection Credentials Exposed in BAS Terminal Output
Symptoms: Terminal history shows connection passwords, API tokens, or other credentials
Solutions:
Clear terminal history
bash# Clear current terminal output clear # Or use history management history -c # Clear history (bash)Use secure environment variable assignments
Instead of typing passwords on the command line:
bash# Prompt for password (not visible in history) read -sp "Enter HANA password: " HANA_CLI_PASSWORD export HANA_CLI_PASSWORD # Use with hana-cli hana-cli systemInfoLeverage BAS Secrets for credentials
BAS provides a secure secrets management feature:
- Access Settings → Secrets in BAS
- Store sensitive values there instead of in files or env vars
- Reference them in your configuration as needed
Use
.cdsrc-private.jsoninstead of command-line parametersCredentials in files stay out of shell history:
bash# Good - credentials in .cdsrc-private.json (git-ignored) cds bind --to my-hana-service-instance hana-cli status # Avoid - passwords visible in command history hana-cli status -n myhost -p mypassword
BAS and Docker / Dev Container Issues
Symptoms: hana-cli works on local machine but fails in BAS dev container setup, or dev container won't start
Solutions:
Ensure dev container includes Node.js
In
.devcontainer/devcontainer.json:json{ "image": "mcr.microsoft.com/devcontainers/javascript-node:18", "postCreateCommand": "npm install -g hana-cli @sap/cds-dk" }Rebuild dev container after changes
- Press
F1in BAS - Search for "Dev Containers: Rebuild and Reopen in Container"
- Wait for container to rebuild
- Press
Check Volume Mounts
If workspace files aren't visible in the container:
json{ "mounts": [ "source=${localEnv:HOME}${localEnv:USERPROFILE}/.hana-cli,target=/root/.hana-cli,type=bind" ] }Forward HANA connection through BAS network
If HANA is on a private network, ensure BAS has connectivity:
bash# Inside container, test connectivity ping hana.example.com nc -zv hana.example.com 30015
Performance Issues in BAS
Symptoms: Commands run slowly, output is delayed, or UI becomes unresponsive during operations
Solutions:
Check available memory and CPU in workspace
bash# Check memory free -h # Check CPU info nprocLimit output verbosity for large results
bash# Instead of full debug output hana-cli export -s SCHEMA -t TABLE -o data.csv # Avoid excessive logging hana-cli export -s SCHEMA -t TABLE -o data.csv # without --debugUse pagination and filters to reduce data transfer
bash# Reduce output size hana-cli export -s SCHEMA -t TABLE --limit 1000 -o sample.csvClose unused editor tabs and extensions
The BAS UI consumes resources; closing unused windows frees memory for CLI operations.
Getting Help
Check Documentation
Command help
bashhana-cli <command> --helpSearch documentation
Knowledge base
bashhana-cli kb search "your topic"
Enable Debug Output
hana-cli <command> --debug --verboseCheck Logs
Windows (PowerShell):
# Set log level
$env:HANA_LOG_LEVEL = "debug"
# View logs
Get-Content $env:HANA_LOG_FILEWindows (Command Prompt):
# Set log level
set HANA_LOG_LEVEL=debug
# View logs
type %HANA_LOG_FILE%Linux/Mac:
# Set log level
export HANA_LOG_LEVEL=debug
# View logs
cat $HANA_LOG_FILEReport Issues
- GitHub Issues
- Include: error message, command executed, environment details - also consider using the command
hana-cli issueto automatically gather and format information for you.
MCP Server Issues (Quick Checks)
If you are using the Model Context Protocol (MCP) server integration, run these quick checks first:
Verify the MCP server is installed
bashcd mcp-server npm installStart the MCP server in debug mode
bashnpm run dev -- --debugValidate CLI connectivity separately
bashhana-cli status hana-cli systemInfo --output basic
For full MCP troubleshooting, see MCP Server Issues.
Tips & Tricks
Test Your Connection
# Simple connectivity test
hana-cli systemInfo
# More detailed diagnostics
hana-cli systemInfo --debugDry Run
# Most write operations support --dry-run
hana-cli import -n data.csv -t TABLE --dry-runBatch Operations Script
#!/bin/bash
set -e # Exit on error
for file in data/*.csv; do
echo "Processing $file..."
hana-cli import -n "$file" -t TABLE || echo "Failed: $file"
done