agentleFS
williamcorrea23williamcorrea23/sap-router-skill/.agents/skills/sap-hana-cli/SKILL.md

sap-hana-cli

Skill1 starsChanged 4 months agoMITView on GitHub

SAP HANA CLI and Database Explorer — hdbsql command-line tool, HANA Database Explorer in BAS, SQL console, catalog browser, security manager, trace configuration, backup management. Use when accessing HANA via command line, running SQL queries against HANA, or managing HANA database artifacts.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

SAP HANA CLI and Database Explorer

Command-line and browser-based tools for HANA database operations.

hdbsql CLI

# Interactive mode
hdbsql -n <host>:<port> -u <user> -p <password>

# Execute SQL file
hdbsql -n localhost:30015 -u SYSTEM -p Passw0rd -I my_script.sql

# Query from command line
hdbsql -n localhost:30015 -u SYSTEM -p Passw0rd \
  "SELECT * FROM MARA WHERE MATNR = 'MAT001'"

# Export CSV
hdbsql -n localhost:30015 -u SYSTEM -p Passw0rd \
  -o output.csv -c ";" \
  "SELECT * FROM MARA"

HANA Database Explorer (BAS)

BTP → Dev Space → SAP HANA Database Explorer
├── Catalog Browser — Tables, Views, Procedures
├── SQL Console — Execute SQL queries
├── Security Manager — Users, Roles, Privileges
├── Trace Configuration — SQL traces, performance
└── Data Preview — Browse table contents

SQL Console Tips

-- Execute with F8
-- Use : for parameter substitution
SELECT * FROM MARA WHERE MATNR = :matnr;

-- Explain plan (Ctrl+Shift+X)
SELECT * FROM MARA WHERE MATNR = 'MAT001';

-- View execution plan in Plan Visualizer tab

Backup and Recovery

# Backup via hdbsql
hdbsql -n localhost:30015 -u SYSTEM -p Passw0rd \
  "BACKUP DATA USING FILE ('/backup/hana_backup')"

# Recovery
hdbsql -n localhost:30015 -u SYSTEM -p Passw0rd \
  "RECOVER DATA USING FILE ('/backup/hana_backup')"

Gotchas

  • Port 30015 for single-tenant; 30013 for multi-tenant (system DB)
  • HANA DB Explorer only available in BAS dev spaces with HANA tools extension
  • hdbsql on Windows may need full path: C:\Program Files\sap\hdbclient\hdbsql.exe
  • Password visible in hdbsql command line — use secure storage instead

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.