Session and terminal considerations for shared memory

When using database servers and clients running as services or in terminal services:

Any client can connect over shared memory to any database server that runs as a service.

Any client can connect over shared memory to a database server that is running in the same session as the client. When attempting
a shared memory connection, a client looks first for a database server with the specified name in the same session as the
client. If none is found, the client then looks for a service with the specified name.

A client running in one terminal session cannot connect over shared memory to a database server running in another terminal
session. Use TCP/IP instead.

A client that runs as a service cannot connect over shared memory to a database server running in a terminal session. Use
TCP/IP instead.

A database server cannot start if there is already a database server running with the same name in the current session or if there is a service running
with the same name.

A database server can start if there is a database server running with the same name in another session, as long as there is not a service running
with the same name, and the database servers do not both use TCP/IP.

When using database servers and clients running as services or in terminal services:

On Windows XP, services and the primary desktop both run in the same session. This configuration is called the primary session.

A client can connect over shared memory to a database server that is running in the same session as the client or that is
running in the primary session. When attempting a shared memory connection, a client looks first for a database server with
the specified name in the same session as the client, and then in the primary session.

A client running in the primary session cannot connect over shared memory to a database server running in a non-primary session.
A client running in a non-primary session cannot connect over shared memory to a database server running in another non-primary
session. Use TCP/IP instead.

A database server cannot start if there is already a database server with the same name running in the current session or in the primary session.
A database server running on the desktop (of the primary session) could prevent a service with the same name from starting.
However, since services usually start when the system starts, this problem rarely occurs.

A database server can start using shared memory even if there is a database server with the same name running over shared memory in another non-primary
session as long as there is not a database server with the same name running in the primary session.

A database server cannot start using TCP/IP if there is a database server with the same name running over TCP/IP in any other session (primary or
non-primary).