Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    1

    Unanswered: Problems updating cfg

    Hello everybody,

    I'm new to *nix and db2, and with that said, I have a problem.

    I have a version of DB2 installed on a AIX server. I want to create a large database, but do not have enough space under the default location for databases. I googled it, and saw that it was /home/<instance-owner> which in my case is db2inst1. I confirmed this by doing a "db2 get dbm cfg" and found the value under "DFTDBPATH"!

    Ive created a new partition with 10GB and mounted it has /DB2 and given db2inst1 ownership and lvl 7 access (recursively).

    Now, I want to change the default path, so that when I create a Database, it is placed under /DB2/some-dir

    I tried running

    $ db2 update dbm cfg using DFTDBPATH /DB2

    But it quickly returned
    DB21019E An error occurred while accessing the directory ".".

    Seems to me to be a privilege problem - but where? I have root-access to the machine...

    Thanks,

    jlundgren

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Quote Originally Posted by jlundgren
    Hello everybody,

    I'm new to *nix and db2, and with that said, I have a problem.

    I have a version of DB2 installed on a AIX server. I want to create a large database, but do not have enough space under the default location for databases. I googled it, and saw that it was /home/<instance-owner> which in my case is db2inst1. I confirmed this by doing a "db2 get dbm cfg" and found the value under "DFTDBPATH"!

    Ive created a new partition with 10GB and mounted it has /DB2 and given db2inst1 ownership and lvl 7 access (recursively).

    Now, I want to change the default path, so that when I create a Database, it is placed under /DB2/some-dir

    I tried running

    $ db2 update dbm cfg using DFTDBPATH /DB2

    But it quickly returned
    DB21019E An error occurred while accessing the directory ".".

    Seems to me to be a privilege problem - but where? I have root-access to the machine...

    Thanks,

    jlundgren
    Try running the command as:

    $ db2 "update dbm cfg using DFTDBPATH /DB2"

    or

    $ db2 update dbm cfg using DFTDBPATH "/DB2"

    Andy

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You do not need to (and probably do not want to) change the default path of the database. All you need to do is to create a user tablespace(s) that are located on your new mount point, and specify that new tablesapce(s) be used in the CREATE TABLE statements.

    It is very typical to create the instance and database on the home directory of the instance owner, and to create most of the tablespaces on another mount point.

    Make sure that the instance owner is the owner of any new paths for your new tablespaces to be located on the other mount points, before you create the new tablespaces. These cannot be owned by root.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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