{"id":66,"date":"2008-11-14T16:59:41","date_gmt":"2008-11-14T21:59:41","guid":{"rendered":"http:\/\/www.thefillmoregroup.com\/blog\/?p=66"},"modified":"2008-11-14T16:59:41","modified_gmt":"2008-11-14T21:59:41","slug":"changing-the-hostname-for-a-db2-server","status":"publish","type":"post","link":"http:\/\/www.thefillmoregroup.com\/blog\/?p=66","title":{"rendered":"Changing the Hostname for a DB2 Server"},"content":{"rendered":"<p>Sorry I haven&#8217;t posted in a little while.\u00a0 October was a 250 hour month with a critical customer project and the IBM Information OnDemand Conference (IOD &#8211; you know all about IOD from Kim).\u00a0 My VP of Biz Dev is all about trying to make her &#8220;number&#8221;, so it&#8217;s been busy.<\/p>\n<p>The Fillmore Group is an IBM Authorized Training Partner (ATP) so we use a product called Acronis to create a single image of our student lab machines and then deploy that\u00a0image to multiple PCs.\u00a0 Since these are Windows XP PCs running DB2 9 for Linux, Unix, Windows Fixpack (FP) 2, the computer name must be unique within the domain.\u00a0 However, once you change the computer name, DB2 stops working.\u00a0 The common error is SQL1042C.\u00a0 Here&#8217;s how to fix that problem.<\/p>\n<p>First, there is a file in each DB2 instance subdirectory (e.g. &#8220;c:\\Program Files\\IBM\\SQLLIB\\DB2&#8221;) called <strong>db2nodes.cfg<\/strong>;\u00a0in this\u00a0post we&#8217;re only going to address single-node (i.e. <em>not<\/em> Data Partitioning Feature or DPF) databases.\u00a0 Open this file for each DB2 instance on the server &#8211; I use WordPad &#8211; and change the imbedded hostname to the current computer name for that PC.\u00a0 The same hostname\u00a0will be repeated twice on a single line in the db2nodes.cfg file.\u00a0 Change both.\u00a0 This used to be all you needed to do to fix the problem.\u00a0 Now, there are a few more steps.<\/p>\n<p>If you\u00a0installed using the extended operating system security option, you likely will\u00a0now receive an SQL1652N file I\/O error.\u00a0 In DB2 9.1 FP 2, support was added for domain userids and groups.\u00a0 Use the <strong>db2extsec<\/strong> command to\u00a0correct the authorities for the installation-defined\u00a0groups DB2ADMNS and DB2USERS.\u00a0 For example, let&#8217;s say the PC image was created using a computer name of TFGXP01.\u00a0 We&#8217;ve deployed this image to another PC and changed the Windows computer name to TFGXP02.\u00a0 Enter the command:<\/p>\n<p><strong>db2extsec -a TFGXP02\\DB2ADMNS -u TFGXP02\\DB2USERS<\/strong><\/p>\n<p>The last step involves correcting the DB2 registry variables.\u00a0 Use the <strong>db2set -all<\/strong> command to examine the current registry variables.\u00a0 In our example, you likely will have seen three variables with TFGXP01 as part of the value.\u00a0 Issue the following commands:<\/p>\n<p><strong>db2set db2accountname=TFGXP02\\db2admin<\/strong><\/p>\n<p><strong>db2set db2instowner=TFGXP02<\/strong><\/p>\n<p><strong>db2set db2system=TFGXP02<\/strong><\/p>\n<p>At this point, you should be able to start the DB2 instances.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sorry I haven&#8217;t posted in a little while.\u00a0 October was a 250 hour month with a critical customer project and the IBM Information OnDemand Conference (IOD &#8211; you know all about IOD from Kim).\u00a0 My VP of Biz Dev is all about trying to make her &#8220;number&#8221;, so it&#8217;s been busy. The Fillmore Group is [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[5,33,32],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-db2-for-linux-unix-windows","tag-db2","tag-hostname","tag-luw"],"_links":{"self":[{"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=66"}],"version-history":[{"count":2,"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":68,"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/66\/revisions\/68"}],"wp:attachment":[{"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.thefillmoregroup.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}