To accommodate Windows Terminal Server shared memory requirements, Adaptive Server version 12.5.4 introduces the environment variable SYBASE_TS_MODE.
Windows Terminal Server is a feature of Microsoft Windows that allows multiple remote users to log into the Windows system simultaneously. Each user connects from a local workstation to a central Windows server, and is then given a virtual Windows environment which appears back on the local workstation. The Windows server keeps the memory spaces and other resource allocations of these terminal server sessions entirely separate, so that users are largely unaware of the existence of other terminal server sessions. In addition, there can be a user logged in to the machine in the normal way–this is referred to as the “console session”.
The Adaptive Server data server can be started in a terminal server session, or it may start as a Windows service, in which case it is regarded as part of the console session. Adaptive Server shared memory regions are normally not accessible from other terminal server sessions, and thus certain tools such as performance monitors, and the Sybase internal diagnostic tool (sybmon), will not work unless started from the same session that owns the Adaptive Server, as these tools must connect to the shared memory region of that server. If Adaptive Server is running as a service, these tools work only if started from the console session.
Adaptive Server 12.5.4 looks for an environment variable named SYBASE_TS_MODE, and if it is set to GLOBAL then Adaptive Server creates its shared memory so that it is available across all terminal server sessions. Similarly, changes made to the performance monitor and sybmon also look for this environment variable and connect to the shared memory globally if it is set to GLOBAL. In this way, you can configure a remote terminal session to monitor Adaptive Server running on the console session or on another terminal server session. Create SYBASE_TS_MODE as a system environment variable then restart the Windows machine to bring it into effect.
SYBASE_TS_MODE is not supported by Windows NT 4.0 Workstation and Server, and Windows 2000 Professional.
If SYBASE_TS_MODE is not set, shared memory is created only under the local terminal server session.
WARNING! Do not set SYBASE_TS_MODE on a machine that does not support terminal services. This causes shared memory creation to fail, and Adaptive Server will not start.