Entering content frame

Procedure documentation db_connect Locate the document in the library structure

Use

You open a session with the database with which you can transfer administrative commands as well as SQL statements to the database instance.

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

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

Prerequisites

·        You have the server authorization AccessSQL or AccessUtility.

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

·        The database instance is in the ONLINE operational state.

·        The Database Manager is in script mode or session mode (see Concepts of the Database System, Operating mode of Command Line Tools).

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 <value> are:

DBM: DBM user

DBA: database administrator

SAP: database user of the SAP application

Reply

OK

In the event of errors, see Reply Format

Example

Logging on to the Database Manager CLI as operator OLEG with the password MONDAY, connecting to the database instance DEMODB (creating the session mode in the Database Manager),

opening a database session as database operator MONA with password RED

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

dbmcli -u OLEG,MONDAY -d DEMODB

dbmcli on DEMODB>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'

...

 

 

Leaving content frame