Skip to content

users ​

Command: users
Category: Connection & Auth
Status: Production Ready

Description ​

Get a list of all database users with basic information including username, usergroup, creator, and creation time. Use this command to discover available users, audit user accounts, or find users matching specific patterns.

Syntax ​

bash
hana-cli users [user] [options]

Aliases ​

  • u
  • listUsers
  • listusers

Command Diagram ​

Parameters ​

Positional Arguments ​

ParameterTypeDescription
userstringUser filter pattern (supports SQL LIKE wildcards)

Filter Options ​

OptionAliasTypeDefaultDescription
--user-ustring*Filter by user name pattern (supports SQL LIKE wildcards like % and _)
--limit-lnumber200Maximum number of users to return

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

For a complete list of parameters and options, use:

bash
hana-cli users --help

Examples ​

Basic Usage ​

bash
hana-cli users

List all users in the database (up to 200 users by default). Displays username, usergroup, creator, and creation time.

Filter by Specific User ​

bash
hana-cli users --user SYSTEM

Display information for a specific user.

Using Pattern Matching ​

bash
hana-cli users --user "DB%"

Find all users whose names start with "DB" using SQL LIKE pattern matching.

List Users with Higher Limit ​

bash
hana-cli users --user "*" --limit 500

List up to 500 users.

Find Technical Users ​

bash
hana-cli users --user "%_SYS_%"

Find all system/technical users containing "SYS" in their name.

Wildcard Patterns ​

This command supports SQL LIKE patterns:

  • % - Matches any sequence of characters (zero or more)
  • _ - Matches exactly one character
  • * - Default wildcard, matches all users

Pattern Examples ​

  • SYSTEM - Exact match
  • DB% - Starts with "DB"
  • %ADMIN - Ends with "ADMIN"
  • %USER% - Contains "USER"
  • DEV_____ - Starts with "DEV" followed by exactly 5 characters

See the Commands Reference for other commands in this category.

See Also ​