SHUTDOWN

SHUTDOWN is a SQL command used to safely stop the database server. When executed, it closes all opened databases, disconnects all sessions, and terminates the database server. This ensures that all data held in memory is written to disk, preventing possible loss or corruption of data.

Example

SHUTDOWN

Output

Server shutdown in progress...

Explanation

In the presented example, SHUTDOWN is a MySQL statement used to safely stop the MySQL server. The “Server shutdown in progress…” notification indicates that the server is executing the command.

Example

SHUTDOWN;

Output

SQL Server is shutting down.

Explanation

The SHUTDOWN command is used to safely stop the SQL Server. Upon executing this command, SQL Server ceases processing after completing all active processes and transactions.

Example

SHUTDOWN IMMEDIATE;

Output

No output will be returned for the SHUTDOWN IMMEDIATE command. The database is immediately shut down after the command is issued.

Explanation

The SHUTDOWN IMMEDIATE command is used in Oracle SQL to shut down a currently running Oracle database instance. It disallows new connections and disconnects existing sessions. As it’s an administrative command, the output is neither visible nor retrievable.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.