473,289 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Database Physical Location in UDB 8.1

Hi,

How do I know the physical database path of a database. When I goto
the DB2INSTANCE users's directory (/home/db2inst1), I see following
folders:

/db2inst1/NODE0000/SQL00001
/db2inst1/NODE0000/SQL00002
/db2inst1/NODE0000/SQL00003
/db2inst1/NODE0000/SQL00004
/db2inst1/NODE0000/SQL00005

How do I know which database is using which of the above directory?

Is there any command, using which, if I supply the DB Name it will
give me the physical location of the database on server?

OS: Solaris 9
DB2: IBM UDB 8.1

Regards,
Kamlesh
Nov 12 '05 #1
8 7867
In article <26*************************@posting.google.com> , Kamlesh
(ka*********@yahoo.com) says...
Hi,

How do I know the physical database path of a database. When I goto
the DB2INSTANCE users's directory (/home/db2inst1), I see following
folders:

/db2inst1/NODE0000/SQL00001
/db2inst1/NODE0000/SQL00002
/db2inst1/NODE0000/SQL00003
/db2inst1/NODE0000/SQL00004
/db2inst1/NODE0000/SQL00005

How do I know which database is using which of the above directory?

Is there any command, using which, if I supply the DB Name it will
give me the physical location of the database on server?


Hi,

You can use the 'list db directory on ....' command to get the
physical path.
Nov 12 '05 #2
If you haven't moved the log files from their default location; you can
examine the database configuration and get the directory from the "Path
to log files" value.

You can also examine ..../NODE0000/sqldbdir/sqldbdir. That file contains
the database names and directory for each but it's not intended to be
read by people.

If you connect to a database; you can use "list tablespace containers
for 0" which will give you the path to the containers.

Phil Sherman
Kamlesh wrote:
Hi,

How do I know the physical database path of a database. When I goto
the DB2INSTANCE users's directory (/home/db2inst1), I see following
folders:

/db2inst1/NODE0000/SQL00001
/db2inst1/NODE0000/SQL00002
/db2inst1/NODE0000/SQL00003
/db2inst1/NODE0000/SQL00004
/db2inst1/NODE0000/SQL00005

How do I know which database is using which of the above directory?

Is there any command, using which, if I supply the DB Name it will
give me the physical location of the database on server?

OS: Solaris 9
DB2: IBM UDB 8.1

Regards,
Kamlesh


Nov 12 '05 #3

"Kamlesh" <ka*********@yahoo.com> wrote in message
news:26*************************@posting.google.co m...
Hi,

How do I know the physical database path of a database. When I goto
the DB2INSTANCE users's directory (/home/db2inst1), I see following
folders:

/db2inst1/NODE0000/SQL00001
/db2inst1/NODE0000/SQL00002
/db2inst1/NODE0000/SQL00003
/db2inst1/NODE0000/SQL00004
/db2inst1/NODE0000/SQL00005

How do I know which database is using which of the above directory?

Is there any command, using which, if I supply the DB Name it will
give me the physical location of the database on server?

OS: Solaris 9
DB2: IBM UDB 8.1

I'm not sure how to get from the directory that you want to the database
name but I can tell you how to get from the database name to the directory.
If you follow these instructions, you should be able to map each of your
databases to a specific directory. Once you have built this map, it will be
easy to determine which database is associated with a specific directory.

1. Execute this command at your DB2 CLP prompt:
db2 list database directory

This will list all of your system database directory.

Find the database that interests you in the result via its database name,
e.g. SAMPLE. Look at the value of 'database drive' for that database.

2. Execute this command at your DB2 CLP prompt:

db2 list database directory on <database_drive>

The directory name you want will appear in the result of that query in the
'database directory' value for the desired database, e.g. SQL00002.

Just in case that is not clear, this is what I did on my system, which is
DB2 V7.2 on Windows XP:
db2 list database directory
Result:

[snip]

Database 6 entry:
Database alias = SAMPLE
Database name = SAMPLE
Database drive = C:\DB2
Database release level = 9.00
Comment = DB2 Sample Database
Directory entry type = Indirect
Catalog node number = 0

Then, using the 'database drive' value for database Sample, I executed:
db2 list database directory for c:\DB2


Result:

[snip]

Database 2 entry:
Database alias = SAMPLE
Database name = SAMPLE
Database directory = SQL00002
Database release level = 9.00
Comment =
Directory entry type = Home
Catalog node number = 0
Node number = 0

The directory name you want, SQL00002, is in the 'database directory' field
of this result under the SAMPLE database's entry.

If you simply repeat this process for each of your databases, you will soon
know exactly which database maps to each directory.

Rhino

Nov 12 '05 #4
Thanks for all your response on this topic. I am able to get the
details I require using the following:

db2 list database directory
and then...
db2 list database directory on <database_drive>

I need one clarification here. The solution provided by you all is
only possible I am executing the commands directly on the Server
Console. Can I get the DB Physical Location from my Client System
which is having DB2 Client software installed. I have both Windows
and Unix based clients.

Regards,
Kamlesh
Nov 12 '05 #5

"Kamlesh" <ka*********@yahoo.com> wrote in message
news:26**************************@posting.google.c om...
Thanks for all your response on this topic. I am able to get the
details I require using the following:

db2 list database directory
and then...
db2 list database directory on <database_drive>

I need one clarification here. The solution provided by you all is
only possible I am executing the commands directly on the Server
Console. Can I get the DB Physical Location from my Client System
which is having DB2 Client software installed. I have both Windows
and Unix based clients.

Why don't you try it yourself and see? Use the same commands at the CLP on
your client.

Rhino
Nov 12 '05 #6
"list tablespace containers for 0" is run after establishing a database
connection. This should also work on the client. You will, of course,
need appropriate authorization to run the "list tablespace containers"
command.

Phil Sherman

Kamlesh wrote:
Thanks for all your response on this topic. I am able to get the
details I require using the following:

db2 list database directory
and then...
db2 list database directory on <database_drive>

I need one clarification here. The solution provided by you all is
only possible I am executing the commands directly on the Server
Console. Can I get the DB Physical Location from my Client System
which is having DB2 Client software installed. I have both Windows
and Unix based clients.

Regards,
Kamlesh


Nov 12 '05 #7
The list command for directories runs against the instance (they are
instance objects) that is identified by either the OS environment
variable DB2INSTANCE or by the db2 global registry profile variable
DB2INSDEF.
Both these variables are resolved as the application, the db2cmd command
window, is launched on the local system.
So your command on the server shows where the db's are located on that
server.
The command on your client would show the db's on your client, if any,
never the remote db's on the server.
HTH, Pierre.

Kamlesh wrote:
Thanks for all your response on this topic. I am able to get the
details I require using the following:

db2 list database directory
and then...
db2 list database directory on <database_drive>

I need one clarification here. The solution provided by you all is
only possible I am executing the commands directly on the Server
Console. Can I get the DB Physical Location from my Client System
which is having DB2 Client software installed. I have both Windows
and Unix based clients.

Regards,
Kamlesh


--
Pierre Saint-Jacques - Reply to: sescons at attglobal dot com
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.
Nov 12 '05 #8
As an add on to this.
The list db directory on the client will show the path, on the server,
where the db exists.
If you map the server target drive to your platform, then you could run
the list db directory on <path>.
HTH, Pierre.
Pierre Saint-Jacques wrote:
The list command for directories runs against the instance (they are
instance objects) that is identified by either the OS environment
variable DB2INSTANCE or by the db2 global registry profile variable
DB2INSDEF.
Both these variables are resolved as the application, the db2cmd command
window, is launched on the local system.
So your command on the server shows where the db's are located on that
server.
The command on your client would show the db's on your client, if any,
never the remote db's on the server.
HTH, Pierre.

Kamlesh wrote:
Thanks for all your response on this topic. I am able to get the
details I require using the following:

db2 list database directory and then...
db2 list database directory on <database_drive>

I need one clarification here. The solution provided by you all is
only possible I am executing the commands directly on the Server
Console. Can I get the DB Physical Location from my Client System
which is having DB2 Client software installed. I have both Windows
and Unix based clients.

Regards,
Kamlesh



--
Pierre Saint-Jacques - Reply to: sescons at attglobal dot com
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.
Nov 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: yensao | last post by:
Hi, I have a hard time to understand difference and similarities between Relational database model and the Object-Oriented model. Can somebody help me with this? Thank you in advance. ...
0
by: Cherrish Vaidiyan | last post by:
sir, The following are the steps that i followed in setting up standby database on Red hat Linux 9. i am using Oracle 9i. i have followed the steps in this site : ...
3
by: Cristina | last post by:
Hallo i am a beginner into Oracle Technologies.I would like to make backup of my database,but i dont know how.Is there tools?Can i schedule the backup plan? thanks Cristina
2
by: Massimiliano Campagnoli | last post by:
Good morning, Database PRODUCTION was created on a system mamanged tablespace on drive c:\ Now drive c:\ is running out of space and I need to move PRODUCTION to the larger drive d:\ on the...
7
by: jimdscudder | last post by:
How can I use WMI or a WqlObjectQuery to find the hard drive letter of the physical drive location index. For example the following code will give me the physical drive location:...
7
by: Luis Mendes | last post by:
Hello, I've a application in VB.NET that uses a connection to a Access data base stored in my Hard Drive. How can I change the location of the database (To a network) and change the conection...
2
by: ad | last post by:
I am use a Database name "myBase" of SqlExpress 2005 as DataBase. How can I get the physical location of "myBase"
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
5
by: Jonathan Wood | last post by:
I have a Web application. Initially, I created a database in the App_Data folder and then attached it to SQL Servero 2005 (not SQL Server Express). I realize now that this is now what I want. So...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.