ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Connect two iSeries DB

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connect two iSeries DB

    Hi
    Can I connect two DB (two iseries v6) with three parts name: DBServer.Library.File?
    I'd configure WRKRDBDIRE already.
    I did:
    CONNECT TO REMOTE USER INO USING ''
    Select * from REMOTE.LIBINO.File (works fine)
    SET CONNECTION *LOCAL
    Select * from REMOTE.LIBINO.File (SQL0114 error)

    Help pls.
    Thanks
    Ino

  • #2
    Re: Connect two iSeries DB

    you can only have an active connection to one database at a time. when you SET CONNECTION to *LOCAL you no longer have access to the remote system.
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Connect two iSeries DB

      Thanks tomholden.
      So, how I can get records from another iseries db with three parts name, for example, in a store procedure?

      Comment


      • #4
        Re: Connect two iSeries DB

        Ddm ?

        Comment


        • #5
          Re: Connect two iSeries DB

          how are you trying to do this? embedded into a program, straight-up SQL? for a program just connect to the remote system use a cursor and write the data onto the local system using RLA. for plain jane SQL...where's Birgitta?
          I'm not anti-social, I just don't like people -Tommy Holden

          Comment


          • #6
            Re: Connect two iSeries DB

            AFAIK accessing 2 DB2 (in several IASP or several System i) at the same time is only possible with the separately charged product DB2 Multisystem.

            For more information please check the information center:
            DB2 Multisystem

            Birgitta

            Comment


            • #7
              Re: Connect two iSeries DB

              Tommy,
              I'm trying connect within store procedure, like this:
              select * from system1.schema1.table1 as t1 join system2.schema2.table2 t2 on t1.id=t2.id
              Thanks

              Comment


              • #8
                Re: Connect two iSeries DB

                Originally posted by ino View Post
                Tommy,
                I'm trying connect within store procedure, like this:
                select * from system1.schema1.table1 as t1 join system2.schema2.table2 t2 on t1.id=t2.id
                Thanks
                as i said...it's not going to work. you can only connect to ONE database at a time
                I'm not anti-social, I just don't like people -Tommy Holden

                Comment

                Working...
                X