Nov 24

Changing hostname of the DB2 server

TSM Server 6, Uppgradering Comments Off on Changing hostname of the DB2 server
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):

    db2admin stop

2) Login as the instance owner on UNIX/Linux or Local Administrator on Windows. Stop the DB2 instance:

    db2stop

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:

  • UNIX/Linux:
    <db2 instance home directory>/sqllib/db2nodes.cfg
  • All Windows flavors running DB2 v8 and v9.1:
    Program Files\IBM\SQLLIB\DB2\db2nodes.cfg
  • Windows XP and 2003 running DB2 v9.5:
    Documents and Settings\All Users\Application Data\IBM\DB2\<DB2COPY>\DB2\db2nodes.cfgNOTE: Application Data is a hidden folder
  • Windows Vista and later operating systems: ProgramData\IBM\DB2\<DB2COPY>\DB2\db2nodes.cfg

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.

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 technote for more details.

12) Login as the dasadm user on UNIX/Linux or Local Administrator on Windows. Start the DB2 Administration Server (DAS):

    db2admin start

13) Login as the instance owner on UNIX/Linux or Local Administrator on Windows. Start the DB2 instance:

    db2start

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.

written by Bosse

Nov 16

Troubleshooting/Testing VSS using DiskShadow on Windows 2008

Windows VSS Comments Off on Troubleshooting/Testing VSS using DiskShadow on Windows 2008
Problem(Abstract)
When diagnosing problems with SystemState backup or Open File Support/Online Image using VSS, it is sometimes useful to test the VSS portion by itself..
 
 
Resolving the problem
With Windows 2008, Microsoft included a tool called DiskShadow.exe that can be used to take snapshots of the system and much more. For the purpose of this technote, we will be limited to performing tests similar to what happens when Tivoli Storage Manager (TSM) performs a SystemState backup, Open File Support backup or an Online Image backup.Obtain Writer Information:When troubleshooting a problem, sometimes it is useful to obtain information about the writers, their status and the metadata.You can start diskshadow and logging all outputs to a file by starting a Command Prompt and launching this command:
diskshadow /l c:\diskshadow.out

From the diskshadow prompt, issue the following commands:

reset
list writers
list writers status
list writers metadata
list writers detailled
list providers
exit

The output of all the above commands will be found in c:\diskshadow.out. The output can use useful to see the list of files which are reported by the VSS writers to be included and excluded by the backup.

Test a snapshot of SystemState

When dealing with SystemState backup failures, sometimes the problem is with TSM, sometimes on Windows either with VSS itself or with one of its writers. Testing outside TSM helps determine if the problem is within TSM or outside.

You can start diskshadow and logging all outputs to a file by starting a Command Prompt and launching this command:
diskshadow /l c:\diskshadowsys.out

From the diskshadow prompt, issue the following commands:

reset
set verbose on
set option differential
set context volatile
add volume c: (if the system is on more than one disk, specify them separated by a space)
create
exit

The output of all the above commands will be found in c:\diskshadowsys.out. Review this file for errors. Any failure during the create phase indicate a problem either with VSS or one of the writers which should be pursued with Microsoft.

Test a snapshot of a disk for Open File Support or Online Image with snapshot provider to VSS

When dealing with a problem doing an open file support backup or online image backup when VSS is used as the snapshot provider, it is sometimes useful to isolate if the problem is within or outside of TSM. This will perform a snapshot of the disk.

You can start diskshadow and logging all outputs to a file by starting a Command Prompt and launching this command:
diskshadow /l c:\diskshadowsnap.out

From the diskshadow prompt, issue the following commands:

reset
set verbose on
set option differential
set context volatile nowriters
add volume c: (replace c: with the drive letter the snapshot is having problems.)
create
exit

The output of all the above commands will be found in c:\diskshadowsnap.out. Review this file for errors. Any failure during the create phase indicate a problem either with VSS or possibly the disk.

 
 
Related information
DiskShadow Information

written by Bosse