The message:
"SQL1096N The command is not valid for this node type."
as a response to "list active databases"
command
usually means that you did not install a Db2-server product, or you have multiple Db2-products installed and you chose to act on a client instance instead of a server instance.
You might have installed a full Db2-client product by accident, by clicking the wrong button on the setup program gui page for Install a product
, or the installable image that you downloaded was not a server image (but instead a client image).
Different ways to see the node type:
You can see which Db2 product(s) you installed if you run
appwiz.cpl
from the Windows Start menu and examine the list.
You can also see what you installed if you examine the log file created by the setup program during installation.
open a db2cmd.exe window (from Windows Start > Run) and in there run the command db2 get dbm cfg | more
and near the start you will see Node type = ....
. If your db2cmd.exe window is addressing a server installation, then the node type will be something like ...Server edition with local and remote clients
. If you see Node type = Client
, then you are not addressing a server installation. So in this case, you can either uninstall the client image and install a server image, or configure your db2cmd.exe window to address a server installation.
If you have multiple Db2 products installed then run the Default DB2 and Database Client Interface Selection wizard
which should appear in your Windows Start menu under the IBM Db2 group. This lets you choose which instance to make the default, so that when you run a db2cwadmin/db2cmd window, then the correct product gets addressed.
If you installed a Db2-server product, then you can run db2cwadmin.bat
(from the Windows Start Menu) and in that window the commands db2start
and db2stop
will be available, and the command-line db2 list active databases
will report (by default) one local database called SAMPLE assuming you created the default database in the First Steps
that runs after installation.
If you installed a Db2-server product, with all the default settings on a Microsoft Windows operating-system, then you will also see a process called db2sysc.exe
in the Task List
when the Db2-instance is running.
Verify that you downloaded the server image from IBM, and then re-run the setup program and ensure you choose to install a server product.