db2systray - Start Db2 system tray command
The db2systray icon has two modes, started and stopped. When the monitored instance is stopped, the icon contains an overlay with a red square. When the instance is started, the red square disappears.
In partitioned database environments, the db2systray icon will be in started mode only when all partitions are started. If one or more partitions are stopped, the db2systray icon will be in stopped mode.
When multiple Db2 copies are installed on a single Windows operating system, db2systray can monitor Db2 instances for each Db2 copy that is installed. To monitor a non-default Db2 copy, you can execute the db2systray.exe application from the SQLLIB/bin of the database copy you want to monitor.
You can monitor a single Db2 instance or multiple instances at the same time. Multiple instances can be monitored using multiple db2systray processes. A separate icon will appear in the system tray for each instance monitored by db2systray. Hovering over each icon with your mouse will display the name of the Db2 copy that is being monitored followed by the Db2 instance name monitored by that db2systray icon.
The db2systray icon can be launched manually from the Db2 command window by issuing the db2systray command, or automatically when the Windows operating system starts. db2systray is configured to start automatically when you install the Db2 database. However, having db2systray configured to start automatically when the system starts, does not mean that it will attempt to start the Db2 service as well. All it means is that it will start monitoring the status of the Db2 database automatically.
Issuing the db2idrop command against an instance monitored by a running db2systray process will force the db2systray application to clean up its registry entries and exit.
db2systray is only available on Windows operating systems.
Authorization
No special authority is required for starting db2systray. Appropriate authority is required for taking actions.
Required connection
None
Command syntax
Command parameters
- +auto
- Start db2systray automatically for the specified instance when the Windows operating system starts. db2systray can also be configured to launch automatically by enabling the Launch Tool at Startup db2systray menu option.
- -auto
- Disable db2systray from starting automatically for the specified instance when the Windows operating system starts.
- instance-name
- Name of the Db2 instance to be monitored. If no instance name is specified, db2systray will monitor the default local Db2 instance. If no instance exists, or the specified instance is not found, db2systray will exit quietly.
- -clean
- Clean up all registry entries for all Db2 instances monitored by db2systray and stop all running db2systray.exe processes.
Examples
C:\SQLLIB\bin> db2systray
Starts db2systray for the default Db2 instance specified by the DB2INSTANCE environment variable.
C:\SQLLIB\bin\> db2systray DB2INST1
Starts db2systray for the instance named
DB2INST1
.C:\SQLLIB\bin\> db2systray +auto
Starts db2systray for the default Db2 instance, and configures db2systray to start monitoring this instance automatically when the Windows operating system starts.
C:\SQLLIB\bin\> db2systray +auto DB2INST1
Starts db2systray for the instance named
DB2INST1
, and configures db2systray to start monitoring this instance automatically when the Windows operating system starts.C:\SQLLIB\bin\> db2systray -auto
Disables the auto start option for the default instance defined by the DB2INSTANCE environment variable.
C:\SQLLIB\bin\> db2systray -auto DB2INST1
Disables the auto start option for instance
DB2INST1
.C:\SQLLIB\bin\> db2systray -clean
Removes all registry entries created by db2systray and stops all running db2systray.exe processes. If db2systray.exe processes are running for other installed Db2 copies, they will not be cleaned up. You must execute
db2systray -clean
from the SQLLIB/bin for each Db2 copy you want to clean up.