0

I'm taked with buildig a web service that gets it's data from an old AS400 database server.

I'm trying to connect over nodejs using https://github.com/ibmdb/node-ibm_db and i'm getting this error on most databases.

SQL30061N The database alias or database name "database name here" was not found at the remote node. SQLSTATE=08004

Except from one, that states: An attempt to connect to a host failed due to a missing DB2 Connect product

(that's more or less expected)

I noticed that the last one is the *local database, and the rest have some other remote name. enter image description here I also noticed that here it's stated that i can only connect to the *local database, but it never explains why http://www-03.ibm.com/systems/resources/systems_i_software_db2_pdf_db2connect.pdf

I'm really confused, all these databases are "local" in the sense they are all hosted in the same physical machine. what does *local mean on a remote location and why i cant connect to the other databases if they are not *local?

Joaquin Brandan
  • 133
  • 1
  • 5

1 Answers1

0

You can connect to remote databases interactively, as long as the system name is in the host table on the AS400. If you issue an interactive SQL session command, CONNECT TO system_name, it should connect to that system, providing your profile exists on the other side, and any subsequent queries would look at the tables on that machine. However, one physical AS400 machine can have many partitions or LPARs. This means that, in order to connect to those databases, you must first connect to the specific LPAR (in your case, the second column provides those values). I am not aware of any way to connect, behind the scenes, to a single system, then to other systems and their databases, nor would you probably want to obfuscate the connection that way anyhow. So, I would grab credentials to those other systems that are listed. If they happen to refer to the same actual AS400 partition, which is highly unlikely, then you have more issues than just DB connections.

Mali_Urke
  • 1
  • 4