Http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp? Topic =/com.ibm.db2.luw.messages. SQL .doc/doc/msql06031n.html
Question
Changing hostname of the DB2 server. What updates in DB2 need to be made?
Cause
Changing the DB2 server's hostname.
Answer
Perform the following on the DB2 Server:
1) login as the dasadm user on Unix/Linux or local administrator on Windows. Stop the DB2 Administration Server (DAS ):
2) login as the instance owner on Unix/Linux or local administrator on Windows. Stop the DB2 instance:
3) change the server's hostname. on a Windows system, a reboot is required before this change will take effect. do not reboot the Windows server at this time-you must make the DB2 configuration changes first.
4) login as user root on Unix/Linux and local administrator on Windows. Update the db2system registry varibale:
Db2set-G db2system = <new hostname>
5) locate db2nodes. cfg in one of the following directories:
Note that only DB2 ESE has a db2nodes. cfg. If you are running other editions (workgroup server, or Personal Edition) Then you can skip this step and the next.
6) in the db2nodes. cfg file change <Current hostname> to <new hostname>.
7) run the following command to list the current Hostname/system name that is cataloged:
DB2 list admin node directory show detail
If there are no admin node directory entries then you can skip the next 2 steps. it simply means that you haven't started the control center. the admin node directory will get updated the next time the control center is started, based upon the current hostname.
#----------------------------------
Error: 'db21061e command line environment not initialized' when attempting to run scripts
Question
When attempting to run the database creation scripts from a command prompt (learning management module [lmm], IBM Delivery Server [DS], Audit) for IBM Lotus Learning Management System (LMS ), you receive the following error message:
Db21061e command line environment not initialized.
Cause
This error occurs when the db2cmd.exe file has not been initialized.
Answer
To start db2cmd.exe:
1. From the Windows taskbar, choose start --> Run --> type "cmd" (without quotes "and press Enter.
2. Type "db2cmd" (without quotes) and press Enter. You will now be able to run the lmm, DS, or audit database scripts.
#----------------------------------
8) uncatalog the current hostname using this command:
DB2 uncatalog node <nodename>
9) catalog the admin node with the new hostname using this command:
-
DB2 catalog admin TCPIP node <nodename> remote <new hostname> System <new hostname>
<Nodename>Can be anything you want it to be (8 characters or less). It does not relate directly to the hostname itself.
10) Update the admin configuration file using these commands:
DB2 update admin CFG using db2system <new hostname>
DB2 update admin CFG using smtp_server <new hostname>
11) at this time, you should restart your server if running Windows. note that if your instances are set to auto-start, you may get error messages. these will occur if you have db2_extsecurity enabled. to correct this, you will need to update the db2_admingroup and db2_usersgroup registry entries using the db2extsec command. see the 'note' at the end of this operation te for more details.
12) login as the dasadm user on Unix/Linux or local administrator on Windows. Start the DB2 Administration Server (DAS ):
13) login as the instance owner on Unix/Linux or local administrator on Windows. Start the DB2 instance:
14) in control center find the old hostname under the "All systems" folder and right click, choose remove.
15) in control center add the new hostname. Right click on the "All systems" folder and choose "add". Click on "Discover" to locate the new hostname.
Note:
Starting in v9.1 fp2, DB2 supports the use of domain groups for extended security. therefore, when you change the computer name and the computer groups db2admns and db2users are local computer groups, you must update the db2_admingroup and db2_usersgroup global registries. please see the related URL for instructions on how to do this.
Related information
Domain groups for extended Windows Security