lw wei · May 6, 2020

Stop instance in non-iteractive way

My steps are as follows:

1. Switch to the system user using psTool

2. Start instance in emergency way 

3. Journal restore

4. Stop instance

A dialog box appears:

The parameter “quielty” seems to have no effect in the windows environment

Is there any non-interactive way to close the instance?


3 0 10 174
Log in or sign up to continue

it should be "quietly" not "quielty", so, that's why this may not work for you

still not work

It looks like a good request for WRC, why non-interactive mode does not work in emergency mode. And maybe they can offer a workaround.


I'm able to reproduce the behavior with emergency mode requiring you to enter the emergency mode user/pass to shut down. You are certainly welcome to reach out to the WRC to confirm if this is intended behavior, but I suspect that it is. I am wondering what the use case is here as emergency access mode is a special mode, intended for use "under certain dire circumstances, such as if there is severe damage to security configuration information or if no users with the %Admin_Manage:Use or %Admin_Security:Use privileges are available". In those situations you would be taking manual steps so uninteractive shut down would not be necessary.

Could you simply use a normal login and not emergency mode?

That behavior is intended, as only the emergency user is able to start and stop the instance in emergency mode.  The prompt for the EmergencyId and password confirms this.

Since the original poster mentions journal restore, I too wonder about the use case.  If this is related to an emergency situation, reaching out to the WRC may be appropriate.


I am doing work related to backup and restore, to avoid unexpected problems with other user operations during restore, so I started in emergency mode

to avoid unexpected problems with other user operations 

... is usually easier to disable users sign-on by setting switch 12, or restrict their activity by some other appropriate switches combination (see Using Switches).

During any restore procedure it is critical that no application activity occurs in the databases being restored until you are completely finished with the backup restore and journal restore, and you have completed any desired application-level validation. If you have, in your application or operating environment, a mechanism to ensure that no user activity can occur when Caché is started you can use that mechanism; for example, if your application is entirely web-based, shutting down the web servers may be sufficient to ensure that only administrators involved in the restore procedure have access to the system.(

Can setting switch meet the demand?

It depends.

Switch 10 which inhibits all global/routine access except by the process that sets this switch should meet, while setting it can interfere with your _own_ activity.
Switch 12 which disables logins can be insufficient for disabling web access, which is easier to restrict by stopping web server.

I didn't personally experiment with those switches as we have no such problem because our application utilizes its own "disable logins" flag by locking the variable.