E-com DevBlog Spider-ball-vacuum

21Aug/081

How to setup DB2 mapping

After getting a new comp after infecting my old one with a nice little virus, I had to setup DB2 on my box again.  Luckily Ryan remembered how to do it, but in order to keep this information all in one place, here is the process:

Install DB2 Universal Database.  We used version 8.2

Mapping required to access DB2:
this info can also be seen at http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/db2.html
Under the command line in the db2 installation you will need to run the following commands.

create the instance alias using the following commands:

db2 "catalog tcpip node [dev_server] remote [dev_server] server 446"
db2 "terminate"

create the database alias using the following commands:

db2 "catalog database [dev_server] as [new_dev_alias] at node [dev_server] authentication server"
db2 "terminate"

After mapping reboot your computer so the necessary DLLs will be picked up.

Then you should configure your application's hostname and database to the [new_dev_alias] unless you are using the db2u driver(in Codeigniter), in which case the [dev_server] works.

Print This Post Print This Post
Tagged as: , 1 Comment