IBM Support

LI71969: DB2RELOCATEDB DOES NOT CHANGE DATABASE NAME IN AUTOMATIC STORAGE PATHS WHEN INSTANCE NAME IS ALSO CHANGED

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using db2relocatedb to change instance name and database
    name, the path of containers of tablespaces that use automatic
    storage
    will not get the database name changed as expected from
    old_storage_path/old_instance_name/NODExxxx/old_database_name/ta
    blespace_dir/container
    to
    new_storage_path/new_instance_name/NODExxxx/new_database_name/ta
    blespace_dir/container. Temporary SMS tablespaces will show the
    right
    expected path as they will get recreated on connection to the
    database.
    
    Example:
    We have the following tablespaces and containers:
    SYSCATSPACE (DMS):
    /db2/O6P/sapdata1/sapdata4/db2o6p/NODE0000/O6P/T0000000/C0000000
    .CAT
    /db2/O6P/sapdata1/sapdata3/db2o6p/NODE0000/O6P/T0000000/C0000001
    .CAT
    /db2/O6P/sapdata1/sapdata2/db2o6p/NODE0000/O6P/T0000000/C0000002
    .CAT
    /db2/O6P/sapdata1/sapdata1/db2o6p/NODE0000/O6P/T0000000/C0000003
    .CAT
    
    PSAPTEMP16 (SMS):
    /db2/O6P/sapdata1/sapdata4/db2o6p/NODE0000/O6P/T0000003/C0000000
    .TMP
    /db2/O6P/sapdata1/sapdata3/db2o6p/NODE0000/O6P/T0000003/C0000001
    .TMP
    /db2/O6P/sapdata1/sapdata2/db2o6p/NODE0000/O6P/T0000003/C0000002
    .TMP
    /db2/O6P/sapdata1/sapdata1/db2o6p/NODE0000/O6P/T0000003/C0000003
    .TMP
    
    The relocation file (db2relocatedb.conf)contains the following
    entries:
    DB_NAME=O6P,O5T
    INSTANCE=db2o6p,db2o5t
    DB_PATH=/db2/O6P,/db2/O5T
    STORAGE_PATH=/db2/O6P/sapdata1/sapdata1,/db2/O5T/sapdata1/sapdat
    a1
    STORAGE_PATH=/db2/O6P/sapdata1/sapdata2,/db2/O5T/sapdata1/sapdat
    a2
    STORAGE_PATH=/db2/O6P/sapdata1/sapdata3,/db2/O5T/sapdata1/sapdat
    a3
    STORAGE_PATH=/db2/O6P/sapdata1/sapdata4,/db2/O5T/sapdata1/sapdat
    a4
    
    The procedure before running db2relocatedb is to move all the
    database files and contents
    to the target directories.
    The target directories/files in this case should be
    
    SYSCATSPACE (DMS):
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O5T/T0000000/C0000000
    .CAT
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O5T/T0000000/C0000001
    .CAT
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O5T/T0000000/C0000002
    .CAT
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O5T/T0000000/C0000003
    .CAT
    
    PSAPTEMP16 (SMS):
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O5T/T0000003/C0000000
    .TMP
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O5T/T0000003/C0000001
    .TMP
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O5T/T0000003/C0000002
    .TMP
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O5T/T0000003/C0000003
    .TMP
    
    but if we run db2relocatedb -f db2relocatedb.conf
    we will get the error:
    
    DBT1006N  The file/device
    "/db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O6P/T0000000/C000000
    0.CAT" could not be opened.
    Due to the fact that we are not changing the database name after
    NODE0000 (as expected) and we are looking for the wrong file.
    
    If we just move the directories from STORAGE_PATH (old) to
    STORAGE_PATH (new) but without changing anything else:
    /db2/O6P/sapdata1/sapdata<n>/db2o6p
    to
    /db2/O5T/sapdata1/sapdata<n>/db2o5t
    
    After running db2relocatedb -f db2relocatedb.conf and connecting
    to the database O6P we will have:
    SYSCATSPACE (DMS):
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O6P/T0000000/C0000000
    .CAT
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O6P/T0000000/C0000001
    .CAT
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O6P/T0000000/C0000002
    .CAT
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O6P/T0000000/C0000003
    .CAT
    
    PSAPTEMP16 (SMS):
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O5T/T0000003/C0000000
    .TMP
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O5T/T0000003/C0000001
    .TMP
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O5T/T0000003/C0000002
    .TMP
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O5T/T0000003/C0000003
    .TMP
    
    The SMS containers show the right path. This is due to the fact
    that temporary SMS tablespaces are picking up the new
    STORAGE_PATH and
    get recreated on
    new_storage_path/new_instance_name/NODExxxx/new_database_name/ta
    blespace_dir/container, but this is an effect of connecting
    to the new database, db2relocatedb tool did not change the
    database name as expected so we would have:
    
    after running db2relocatedb:
    These files exist:
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O6P/T0000003/C0000000
    .TMP
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O6P/T0000003/C0000001
    .TMP
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O6P/T0000003/C0000002
    .TMP
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O6P/T0000003/C0000003
    .TMP
    
    after connecting to the database O5T
    The above files do not exist and got replaced with:
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O5T/T0000003/C0000000
    .TMP
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O5T/T0000003/C0000001
    .TMP
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O5T/T0000003/C0000002
    .TMP
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O5T/T0000003/C0000003
    .TMP
    

Local fix

  • No Workaround
    

Problem summary

  • Users affected: ALL
    Problem description: DB2RELOCATEDB DOES NOT CHANGE DATABASE NAME
    IN AUTOMATIC STORAGE
    PATHS WHEN INSTANCE NAME IS ALSO CHANGED
    Problem Summary:
    ERROR DESCRIPTION:
    When using db2relocatedb to change instance name and database
    name, the path of containers of tablespaces that use automatic
    storage
    will not get the database name changed as expected from
    old_storage_path/old_instance_name/NODExxxx/old_database_name/ta
    blespace_dir/container
    to
    new_storage_path/new_instance_name/NODExxxx/new_database_name/ta
    blespace_dir/container. Temporary SMS tablespaces will show the
    right
    expected path as they will get recreated on connection to the
    database.
    
    Example:
    We have the following tablespaces and containers:
    SYSCATSPACE (DMS):
    /db2/O6P/sapdata1/sapdata4/db2o6p/NODE0000/O6P/T0000000/C0000000
    .CAT
    /db2/O6P/sapdata1/sapdata3/db2o6p/NODE0000/O6P/T0000000/C0000001
    .CAT
    /db2/O6P/sapdata1/sapdata2/db2o6p/NODE0000/O6P/T0000000/C0000002
    .CAT
    /db2/O6P/sapdata1/sapdata1/db2o6p/NODE0000/O6P/T0000000/C0000003
    .CAT
    
    PSAPTEMP16 (SMS):
    /db2/O6P/sapdata1/sapdata4/db2o6p/NODE0000/O6P/T0000003/C0000000
    .TMP
    /db2/O6P/sapdata1/sapdata3/db2o6p/NODE0000/O6P/T0000003/C0000001
    .TMP
    /db2/O6P/sapdata1/sapdata2/db2o6p/NODE0000/O6P/T0000003/C0000002
    .TMP
    /db2/O6P/sapdata1/sapdata1/db2o6p/NODE0000/O6P/T0000003/C0000003
    .TMP
    
    The relocation file (db2relocatedb.conf)contains the following
    entries:
    DB_NAME=O6P,O5T
    INSTANCE=db2o6p,db2o5t
    DB_PATH=/db2/O6P,/db2/O5T
    STORAGE_PATH=/db2/O6P/sapdata1/sapdata1,/db2/O5T/sapdata1/sapdat
    a1
    STORAGE_PATH=/db2/O6P/sapdata1/sapdata2,/db2/O5T/sapdata1/sapdat
    a2
    STORAGE_PATH=/db2/O6P/sapdata1/sapdata3,/db2/O5T/sapdata1/sapdat
    a3
    STORAGE_PATH=/db2/O6P/sapdata1/sapdata4,/db2/O5T/sapdata1/sapdat
    a4
    
    The procedure before running db2relocatedb is to move all the
    database files and contents
    to the target directories.
    The target directories/files in this case should be
    
    SYSCATSPACE (DMS):
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O5T/T0000000/C0000000
    .CAT
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O5T/T0000000/C0000001
    .CAT
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O5T/T0000000/C0000002
    .CAT
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O5T/T0000000/C0000003
    .CAT
    
    PSAPTEMP16 (SMS):
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O5T/T0000003/C0000000
    .TMP
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O5T/T0000003/C0000001
    .TMP
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O5T/T0000003/C0000002
    .TMP
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O5T/T0000003/C0000003
    .TMP
    
    but if we run db2relocatedb -f db2relocatedb.conf
    we will get the error:
    
    DBT1006N  The file/device
    "/db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O6P/T0000000/C000000
    0.CAT" could not be opened.
    Due to the fact that we are not changing the database name after
    NODE0000 (as expected) and we are looking for the wrong file.
    
    If we just move the directories from STORAGE_PATH (old) to
    STORAGE_PATH (new) but without changing anything else:
    /db2/O6P/sapdata1/sapdata<n>/db2o6p
    to
    /db2/O5T/sapdata1/sapdata<n>/db2o5t
    
    After running db2relocatedb -f db2relocatedb.conf and connecting
    to the database O6P we will have:
    SYSCATSPACE (DMS):
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O6P/T0000000/C0000000
    .CAT
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O6P/T0000000/C0000001
    .CAT
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O6P/T0000000/C0000002
    .CAT
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O6P/T0000000/C0000003
    .CAT
    
    PSAPTEMP16 (SMS):
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O5T/T0000003/C0000000
    .TMP
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O5T/T0000003/C0000001
    .TMP
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O5T/T0000003/C0000002
    .TMP
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O5T/T0000003/C0000003
    .TMP
    
    The SMS containers show the right path. This is due to the fact
    that temporary SMS tablespaces are picking up the new
    STORAGE_PATH and
    get recreated on
    new_storage_path/new_instance_name/NODExxxx/new_database_name/ta
    blespace_dir/container, but this is an effect of connecting
    to the new database, db2relocatedb tool did not change the
    database name as expected so we would have:
    
    after running db2relocatedb:
    These files exist:
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O6P/T0000003/C0000000
    .TMP
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O6P/T0000003/C0000001
    .TMP
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O6P/T0000003/C0000002
    .TMP
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O6P/T0000003/C0000003
    .TMP
    
    after connecting to the database O5T
    The above files do not exist and got replaced with:
    /db2/O5T/sapdata1/sapdata4/db2o5t/NODE0000/O5T/T0000003/C0000000
    .TMP
    /db2/O5T/sapdata1/sapdata3/db2o5t/NODE0000/O5T/T0000003/C0000001
    .TMP
    /db2/O5T/sapdata1/sapdata2/db2o5t/NODE0000/O5T/T0000003/C0000002
    .TMP
    /db2/O5T/sapdata1/sapdata1/db2o5t/NODE0000/O5T/T0000003/C0000003
    .TMP
    

Problem conclusion

  • First fixed in DB2 UDB Version 9.1, FixPak 5
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI71969

  • Reported component name

    DB2 UDE ESE LIN

  • Reported component ID

    5765F4104

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-01-26

  • Closed date

    2008-07-07

  • Last modified date

    2008-07-07

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    LI73168

Fix information

  • Fixed component name

    DB2 UDE ESE LIN

  • Fixed component ID

    5765F4104

Applicable component levels

  • R910 PSY

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 October 2021