| |
|
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.
|
 |

11-20-03, 11:28
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 30
|
|
|
db2 8.1 windows: instance path
|
|
Hi,
i am running db2 and created a sample database a few days ago. This sample database is running in an instance called "db2". This instance seems to be on my c:\db2 and all my created databases appear in c:\db2\node0000\Sql0000*
First of all, is the Instance db2 represented by the node0000 folder?
How can i move the whole instance to another path, i want the databases to be created elsewhere.
I just found "db2relocatedb" as a command, but this seems not the best idea if you want a general change in terms of filesystem path.
I checked the ControlCenter and cant find anything how to change the path, i am wondering anyway how it was decided to use c:\db2, i installed the product in a different path and have not defined c:\db2 in the setup procedure or somewhere else.
Thanks for input.
marc
|
|

11-20-03, 11:56
|
|
Registered User
|
|
Join Date: May 2003
Location: USA
Posts: 5,198
|
|
On the db2icrt command to create an instance, there is an option for Windows as follows:
-p InstProfPath
Specifies the instance profile path.
I don't know if this is what you want. I doubt you can change an existing instance, but you can backup the databases, drop the instance (db2idrop), recreate the instance (assuming the above will create the path you want), and then restore the databases.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
|
|

11-21-03, 03:54
|
|
Registered User
|
|
Join Date: Apr 2003
Posts: 191
|
|
|
Re: db2 8.1 windows: instance path
|
|
Hi,
do you want to move the instance or have new databases created elsewhere?
Basically, in order to change the default database path for new dbs you update the instance configuration:
db2 update dbm cfg using dftdbpath X:\trythisinstead
Johann
Quote:
Originally posted by loge
Hi,
i am running db2 and created a sample database a few days ago. This sample database is running in an instance called "db2". This instance seems to be on my c:\db2 and all my created databases appear in c:\db2\node0000\Sql0000*
First of all, is the Instance db2 represented by the node0000 folder?
How can i move the whole instance to another path, i want the databases to be created elsewhere.
I just found "db2relocatedb" as a command, but this seems not the best idea if you want a general change in terms of filesystem path.
I checked the ControlCenter and cant find anything how to change the path, i am wondering anyway how it was decided to use c:\db2, i installed the product in a different path and have not defined c:\db2 in the setup procedure or somewhere else.
Thanks for input.
marc
|
|
|

11-21-03, 08:57
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 30
|
|
|
Re: db2 8.1 windows: instance path
Hi,
basically i want to move everything in my path, that is:
c:\db2\nodexxxx\sqlxxxx
Am i correct that nodexxx is my instance? and sqlxxx are my databases?
Why cant i define an instance visually in the ControlCenter and define a path. The mask in the GUI tool doesnt show me any path at all. Not for an instance, not for a database.
When i want to perform: db2 update ... on the shell, i get
Commandline Environment wasnt initialized. (Translation from german error message)
=======> this was solved. I thought i can execute db2 directly on the dos shell instead i have to use db2cmd
Quote:
Originally posted by jsander
Hi,
do you want to move the instance or have new databases created elsewhere?
Basically, in order to change the default database path for new dbs you update the instance configuration:
db2 update dbm cfg using dftdbpath X:\trythisinstead
Johann
|
|
Last edited by loge; 11-21-03 at 09:21.
|

11-21-03, 09:02
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: UK
Posts: 4,534
|
|
|
Re: db2 8.1 windows: instance path
db2 is the name of the isntance and nodexxxx is the node number , which for a non-partitioned db is always node0000 . sqlxxxx is the database reference ..
Sathyaram
Quote:
Originally posted by loge
Hi,
basically i want to move everything in my path, that is:
c:\db2\nodexxxx\sqlxxxx
Am i correct that nodexxx is my instance? and sqlxxx are my databases?
Why cant i define an instance visually in the ControlCenter and define a path. The mask in the GUI tool doesnt show me any path at all. Not for an instance, not for a database.
When i want to perform: db2 update ... on the shell, i get
Commandline Environment wasnt initialized. (Translation from german error message)
|
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
|
|

11-21-03, 09:11
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 30
|
|
ok, i found the "dftdbpath" paramter inside my instance. It was just "c:", now i tried to change to "c:\mypath", but i cant define any path behind the drive letter. Is this normal? I tried with trailing backslash and even with slashes instead of backslashes. No luck.
The same goes when doing it via "db2 update dbm..." i get the error:
"invalid entry for dftdbpath"
Can you only define the drive letter? This would be a little bit dissapointing.
marc
|
Last edited by loge; 11-21-03 at 09:23.
|

11-21-03, 09:37
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: UK
Posts: 4,534
|
|
Yes ... You can define only the drive letter ...
Cheers
Sathyaram
Quote:
Originally posted by loge
ok, i found the "dftdbpath" paramter inside my instance. It was just "c:", now i tried to change to "c:\mypath", but i cant define any path behind the drive letter. Is this normal? I tried with trailing backslash and even with slashes instead of backslashes. No luck.
The same goes when doing it via "db2 update dbm..." i get the error:
"invalid entry for dftdbpath"
Can you only define the drive letter? This would be a little bit dissapointing.
marc
|
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
|
|

11-21-03, 09:40
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 30
|
|
yeah i just read it somewhere on the web too, this seems to be a Win32 only issue. On unix you can define /mypath and so on.
So, at the end, i cant place my database files in a subfolder on windows. This sounds like an idiotic restriction...
Quote:
Originally posted by sathyaram_s
Yes ... You can define only the drive letter ...
Cheers
Sathyaram
|
|
|

11-21-03, 10:07
|
|
Registered User
|
|
Join Date: May 2003
Location: USA
Posts: 5,198
|
|
Do you mind me asking why you want to move the folders to a sub-folder?
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
|
|

11-24-03, 09:41
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 30
|
|
This is obvious, i have a folder structure in mind when it coms to my databases. Nothing serious, but on my PC, where i develop applications, i dont want to have too much folders in my C: root. But DB2 will place its instance stuff in the root, no matter if i like that. Its really only a personal taste issue.
Quote:
Originally posted by Marcus_A
Do you mind me asking why you want to move the folders to a sub-folder?
|
|
|

12-15-03, 10:29
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 3
|
|
|
same problem in UNIX
Hi folks,
I have the same problem in UNIX. After installed DB2V8 FP4 on AIX4.3.3. One intance called db2inst1 already been setup on /db2home/db2inst1. Now I want to create the second instance say db2test on /aixdb2/db2test. I think what I need to do is
db2set -i db2inst1 db2instprof=/aixdb1/db2test,
db2icrt -u db2fenc2 db2test
After this, I still found the instance has been created unter /db2home/db2inst1. Anyone has any idea what happened? Do I need to update dbm cfg as well?
Thanks a lot for your input.
Catcat
|
|

12-16-03, 05:39
|
|
Registered User
|
|
Join Date: Jul 2001
Location: Bangalore, India
Posts: 28
|
|
|
instance path..
I have a work around for this... not sure if it really helps..
1. create a logical drive as the path that u want to create the database.
For ex: map the folder "c:\mypath" as "G:"
2. Now if you create the database on "G:", the physical database will be placed under "c:\mypath" and you will find the db structure as "c:\mypath\db2\node0000\sql*"
3. Be careful not to remove mapping of the folder to the drive. If the mapping is removed, the database will not startup as it still expects "G:" to exist.
I do not advice this, but this is a work around.
Reg
Ravi
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|