Procedure documentationLogging On to a Database Locate this document in the navigation structure

 

To use the SQLCLI interactively (in session mode), you log on to the database as a database user. This opens a database session.

Prerequisites

The specified user is a database user.

More information: Database Administration, Database Users

Procedure

One Step Logon

Enter the following command:

sqlcli [<options>] -d <database_name> -u <database_user>,<database_user_password>

Property

Description

<options>

Call options for SQLCLI

More information: Overview of All SQLCLI Call Options

<database_name>

Database Name

<database_user>

Name of the database user

More information: Database Administration, Conventions for User Names and Passwords

<database_user_password>

Password of the database user

Example Example

One step logon to the DEMODB database on the PARMA computer as database user MONA with the password RED.

sqlcli -n PARMA -d DEMODB -u MONA,RED

End of the example.

To log on using a <user_key>, enter the following command:

sqlcli [<options>] -U <user_key>

More information: XUSER documentation

Two Step Logon
  1. Start SQLCLI:

    sqlcli [<options>]

  2. Log on to the database:

    \c [<options>] -d <database_name> -u <database_user>,<database_user_password>