Prevent an autostop database from stopping automatically for a period of time. For example, you must perform maintenance on a database and the database must not stop until you are done.
You must have the AlterDatabase privilege.
Disable the autostop database from stopping automatically by running a StartDatabase task on the database.
If the database is stopped, it starts and it does not stop automatically. If the database is running, it continues to run and it does not stop automatically.
Perform the maintenance that requires the database to continue running.
Re-enable the database to stop automatically by running a StopDatabase task with the unconditionally parameter set to 0.
Database mydatabase is an autostart and autostop database. Fred must perform maintenance on the mydatabase database that requires the database to run throughout the process. Fred runs the following task to prevent the database from autostopping:
dbcloudcmd run StartDatabase database_list=mydatabase
After the maintenance ends, Fred runs the following task to re-enable the mydatabase database to stop automatically. If there are no client connections, then database stops. If there are client connections, then the database stops automatically when the last client connection disconnects.
dbcloudcmd run StopDatabase database_list=mydatabase unconditionally=0
Discuss this page in DocCommentXchange.
|Copyright © 2013, SAP AG or an SAP affiliate company - SAP Sybase SQL Anywhere, on-demand edition 1.0 Support Package 3|