vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| "Douglas Harber" <remove-douglas_harber@hotmail.com> wrote in message news:_uedneC91LoSsGLcRVn-rA@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. |
| ||||
| In article <o66dnaBpt474rWLcRVn-gw@comcast.com>, Mark A (nobody@nowhere.com) says... > "Douglas Harber" <remove-douglas_harber@hotmail.com> wrote in message > news:_uedneC91LoSsGLcRVn-rA@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 |