DBM is a class of the sapdb.dbm module. An instance of this class corresponds to a connection to a DBM Server.
The DBM class contains the following methods:
DBM (database_server = '', database_name = '', dependent_path = '', user_info = '')
Parameter |
Description |
database_server |
Network name of the computer that is to be connected. The default system value is the local computer. |
database_name |
Name of the database instance that is to be connected. This information is optional. |
dependent_path |
Installation path of the database software (See also: Directory Structure) This information is optional. |
user_info |
A string in the format <username>,<password> The specified user logs on to the DBM Server program. |
If there are multiple installations of the database software on your computer, 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 that has the highest version number.
Case 2 – You want to administer a specific database instance.
Specify database_name, but do not specify dependent_path.
The system then starts the DBM Server that corresponds to the specified database instance.
Case 3 – You want to create a new database instance for a specific software version.
Specify dependent_path, but do not specify database_name.
The system then starts the DBM Server of the specified software installation.
To generate a session connection object on the current computer for the TST database, specify the following:
session = sapdb.dbm.DBM ('', 'TST', '', 'DBM,DBM')
To generate a session connection object for the remoteserver computer and choose the DBM Server of the software installation located in the /usr/local/sdb/7500 directory, specify the following:
session = sapdb.dbm.DBM ('remoteserver', '', '/usr/local/sdb/7500')
To create a session connection object on the current computer for the DBM Server of the current software installation:
session = sapdb.dbm.DBM ('', '')