If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Problems updating cfg

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-31-07, 09:50
jlundgren jlundgren is offline
Registered User
 
Join Date: Oct 2007
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 10-31-07, 13:15
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #3 (permalink)  
Old 10-31-07, 18:46
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On