EditDatabase

Syntax

DatabaseResult EditDatabase(OdId tOb)

Parameters

tOb. Moniker of repository object that is database.

Description

The EditDatabase operation opens database settings for edit.

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 moniker of opened database instance and the obtained settings. Further work with the opened database instance is executed using the GetDadatabase and SetDatabase operations.

Example

Below is the example of opening database settings for edit. The request contains database moniker in the repository. The response contains the moniker of database instance opened for edit and its basic settings.

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">
<EditDatabase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>GDDDOLIINILHGOAEPLFHMCEACBLGJGHEAKHGLPEKDKEIIJNJ!M!52</id>
  </tOb>
  </EditDatabase>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<EditDatabaseResult 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">
<id xmlns="">
  <id>GDDDOLIINILHGOAEPLFHMCEACBLGJGHEAKHGLPEKDKEIIJNJ!M!S!DBIALLMOIINILHGOAECHBKDNKMKACIHBJEKJCOGGHCHELNAFOP</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="3" hf="0">
  <i>DB</i>
  <n>Database</n>
  <k>52</k>
  <c>513</c>
  <p>712</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
<connectionParams>
  <useMetabaseLogonData>1</useMetabaseLogonData>
  <user>WAREHOUSE</user>
  <pass>1</pass>
<logonDataExt>
  <driver>POSTGRES</driver>
  <server>10.10.10.10</server>
  <database>WAREHOUSE</database>
  <schema>public</schema>
  <unicode>1</unicode>
  <authentication>Password</authentication>
  <caseSensitive>0</caseSensitive>
  <useGSSAPI>0</useGSSAPI>
  <KerberosServiceName />
  <sslMode>2</sslMode>
  <serverCursorsDisabled>0</serverCursorsDisabled>
<logonTask>
<obDesc ds="" isShortcut="0" isLink="0" ver="6" hf="0">
  <i>PREPARE_DB</i>
  <n>Prepare connection</n>
  <k>134</k>
  <c>1537</c>
  <p>51</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </obDesc>
  <subName>PrepareDB.OnDBConnecting</subName>
  </logonTask>
  <webServiceLogon>0</webServiceLogon>
  </logonDataExt>
  <useUnicode>0</useUnicode>
  <loginPrompt>0</loginPrompt>
  <useMetabaseCredentials>1</useMetabaseCredentials>
  <autoAdjustRights>1</autoAdjustRights>
  <useApplicationRole>0</useApplicationRole>
  <supportDecimal>0</supportDecimal>
  <supportBinaryProtocol>1</supportBinaryProtocol>
  </connectionParams>
  </meta>
  </EditDatabaseResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

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

JSON response:

{
"EditDatabaseResult" :
{
"id" :
{
"id" : "GDDDOLIINILHGOAEPLFHMCEACBLGJGHEAKHGLPEKDKEIIJNJ!M!S!DBIALLMOIINILHGOAECHBKDNKMKACIHBJEKJCOGGHCHELNAFOP"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "3",
"@hf" : "0",
"i" : "DB",
"n" : "Database",
"k" : "52",
"c" : "513",
"p" : "712",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"connectionParams" :
{
"useMetabaseLogonData" : "1",
"user" : "WAREHOUSE",
"pass" : "1",
"logonDataExt" :
{
"driver" : "POSTGRES",
"server" : "10.10.10.10",
"database" : "WAREHOUSE",
"schema" : "public",
"unicode" : "1",
"authentication" : "Password",
"caseSensitive" : "0",
"useGSSAPI" : "0",
"KerberosServiceName" : "",
"sslMode" : "2",
"serverCursorsDisabled" : "0",
"logonTask" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "6",
"@hf" : "0",
"i" : "PREPARE_DB",
"n" : "Prepare connection",
"k" : "134",
"c" : "1537",
"p" : "51",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"subName" : "PrepareDB.OnDBConnecting"
},
"webServiceLogon" : "0"
},
"useUnicode" : "0",
"loginPrompt" : "0",
"useMetabaseCredentials" : "1",
"autoAdjustRights" : "1",
"useApplicationRole" : "0",
"supportDecimal" : "0",
"supportBinaryProtocol" : "1"
}
}
}
}
public static DatabaseResult EditDatabase(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tEdit = new EditDatabase()
{
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
// Open database for edit
var tResult = somClient.EditDatabase(tEdit);
return tResult;
}

See also:

Working with Relational Objects of Repository