 
 |
You Are Here: SAP DB > 7.3 > Interfaces > repman (Python)
SAP DB is now SAP MaxDB! For more information, visit the SAP MaxDB pages in the SAP Developer Network.
Module repman (Python)
Module Contents class RepMan
- RepMan: Opens a connection.
- cmd: Executes a command and returns resulting buffer as a string.
- rawCmd; Executes a command and returns resulting
buffer as a string without checking for errors.
- sql: Executes an SQL statement and returns the error code.
- release: Closes the connection.
Installation
Examples
Exceptions
class RepMan
constructor RepMan
session, result = newRepMan = repman.RepMan (server_node, database_name)
Opens a connection. An empty server node will search for a REPM Server on the local machine.
cmd
output = session.cmd (cmd)
Executes a command and returns resulting buffer as string. Any error will result in an exception.
For the format of the paramter $cmd please see the documentation of the
Replication Manager.
rawCmd
output = session.rawCmd (cmd)
Executes a command and returns resulting buffer as string without checking for errors.
For the format of the paramter $cmd please see the documentation of the
Replication Manager.
sql
result = session.sql (cmd)
Executes an SQL statement and returns the error code. This method does not raise an exception
unless an error occurs that is not related to this SQL statement.
release
session.release ()
Closes the connection.
Installation
Copy the file <dependent_path>/misc/repmanmodule.so
(in Windows NT: <dependent_path>/misc/repman.pyd) to a directory that can be found by the
Python interpreter, e.g. a directory in PYTHONPATH.
Examples
Examples for all methods: egRPM.py
Exceptions
- CommunicationError:
The communication link to the server failed. The exception value is
an instance with the following attributes:
- errorCode
- message
- RepManServError
- RepManServError:
The execution of the command on the server resulted in an error. The exception
value is an instance with the following attributes:
- errorCode
- message
- sqlCode (when an SQL statement failed)
- sqlMessage (when an SQL statemen failed)
|
|
|