## db_connect

### Use

You open a session with the database with which you can execute DBM commands and also transfer SQL statements to the database instance.

You can log on with the user name and password of a database user or with a user type. If you do not specify a database user, the data of the first DBM operator registered on the database computer is used to log on.

The database session is linked with a user task of the database instance. You can configure the maximum number of simultaneous database sessions possible using the value of the general database parameter MAXUSERTASKS.

See also:

Database Administration Tutorial, Backup, Restoring the Database Instance, Executing a Succession of Database Statements

Glossary, Database Session

### Prerequisites

● You have the server authorization AccessSQL or AccessUtility.

● You have the server authorizations required to execute SQL statements in the database instance.

● The database instance is in the ONLINE operational state.

● You are working in the script mode or the session mode of the Database Manager CLI.

### Syntax

sql_connect <user_identification>

<user_identification> :: = <user_spec> | <user_type>

<user_spec> :: = <database_user>,<database_user_password>

<user_type> :: = user-type=<value>

Options

Option | Description
<database_user> | Name of the database user
<database_user_password> | Password of the database user
user-type=<value> | User type, possible values for <value> are: DBM: DBM operator DBA: database system administrator SAP: database user of the SAP application

### Reply

OK

In the event of errors, see Reply Format.