ORA-00106: cannot startup/shutdown database when connected to a dispatcher

Problem Description

We are running a multi-threaded server and are trying to shutdown the database. But it fails through below message

ORA-00106: cannot startup/shutdown database when connected to a dispatcher

In simplest, ORA-00106 means following according to oracle documentation

Cause: An attempt was made to startup/shutdown database when connected to a shared server via a dispatcher.
Action: Re-connect as user INTERNAL without going through the dispatcher.
For most cases, this can be done by connect to INTERNAL without specifying a network connect string

Cause of the Problem
The problem happened because you are trying to shutdown the database while connected to a shared server process.
Because you cannot startup or shutdown a database while connected to a shared server process via a dispatcher.
To shutdown or startup a database you must connect via a dedicated server process.

Solution of the Problem

In order to startup/shutdown a database, you must connect via a dedicated server process and not a shared process.
If you are connecting to database server through TNS entry then add the following entry to your tnsnames.ora file in the address_list section:

(SERVER=DEDICATED)

Example of a TNS entry that establish a dedicated connection:

 service_name=
      (DESCRIPTION =
          (ADDRESS_LIST =
             (ADDRESS =
              (PROTOCOL = PROTOCOL_NAME)
                (Host = server_name)
                (Port = port_number)
             )
          )
         (CONNECT_DATA =
             (SID = sid_name)
             (SERVER=DEDICATED)
         )
       )

Another solution is login to the server and issue startup/shutdown from that computer by connecting as sysdba without any TNS entry

How to fix: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

Open your terminal and type mysql -u root -p Enter your password. Hopefully your MySQL is logged in now.