On 2016-03-23 20:43:17 +0000, Shashi Shekhar said:
> On Thursday, March 24, 2016 at 1:07:23 AM UTC+5:30, Ian wrote:
>> On 2016-03-23 01:32:27 +0000, Shashi Shekhar said:
>>
>>> Hi All,
>>>
>>> I found a discrepancy. in output of "db2 list db directory" the "local
>>> database directory" is showing as "/db2home/db2inst1". and "db2 get dbm
>>> cfg | grep DBPATH" as /db_data.
>>>
>>> I don't understand why there is difference and how can we change from
>>> "/db2home/db2inst1" to "/db_data".
>>> could you please share any idea, Thanks in advance.
>>
>>
>> The DFTDBPATH database manager (DBM) configuration parameter is just a
>> default value -
>> if you create a database without specifying `DBPATH ON /path`, then DB2
>> will use the value
>> of `DFTDBPATH` specified in the DBM configuration.
>
> Thanks Ian for reply.
>
> Just clarifying my concept, Data will be stored at path referred by "DBPATH" ?
Not necessarily. The database path always configuration information (database
configuration file, location of tablespace containers, the log file header,
etc.) in the database path. Tablespace containers may reside in the database
path, but that's far less common.
Please read the documentation for the CREATE DATABASE command,
paying attention to the 'ON' and 'DBPATH ON' parameters.
http://www.ibm.com/support/knowledgecenter/#!/SSEPGG_10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0001941.html?cp=SSEPGG_10.5.0%2F3-6-2-4-21
> What is significance of path "/db2home/db2inst1" of below command -
>
> "db2 list db directory" the "local database directory" is showing as
> "/db2home/db2inst1". "
>
> Can we be able to change to /db_data ?
The path /db2home/db2inst1 is the database path (i.e. what DB2 used for
DBPATH ON
for the create database statement).
You can change this. The easiest way to do it is via backup/restore.
>