edmiRemoteSetAvailable

EdmiError edmiRemoteSetAvailable(SdaiServerContext serverContextId,
                                   SdaiString        password, 
                                   SdaiInvocationId  *edmiInvocationId);

Sets an EDMdatabase available for connections from thick EDMclients. Use this function to reset normal operation mode after a call to the function edmiRemoteSetUnavailable.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiString

password

The password for the superuser. If the superuser is defined as the calling user in the server context, this argument may be omitted.

SdaiInvocationId

edmiInvocationId

Currently not used.

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.