Entering content frame

Function documentation Method connect Locate the document in the library structure

Use

connect is a method of the sdb.dbapi module.

You use this method to open a database session.

Prerequisites

The database instance is in the ONLINE operational state.

Features

connect (user, password, database, host ='', **config)

 

user

Name of the database user

password

Password of the database user

Note

Note that the password is case-sensitive. See Concepts of the Database System, Structure linkConventions for User Names and Passwords

config

     autocommit

on | off

AUTOCOMMIT mode

     sqlmode

internal | oracle

SQL mode

     isolation

0 | 1 | 2 | 3 | 10 | 15 | 20 | 30

Isolation level

     timeout

<integer>

Command timeout in seconds

Result

     Successful execution: object of the class sdb.dbapi.Connection.

     Error: exception of the class sdb.dbapi.Error.

For more information, see the Python Database API specifications V2.0 at www.python.org.

Example

session = sdb.dbapi.connect ('MONA', 'RED', 'DEMODB', '', autocommit = 'off', sqlmode= 'oracle', isolation = 1, timeout = 90)

 

Leaving content frame