By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

Accessing a remote DB2 server

P: n/a
If I have DB2 8.1 (FP5, I believe, but not relevant to my question...I hope)
installed on my desktop, do I have what I need to connect to a remote DB2
server (also running 8.1 FP5) from my desktop machine? I assume, perhaps
naively, that all the parts are there but I've spent several hours trying to
grasp how to go about accessing the remote server.

Specifically, I'm trying to create and populate databases on the remote
server from command line scripts. So, currently I have a file containing SQL
commands to create and populate the database which I invoke using:
db2cmd -c -w -i db2 -t -f <filename>

Works great creating everything on my machine but I'd like to be able to run
the scripts from my machine and have it create and populate the databases on
the remote server.

This is trivial in SQL Server but apparently IBM wants to make sure that its
DBA's continue to make lots of money.

Can anyone let me know if this is even possible given my current
configuration and, if so, provide a simple step-by-step description of how
to achieve it?

Thanks,
Doug Harber
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Douglas Harber" <re*******************@hotmail.com> wrote in message
news:_u********************@comcast.com...
If I have DB2 8.1 (FP5, I believe, but not relevant to my question...I hope) installed on my desktop, do I have what I need to connect to a remote DB2
server (also running 8.1 FP5) from my desktop machine? I assume, perhaps
naively, that all the parts are there but I've spent several hours trying to grasp how to go about accessing the remote server.

Specifically, I'm trying to create and populate databases on the remote
server from command line scripts. So, currently I have a file containing SQL commands to create and populate the database which I invoke using:
db2cmd -c -w -i db2 -t -f <filename>

Works great creating everything on my machine but I'd like to be able to run the scripts from my machine and have it create and populate the databases on the remote server.

This is trivial in SQL Server but apparently IBM wants to make sure that its DBA's continue to make lots of money.

Can anyone let me know if this is even possible given my current
configuration and, if so, provide a simple step-by-step description of how
to achieve it?

Thanks,
Doug Harber

Yes, you have everything you need. In fact, all you really need is a client
and not the database installed on your machine.

However, first you need to catalog the remote database on your machine. This
is a two step process which includes cataloging the remote node, and the
remote database. The easiest way is to use the GUI Configuration Assistant
(Set Up Tools) in the DB2 folder. You may need help from your DBA, but it is
only a one time set up. If need help, check the manuals.

It might be easier to submit the scripts via the GUI interface. Open the
Command Center to import scripts and submit them.
Nov 12 '05 #2

P: n/a
In article <o6********************@comcast.com>, Mark A
(no****@nowhere.com) says...
"Douglas Harber" <re*******************@hotmail.com> wrote in message
news:_u********************@comcast.com...
If I have DB2 8.1 (FP5, I believe, but not relevant to my question...I

hope)
installed on my desktop, do I have what I need to connect to a remote DB2
server (also running 8.1 FP5) from my desktop machine? I assume, perhaps
naively, that all the parts are there but I've spent several hours trying

to
grasp how to go about accessing the remote server.

Specifically, I'm trying to create and populate databases on the remote
server from command line scripts. So, currently I have a file containing

SQL
commands to create and populate the database which I invoke using:
db2cmd -c -w -i db2 -t -f <filename>

Works great creating everything on my machine but I'd like to be able to

run
the scripts from my machine and have it create and populate the databases

on
the remote server.

This is trivial in SQL Server but apparently IBM wants to make sure that

its
DBA's continue to make lots of money.

Can anyone let me know if this is even possible given my current
configuration and, if so, provide a simple step-by-step description of how
to achieve it?

Thanks,
Doug Harber

Yes, you have everything you need. In fact, all you really need is a client
and not the database installed on your machine.

However, first you need to catalog the remote database on your machine. This
is a two step process which includes cataloging the remote node, and the
remote database. The easiest way is to use the GUI Configuration Assistant
(Set Up Tools) in the DB2 folder. You may need help from your DBA, but it is
only a one time set up. If need help, check the manuals.

It might be easier to submit the scripts via the GUI interface. Open the
Command Center to import scripts and submit them.


And to add to Mark's remarks you can create a remote database after
attaching to the remote node.

Something like:

db2 attach to <remote_node> user <user> using <password>
db2 create database <dbname> <additional options>
db2 connect to <dbname> user <user> using <password>
db2 create table <tbname> ......
.....

Kind regards, Gert
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.