Question
· 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?

Discussion (10)2
Log in or sign up to continue

Hello,

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?

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.(https://cedocs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GCDI...)

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.

There are many tools available for backup-and-restore.  InterSystems publishes some helpful information in the Caché Data Integrity Guide (https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCDI_backup).  

If you are a supported customer, your sales engineer can be a good resource, and the WRC is always available to help you solve problems.

Erik