Skip to content

callProcedure ​

Command: callProcedure
Category: Developer Tools
Status: Production Ready

Description ​

Call a stored procedure and display the results. The command retrieves procedure metadata from the database, builds the appropriate input parameters based on the procedure signature, executes the stored procedure, and displays any output scalars and result sets returned by the procedure.

Syntax ​

bash
hana-cli callProcedure [schema] [procedure] [options]

Aliases ​

  • cp
  • callprocedure
  • callProc
  • callproc
  • callSP
  • callsp

Command Diagram ​

Parameters ​

Positional Arguments ​

ParameterTypeDescription
schemastringSchema containing the stored procedure (optional, defaults to **CURRENT_SCHEMA**)
procedurestringName of the stored procedure to call (optional if using --procedure)

Options ​

OptionAliasTypeDefaultDescription
--procedure--sp, -pstring-Stored procedure to call
--schema-sstring**CURRENT_SCHEMA**Schema containing the stored procedure
--profile-string-CDS Profile for connection

Connection Parameters ​

OptionAliasTypeDefaultDescription
--admin-abooleanfalseConnect via admin (default-env-admin.json)
--conn-string-Connection filename to override default-env.json

Troubleshooting ​

OptionAliasTypeDefaultDescription
--disableVerbose--quietbooleanfalseDisable verbose output - removes all extra output that is only helpful to human readable interface
--debug-dbooleanfalseDebug hana-cli itself by adding output of LOTS of intermediate details

Examples ​

Basic Usage ​

bash
hana-cli callProcedure --procedure myProc --schema MYSCHEMA

Executes the stored procedure myProc in the MYSCHEMA schema and displays the results.

See the Commands Reference for other commands in this category.

See Also ​