Restricting database access provides greater control over inadvertent database opens during forced recovery.
Sybase recommends using two server startup switches to restrict access:
Use -gd DBA so that only users with DBA authority can start and stop databases on a running server. (Note that the client must already have a connection to the server to start or stop the database, so this switch does not prevent connections.)
Use -gm 1 to allow a single connection plus one DBA connection above the limit so that a DBA can connect and drop others in an emergency.
sa_server_option('disable_connections', 'ON')just after you start the connection where you are performing forced recovery and
sa_server_option('disable_connections', 'OFF')on the same connection after recovery. The disadvantage is that this method precludes emergency access from another DBA connection.