edmiRemoteCloseDatabase
EdmiError edmiRemoteCloseDatabase(SdaiServerContext serverContextId, SdaiString password, SdaiInvocationId *edmiInvocationId);
Closes a remote EDMdatabase from a thin EDMclient. A closed EDMdatabase may not be accessed until it is reopened by the edmiRemoteOpenDatabase function. To ensure data consistency, this function should always be used to take down an EDMdatabase. Any open models or repositories will be automatically closed. If there exists an EDMserversession, it will be automatically terminated by a call to the sdaiCloseSession. Any connected thick EDMclients will be automatically disconnected by a call to the function edmiDisconnect.
Arguments
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_a_serverContextId'.
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_a_password_EDMI'.
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_a_edmiInvocationId'.
Return Value
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.
Options
Example
int i; EdmiError rstat; SdaiServerContext suContext; tEdmiWhoIsOnServer *pWhoIsOn; tEdmiConnection *pConnect; SdaiInteger nConnect; /* Define Remote Server Context for the superuser */ rstat = edmiDefineServerContext("SuperUserContext", "superuser", NULL, "xfx56kl9", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &suContext); /* Set the system unavailable */ rstat = edmiRemoteSetUnavailable(suContext, "System unavailable due to maintenance", NULL, NULL); rstat = edmiRemoteWhoIsOn(suContext, &nConnect, &pWhoIsOn, NULL); pConnect = pWhoIsOn->connections; /* Kill all connections except the EDMapplicationServer processes */ for (i=0;i<nConnect;i++) { SdaiString _hostName, _clientName; rstat = edmiRemoteGetClientNames(suContext, pConnect->clientId, &_hostName, &_clientName, NULL); if (!strstr(_clientName, "EDMapplicationServer-")) { rstat = edmiRemoteTerminateClient(suContext, NULL, pConnect->clientId, FORCE_TO_TERMINATE, NULL); } ++pConnect; } /* Close the database */ rstat = edmiRemoteCloseDatabase(suContext, "db546tyz", NULL); /* Perform system maintenance here */ /* Reopen the database */ rstat = edmiRemoteOpenDatabase(suContext, "x:/mypro/db", "mydb", "db546tyz"); /* Set the system available for connections from EDMclients */ rstat = edmiRemoteSetAvailable(suContext, NULL, NULL); . . .
See also
Filter by label
There are no items with the selected labels at this time.