Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

edmiRemoteShrinkDatabase is an extension edmiRemoteOpenDatabase. This means that the database must be closed when edmiRemoteShrinkDatabase is called. The database is opened when edmiRemoteShrinkDatabase is finished. Later there will be implemented an option saying that the database shall be left closed after edmiRemoteShrinkDatabase is called .

Arguments

...

TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiString

location

The full path to the directory on the remote file system where the EDMdatabase is located. The directory delimiter is '/' on UNIX platforms and '\' on Windows platforms.

SdaiString

databaseName

The name of the  EDMdatabase to open.  EDMdatabase names are case sensitive on UNIX platforms and case insensitive on Windows platforms.

SdaiString

password

The password for the EDMdatabase.

SdaiString

repositoryName

The name of the repository in the remote  EDMdatabase  that contains the model to shrink. Repository names are case sensitive. If not specified, all models are candidates for shrinking.

SdaiString

modelName

The name of the model to shrink. Model names are case sensitive. If not specified, all models are candidates for shrinking.

SdaiString

minModelSize

If specified, only models with size bigger than the specified are shrinked. If not specified, all models are candidates for shrinking.

SdaiString

minReductionPercentage

if specified. only models where shrink reduction is greater than the specified percentage are shrinked. If not specified, all models are candidates for shrinking.

SdaiString

options

The password for the EDMdatabase. The password is defined by the edmiCreateDatabase function.

SdaiInvocationId*

edmiInvocationId

Not used

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

...

Example

...

 

Code Block
languagecpp
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 (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"

...