Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Working with Database Objects » Working with databases

Disconnecting from a database Next Page

Stopping a database

With both Sybase Central and Interactive SQL, you can stop a database running on a database server. You cannot stop a database you are currently connected to. You must first disconnect from the database, and then stop it. You must be connected to another database on the same database server in order to stop a database.

To stop a database on a server after disconnecting (Sybase Central)
  1. Make sure you are connected to at least one other database on the same database server. If there is no other database running on the server, you can connect to the utility database.

  2. Select the database you want to stop and choose File > Stop Database.

  3. When disconnecting from the database, the database may disappear from the left pane. This occurs if your connection was the only remaining connection, and if AUTOSTOP was specified when the database was started. AUTOSTOP causes the database to be stopped automatically when the last connection is terminated.

    To stop a database on a server after disconnecting (SQL)
    1. If you aren't connected to any database on the server, then connect to a database such as the utility database.

    2. Execute a STOP DATABASE statement.

    3. For more information, see STOP DATABASE statement.

      For information on connecting to the utility database, see Connecting to the utility database.


      The following statements connect to the utility database and stops the tempdb database.

      CONNECT to 'TestEng' DATABASE utility_db
      AS conn2
      USER 'DBA'
      IDENTIFIED BY 'sql';
      STOP DATABASE tempdb;

      You must be connected to a database to stop another database.