CheckDatabase

Syntax

CheckDatabaseResult CheckDatabase(OdId tOb)

Parameters

tOb. Moniker of repository object that is database.

Description

The CheckDatabase operation checks connection to the DBMS server, which the database is set up to work with.

Comments

To execute the operation, in the tOb field specify moniker of the repository object that is a database. The object moniker can be obtained on executing the GetObjects operation.

The operation results in the connection check status.

Example

Below is the example of checking connection to the DBMS server, which the database is set up to work with. The request contains database moniker in the repository. The response contains whether connection was successful.

The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CheckDatabase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>GDDDOLIINILHGOAEPLFHMCEACBLGJGHEAKHGLPEKDKEIIJNJ!M!52</id>
  </tOb>
  </CheckDatabase>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<CheckDatabaseResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <status xmlns="">1</status>
  </CheckDatabaseResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CheckDatabase" :
{
"tOb" :
{
"id" : "GDDDOLIINILHGOAEPLFHMCEACBLGJGHEAKHGLPEKDKEIIJNJ!M!52"
}
}
}

JSON response:

{
"CheckDatabaseResult" :
{
"status" : "1"
}
}
public static CheckDatabaseResult CheckDatabase(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCheck = new CheckDatabase()
{
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
// Check database connection
var tResult = somClient.CheckDatabase(tCheck);
return tResult;
}

See also:

Working with Relational Objects of Repository