Entering content frame

 Class DBM 

Use

DBM is a class of the module sapdb.dbm. A single instance of this class corresponds to one connection to a DBM Server.

Class Content

The class DBM contains the following methods:

cmd (cmd_string)

rawCmd (cmd_string)

release ()

Definition of the Constructor

DBM (database_server = '', database_name = '', dependent_path = '', user_info = '')

 

Parameter

Description

database_server

Network name of the server to which you want to connect

The system default is the local server.

database_name

Name of the database instance to which you want to connect

This information is optional.

dependent_path

Installation path of the database software (see also: Variables)

This information is optional.

user_info

A string with the form <user name>,<password>

The specified user connects to the program DBM Server.

If there are multiple installations of the database software on your server, you can use the database_name and dependent_path parameters to control which version of the DBM Server program is started.

Case 1 – You want to create a new database instance with the latest software installation or you want to display information about the existing database instances and software versions.

Do not specify database_name or dependent_path.

The system then starts the DBM Server of the software installation with the highest version number.

Case 2 – You want to administer a specific database instance.

Specify database_name, but not dependent_path.

The system then starts the DBM Server that matches the specified database instance.

Case 3 – You want to create a new database instance with a specific software version.

Specify dependent_path, but not database_name.

The system then starts the DBM Server of the specified software installation.

Generating a connection object session to database TST on the current server:

session = sapdb.dbm.DBM ('', 'TST', '', 'DBM,DBM')

 

Generating a connection object session to the server remoteserver and selecting the DBM Server from the software installation in the directory /usr/local/sdb/7500:

session = sapdb.dbm.DBM ('remoteserver', '', '/usr/local/sdb/7500')

 

Generating a connection object session to the DBM Server of the latest software installation on the current server:

session = sapdb.dbm.DBM ('', '')

 

 

Leaving content frame