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 > Change default instance location

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-30-09, 08:12
mrcob mrcob is offline
Registered User
 
Join Date: Sep 2009
Posts: 4
Change default instance location

New to DB2, just installing DB2 Express-C. Spent some time reading the documentation (okay really briefly) and searching the net but I can't find the answer to this question:

During install I do not want ANYTHING installed to c:\db2. I want to choose where all files go. How do I change the instance location (and anything else that gets installed there).

This is a fresh install (again). There has got to be a way to "undummify" this blasted thing.

Last edited by mrcob; 09-30-09 at 08:16.
Reply With Quote
  #2 (permalink)  
Old 09-30-09, 08:23
Mathew_paul Mathew_paul is offline
Registered User
 
Join Date: Oct 2007
Posts: 200
chk on db2relocatedb tool
will help you to relocated the instance location
regds
Paul
Reply With Quote
  #3 (permalink)  
Old 09-30-09, 08:26
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
Not got hold of your question properly!
Doesn't GUI asks for Installation location while installing DB2. I recall it asks for it ?
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #4 (permalink)  
Old 09-30-09, 09:31
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Do you mean the database path? On Windows the instance directory is under "Application Data" in the "Documents and Settings" directory.

You don't have much choice for the database path on Windows; you can only specify a different drive letter by updating the DFTDBPATH instance configuration parameter.
Reply With Quote
  #5 (permalink)  
Old 09-30-09, 10:46
mrcob mrcob is offline
Registered User
 
Join Date: Sep 2009
Posts: 4
Quote:
Originally Posted by rahul_s80
Not got hold of your question properly!
Doesn't GUI asks for Installation location while installing DB2. I recall it asks for it ?
In addition to the install location, it installs the default instance in C:\DB2 without prompting where to put it.

Quote:
Originally Posted by n_i
You don't have much choice for the database path on Windows; you can only specify a different drive letter by updating the DFTDBPATH instance configuration parameter.
Well that sucks. I am a firm believer in data belongs on the data drive(s), never EVER on the system drive. Why is this such a difficult concept for developers to wrap their head around?

Guess I could try creating a new instance in a different location post-install, make that the default, then remove the old one. Should work but just feels "wrong" somehow to have to jump through some many hoops.

Thanks all for the help/input.
Reply With Quote
  #6 (permalink)  
Old 09-30-09, 11:58
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by mrcob

Well that sucks. I am a firm believer in data belongs on the data drive(s), never EVER on the system drive. Why is this such a difficult concept for developers to wrap their head around?
Not sure what developers you have in mind, but nothing prevents you from specifying the database path, or individual tablespaces' paths, when creating them, if you don't like the default.
Reply With Quote
  #7 (permalink)  
Old 09-30-09, 15:16
mrcob mrcob is offline
Registered User
 
Join Date: Sep 2009
Posts: 4
It would appear I am getting conflicting information here.

Quote:
Originally Posted by n_i
You don't have much choice for the database path on Windows; you can only specify a different drive letter by updating the DFTDBPATH instance configuration parameter.
This would imply that only the drive letter (on Windows) can be changed, which is consistent with what I have read in the documentation and on other forums. I've read (forget where) that on Windows only, the DFTDBPATH can only specify the drive letter, the path is ignored if specified.

But now I get this reply:

Quote:
Originally Posted by n_i
Not sure what developers you have in mind, but nothing prevents you from specifying the database path, or individual tablespaces' paths, when creating them, if you don't like the default.
If this is in fact the case, please share EXACTLY how to do this.

Edit: Just noticed its the same user giving me conflicting information. Nice!!!
Reply With Quote
  #8 (permalink)  
Old 09-30-09, 15:57
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
I don't deal with DB2 installation on Windows, but it looks like you can use the following in order to change the location of an existing instance / future instances:

db2iupdt /p <new path>
db2set -g DB2INSTPROF=<new path>


For databases, you can specify the drive on the create db command, the same for create tablespace
Reply With Quote
  #9 (permalink)  
Old 09-30-09, 16:19
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
for create db on path instead of drive, take a look at DB2_CREATE_DB_ON_PATH registry variable
Reply With Quote
  #10 (permalink)  
Old 09-30-09, 17:40
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by mrcob

If this is in fact the case, please share EXACTLY how to do this.
Check the CREATE DATABASE and CREATE TABLESPACE commands in the manual.

Quote:
Originally Posted by mrcob
Edit: Just noticed its the same user giving me conflicting information. Nice!!!
If you don't understand something, it's often better to ask for clarifications than to blame other people.
Reply With Quote
  #11 (permalink)  
Old 09-30-09, 19:05
mrcob mrcob is offline
Registered User
 
Join Date: Sep 2009
Posts: 4
Quote:
Originally Posted by n_i
If you don't understand something, it's often better to ask for clarifications than to blame other people.
My apologies if it seems that way. I was venting my frustration a bit on the often conflicting information on this topic. Guilty there.

My question (not well expressed I guess) was: I seem to missing finding this information in the manual, or on this and other forums. In fact I see the same question pop up repeatedly on various forums with no answer, which quite frankly worried me.

I was looking to:
a) Ideally change location of default instance during install (apparently not)
b) failing that, move the default instance (tricky)
c) or failing that, make a new instance where I want and make that the default (doable)

This has been answered here (I think). I'm about to give it a try, so we'll see.

Again thank you all for the advice/help. Sorry if I ruffled some feathers.
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