Entering content frame

Procedure documentation Opening a Database Session Locate the document in its SAP Library structure

Use

You open a session with the database instance as a database user in which you can transfer both administrative commands and SQL statements to the database instance.

The database session is linked with a user task of the database instance.

Log on to the database by using your user name and passwort or your user type. If you do not specify a database user, the first DBM operator registered on the database server will be logged on.

Prerequisites

·        You have the server authorizations AccesSQL or AccessUtility.

·        You have the server authorizations required to execute the commands and statements.

·        The operational state of the database instance is ONLINE.

·        You work with the Database Manager in script mode or in session mode.

Syntax

db_connect [<database_user>,<database_user_password> | user-type=<value>]

<value> ::= DBM | DBA | SAP

Options

Option

Description

<database_user>

Name of the database user

<database_user_password>

Password of the database user

<user_type>

Possible values are:

DBM (first DBM operator)
DBA (database administrator)
SAP (special database user in connection with SAP applications)

Example

Logging on to the Database Manager CLI as operator DBM with password DBM, connecting to the database instance HOTELDB (log on in session mode),

opening a database session as database operator MONA with passwort RED

executing the SQL statment for displaying the contents of the CUSTOMER table:

dbmcli –d HOTELDB –u DBM,DBM

dbmcli on HOTELDB> db_connect MONA,RED

OK

db_execute SELECT * FROM customer

OK

END

3000;'Mrs';'Jenny';'Porter';'10580';'1340 N.Ash Street, #3'

3100;'Mr';'Peter';'Brown';'48226';'1001 34th Str., APT.3'

3200;'Company';(null);'Datasoft';'90018';'486 Maple Str.'

3300;'Mrs';'Rose';'Brian';'75243';'500 Yellowstone Drive, #2'

3400;'Mrs';'Mary';'Griffith';'20005';'3401 Elder Lane'

...

Reply

OK

In the event of errors, see Reply Format.

 

Leaving content frame