Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Mar 2011
    Posts
    41

    Unanswered: DB2 Installation

    Hello All,

    Here's my Scenario ..

    datavg:

    LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
    loglv00 jfs2log 1 1 1 open/syncd N/A
    fslv00 jfs2 150 150 1 open/syncd /export/db2adm
    fslv01 jfs2 10 10 1 open/syncd /export/db2inst1
    fslv02 jfs2 10 10 1 open/syncd /export/IBM

    [rootvg:[/B][/B]

    LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
    hd5 boot 1 1 1 closed/syncd N/A
    hd6 paging 8 8 1 open/syncd N/A
    hd8 jfs2log 1 1 1 open/syncd N/A
    hd4 jfs2 8 8 1 open/syncd /
    hd2 jfs2 96 96 1 open/syncd /usr
    hd9var jfs2 32 32 1 open/syncd /var
    hd3 jfs2 48 48 1 open/syncd /tmp
    hd1 jfs2 48 48 1 open/syncd /home
    hd10opt jfs2 32 32 1 open/syncd /opt
    hd11admin jfs2 4 4 1 open/syncd /admin
    lg_dumplv sysdump 16 16 1 open/syncd N/A
    livedump jfs2 4 4 1 open/syncd /var/adm/ras/livedump
    paging00 paging 96 96 1 open/syncd N/A
    paging01 paging 96 96 1 open/syncd N/A


    I'm a newbee to db2 but managed to complete the installation in the above mentioned filesystem . Now the problem is

    1. The installation happened in the home directory and the archive logs are also generating in the same location which is in the (rootvg) which is supposed to be happen on datavg .

    2. Even the data/Containers are created in the root vg again which is suppose to happen in datavg .

    $ pwd
    /home/db2inst1/db2inst1/NODE0000/TOOLSDB/T0000002
    $ cd ..
    $ ls -ltr
    total 0
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 26 15:51 T0000002
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 26 15:51 T0000000
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 27 10:09 T0000005
    drwx--x--x 3 db2inst1 db2iadm1 256 Mar 18 11:54 T0000006
    drwx--x--x 3 db2inst1 db2iadm1 256 Mar 18 11:54 T0000001


    Filesystem info :

    Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
    /dev/hd4 524288 322836 39% 10172 13% /
    /dev/hd2 6291456 2924940 54% 55948 8% /usr
    /dev/hd9var 2097152 0 100% 8339 62% /var
    /dev/hd3 3145728 3094068 2% 115 1% /tmp
    /dev/hd1 3145728 1272 100% 653 48% /home
    /dev/hd11admin 262144 261760 1% 5 1% /admin
    /proc - - - - - /proc
    /dev/hd10opt 2097152 153292 93% 16347 32% /opt
    /dev/livedump 262144 261776 1% 4 1% /var/adm/ras/livedump
    /dev/fslv00 157286400 155147248 2% 1397 1% /export/db2adm
    /dev/fslv01 10485760 5975684 44% 7703 1% /export/db2inst1
    /dev/fslv02 10485760 7979856 24% 10777 1% /export/IBM


    I have attached the db/dbm config along with this thread .

    Kindly let me know if you require any further information .

    Kindly help .

    Regards
    Sam
    Attached Files Attached Files

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you want the database, and/or the default tablespaces created on a certain directory, you can specify that in the create database command (see the Command Reference Manual). For logs, archive logs, etc, you can easily move them with "db2 update db cfg using logarchmeth1...." etc).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Or you can drop the database/instance, change db2inst1's home dir to /export/db2inst1 and then re-create the instance/database.

  4. #4
    Join Date
    Mar 2011
    Posts
    41
    Hello ,

    Thanks for your reply . Probably I will put the question in this way . In my configuration the dbdftpath is located to /home/db2inst1 . WIll there be any issues if update the configurration of dbdftpath - /export/db2adm and info on any post activity which needs to be performed is appreciated .


    Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
    /dev/hd4 524288 321012 39% 10173 13% /
    /dev/hd2 6291456 2924940 54% 55948 8% /usr
    /dev/hd9var 2162688 1802840 17% 8295 3% /var
    /dev/hd3 3145728 3094240 2% 115 1% /tmp
    /dev/hd1 3145728 0 100% 653 61% /home
    /dev/hd11admin 262144 261760 1% 5 1% /admin
    /proc - - - - - /proc
    /dev/hd10opt 2097152 153292 93% 16347 32% /opt
    /dev/livedump 262144 261776 1% 4 1% /var/adm/ras/livedump
    /dev/fslv00 157286400 155147248 2% 1397 1% /export/db2adm
    /dev/fslv01 10485760 5975684 44% 7703 1% /export/db2inst1
    /dev/fslv02 10485760 7979856 24% 10777 1% /export/IBM

    One of my DB is now ina astandstill state . sppedy response is greatly appreciated .

    Regards
    Sam

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Default DB path will determine location of the databases created in the future. For the one that already exists you'll need to follow advice that has been given.

  6. #6
    Join Date
    Mar 2011
    Posts
    41
    Hello ,

    Thanks you so muh for the reply .

    I have all this data files are created in both home directory and as well as in the export/db2inst1 directory and because the space get filled up and users couln't able to perform any thing .

    The same set of files is available at 2 different location .

    Location -1

    /dev/hd1 3145728 0 100% 539 /home

    /home/db2inst1/db2inst1/NODE0000/TOOLSDB
    $ ls -ltr
    total 24
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 26 15:51 T0000002
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 26 15:51 T0000000
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 27 10:09 T0000005
    drwx--x--x 3 db2inst1 db2iadm1 256 Mar 18 11:54 T0000006
    drwx--x--x 3 db2inst1 db2iadm1 256 Mar 18 11:54 T0000001
    -rw-r--r-- 1 db2inst1 db2iadm1 8633 Mar 24 10:08 toolsdb.log


    Location 2

    /dev/fslv01 10485760 5975684 44% 7703 1% /export/db2inst1

    /export/db2inst1/db2inst1/NODE0000/TOOLSDB
    $ ls -ltr
    total 0
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 26 15:51 T0000002
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 26 15:51 T0000000
    drwx--x--x 2 db2inst1 db2iadm1 256 Jan 27 10:09 T0000005
    drwx--x--x 3 db2inst1 db2iadm1 256 Mar 07 17:40 T0000006
    drwx--x--x 3 db2inst1 db2iadm1 256 Mar 07 17:40 T0000001


    I don't know what went wrong and plssss let me know the solution .

    Regards
    Sam .

  7. #7
    Join Date
    Mar 2011
    Posts
    41
    Hello Gurus,

    Please let me know if you need any additional information for the same ...


    Regards
    Satish

  8. #8
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    You can get a list of tablespaces/containers in use by the db using:
    db2pd -d <db name> -tab

  9. #9
    Join Date
    Mar 2011
    Posts
    41
    Hello B,

    Thank you so much for the reply .Please find the below and as well as the attachment .


    $ db2pd -d toolsdb -tab

    Database Partition 0 -- Database TOOLSDB -- Active -- Up 0 days 00:32:13 -- Date 03/29/2011 15:24:54

    Tablespace Configuration:
    Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
    0x070000013C764920 0 DMS Regular 4096 4 Yes 4 1 1 Off 1 0 3 SYSCATSPACE
    0x070000013C766080 1 SMS SysTmp 4096 32 Yes 32 1 1 On 1 0 31 TEMPSPACE1
    0x070000013C7697C0 2 DMS Large 4096 32 Yes 32 1 1 Off 1 0 31 USERSPACE1
    0x070000013C76AF20 3 SMS Regular 32768 32 Yes 32 2 2 Off 1 0 31 TBSP32K0000
    0x070000013C76E660 4 SMS SysTmp 32768 32 Yes 32 2 2 On 1 0 31 TBSP32KTMP0000
    0x070000013CF920C0 5 DMS Large 4096 4 Yes 4 1 1 Off 1 0 3 SYSTOOLSPACE
    0x070000013CF93580 6 SMS UsrTmp 4096 4 Yes 4 1 1 On 1 0 3 SYSTOOLSTMPSPACE

    Tablespace Statistics:
    Address Id TotalPgs UsablePgs UsedPgs PndFreePgs FreePgs HWM Max HWM State MinRecTime NQuiescers PathsDropped
    0x070000013C764920 0 49152 49148 44564 0 4584 44564 44564 0x00000000 0 0 No
    0x070000013C766080 1 1 1 1 0 0 0 0 0x00000000 0 0 No
    0x070000013C7697C0 2 595488 595456 587488 0 7968 587488 587488 0x00000000 0 0 No
    0x070000013C76AF20 3 250 250 250 0 0 0 0 0x00000000 0 0 No
    0x070000013C76E660 4 1 1 1 0 0 0 0 0x00000000 0 0 No
    0x070000013CF920C0 5 8192 8188 380 0 7808 380 380 0x00000000 0 0 No
    0x070000013CF93580 6 1 1 1 0 0 0 0 0x00000000 0 0 No

    Tablespace Autoresize Statistics:
    Address Id AS AR InitSize IncSize IIP MaxSize LastResize LRF
    0x070000013C764920 0 Yes Yes 0 -1 No None None No
    0x070000013C766080 1 Yes No 0 0 No 0 None No
    0x070000013C7697C0 2 Yes Yes 0 -1 No None 03/29/2011 15:05:05.615110 No
    0x070000013C76AF20 3 No No 0 0 No 0 None No
    0x070000013C76E660 4 No No 0 0 No 0 None No
    0x070000013CF920C0 5 Yes Yes 0 -1 No None None No
    0x070000013CF93580 6 Yes No 0 0 No 0 None No

    Containers:
    Address TspId ContainNum Type TotalPgs UseablePgs PathID StripeSet Container
    0x070000013C765E40 0 0 File 49152 49148 0 0 /home/db2inst1/db2inst1/NODE0000/TOOLSDB/T0000000/C0000000.CAT
    0x070000013C767540 1 0 Path 1 1 0 0 /home/db2inst1/db2inst1/NODE0000/TOOLSDB/T0000001/C0000000.TMP
    0x070000013C76ACE0 2 0 File 595488 595456 0 0 /home/db2inst1/db2inst1/NODE0000/TOOLSDB/T0000002/C0000000.LRG
    0x070000013C76C3E0 3 0 Path 250 250 - 0 /home/db2inst1/db2inst1/NODE0000/SQL00001/TBSP32K0000
    0x070000013C76FB20 4 0 Path 1 1 - 0 /home/db2inst1/db2inst1/NODE0000/SQL00001/TBSP32KTMP0000
    0x070000013C76FDC0 5 0 File 8192 8188 0 0 /home/db2inst1/db2inst1/NODE0000/TOOLSDB/T0000005/C0000000.LRG
    0x070000013CF94A40 6 0 Path 1 1 0 0 /home/db2inst1/db2inst1/NODE0000/TOOLSDB/T0000006/C0000000.UTM
    Attached Files Attached Files

  10. #10
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    The tablespaces/containers for TOOLSDB are located on /home/db2inst1/db2inst1/NODE0000. I'm not sure why you have a similiar dir structure on /export/db2inst1/ as well. The creation time of some container dirs is later for those on /home/db2inst1 and this is what this db is using as per db2pd output. Verify the storage path using "db2pd -d <db name> -sto" and if there are any local databases on /export/db2inst1 using "db2 list db directory on /export/db2inst1"


    What I'd suggest to do is to drop this db, remove/rename any left-over container dirs for TOOLSDB (make sure you don't remove containers belonging to some other existing db, if any) and then re-create the db on the desired path.

  11. #11
    Join Date
    Mar 2011
    Posts
    41
    Hello Bello,

    As you suggested, db2pd -d db -sto is pointing to /home/db2inst1 and there is no other database than TOOLSDB .

    I would really appreciate if you provide me the steps to perform (as per your suggestion ) as already some development and dataloads has been in done and we can't afford to lose any data . Thanks .

    Regards
    Satish

  12. #12
    Join Date
    Mar 2011
    Posts
    41
    Hello Bello,


    Will the db2relocatedb help me in this scenario .

    Regards
    Sam

  13. #13
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    I believe TOOLSDB is used by some GUI tools. This db is not for your user data.

    You verified that TOOLSDB is using /home/db2inst1 so just delete (or rename and later delete) /export/db2inst1/db2inst1.

  14. #14
    Join Date
    Mar 2011
    Posts
    41
    Hello Bello,

    Thank you so much for the reply .

    That was my actual query, where I just want the db to be there at /export/db2inst1 instead of /home/db2inst as /home directroy is in the rootvg (root volume group) . I would really like to know whether db2relocated db will help in this scenario or any alternate solution .


    Regards
    Sam ..

  15. #15
    Join Date
    Mar 2011
    Posts
    41
    Hello Bello/All,

    Thank you so much for your replies and suggestions .We are almost there .

    Whats your opinion on the below procedure .

    Example #3: Changing the path associated with a database
    Database name: SALES
    Database path: /home/kschlamb
    Instance name: kschlamb
    Scenario: You’ve realized that you’ve created your database in your instance’s home directory and not on a larger, dedicated file system like you intended. The new database path is called /salesdb.
    As described in one of the sections above, the following directories were created when the database was originally created:
    /home/kschlamb/kschlamb/NODE0000/SQL00001
    /home/kschlamb/kschlamb/NODE0000/sqldbdir
    The first step is for you to manually move these two directories to the locations listed below. Remember, the database path is only part of the directory structure that DB2 uses so you must follow the same rules when you determine the target location. You can use any OS commands that you want to move the files (for example cp/rm, mv, tar).
    /salesdb/kschlamb/NODE0000/SQL00001
    /salesdb/kschlamb/NODE0000/sqldbdir
    The next step is to create the configuration file and run db2relocatedb.
    Configuration File "example3.cfg"
    DB_NAME=SALES
    DB_PATH=/home/kschlamb,/salesdb
    INSTANCE=kschlamb


    Command:
    db2relocatedb –f example3.cfg


    Regards
    Sam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •