Continuing with the command line options from the last post, we have the -n option that takes one argument which is the node name or instance name. This becomes useful when you want to pass to the -d option the name of a database that exists under a different node than the default node.
For example, say you have a database named sample under a node named thekguy and your $DB2INSTANCE environment variable is set to thekguy. Say you catalog another node node1 and catalog the sample database under that node with a new alias data1 as follows:
db2 catalog local node node1
db2 catalog db sample as data1 at node node1
If you attempt to run db2top with a -d data1 option and do not specify the -n option, it fails with a message like the following:
SQL1428N The application is already attached to "THEKGUY" while the command
issued requires an attachment to "NODE1" for successful execution.
Exiting...
If instead, you specify db2top with the -d data1 and the -n node1 options, db2top loads successfully.
If you specify the -n option without an argument, you get the following message:
*************************************************************************
*** ***
*** Error: -n needs a node name ***
*** ***
*************************************************************************
If you specify a node name that does not exist, you get an error message, as below:
db2top -d sample -n nonexist
*** Attaching to nonexist
SQL1097N The node name was not found in the node directory. SQLSTATE=42720
Exiting...
Popularity: 5% [?]
Subscribe by RSS!
Related posts:
- db2top Feature of the Day – Command Line Options (-u and -p) Today’s topic is the -u option and its partner, the...
- db2top Feature of the Day – Command Line Options (-b) The -b option allows you to run db2top in “background...
- db2top Feature of the Day – Command Line Options (-i) In today’s post, I look at using the -i option...
- db2top Feature of the Day – Command Line Options (Summary) Now that we have reviewed each command line option individually,...
- db2top Feature of the Day – Command Line Options (-C and -f) The final two command line options, -C and -f, work...
Related posts brought to you by Yet Another Related Posts Plugin.



