Accessing DB2 on AS/400 by DB2-Connect 
Author Message
 Accessing DB2 on AS/400 by DB2-Connect

Hello there,

We have a AS/400 with DB2 installed, and are trying to connect to the
database by DB2 Connect.
We are gaining access to the database, but the tables should be in a library
with the same name as the username of the user which we logged on with.
Is there any way to avoid this, or is this the way you have to connect to
the database.

i.e. when I connect to the AS/400 by the ODBC driver and use the username
'GERBEN', the data which I want to access has to be stored in the library
'GERBEN'.
   I can't connect to another library, which I want to do.

Is there anyway to connect to another library.

With kind regards,

Gerben de Vries



Sat, 03 May 2003 03:00:00 GMT
 Accessing DB2 on AS/400 by DB2-Connect

   Unless anyone else has any suggestions, you could create a view in your own
schema/collection/library which is basically a "SELECT * ..." from the table in
the other schema/collection/library.

   In a strictly workstation environment we have a "CURRENT SCHEMA" special
register, but this doesn't seem to work against an AS/400 server.  :-(

Quote:

> Hello there,

> We have a AS/400 with DB2 installed, and are trying to connect to the
> database by DB2 Connect.
> We are gaining access to the database, but the tables should be in a library
> with the same name as the username of the user which we logged on with.
> Is there any way to avoid this, or is this the way you have to connect to
> the database.

> i.e. when I connect to the AS/400 by the ODBC driver and use the username
> 'GERBEN', the data which I want to access has to be stored in the library
> 'GERBEN'.
>    I can't connect to another library, which I want to do.

> Is there anyway to connect to another library.

> With kind regards,

> Gerben de Vries

--
Larry Menard
IBM Workstation Database (DB2) Performance Team
Defender of Geese and of all things Natural


Sat, 03 May 2003 03:00:00 GMT
 Accessing DB2 on AS/400 by DB2-Connect
Thank you for the idea. I think this should be possible.
In the mean time I have found out another way how to access more libraries.
You have to catalog all the databases (read: libraries on AS/400) and to
connect to them all. In the select statement you can say something like:
SELECT * FROM [library/database].[tablename]

Thanks anyway

Gerben de Vries


Quote:
>    Unless anyone else has any suggestions, you could create a view in your
own
> schema/collection/library which is basically a "SELECT * ..." from the
table in
> the other schema/collection/library.

>    In a strictly workstation environment we have a "CURRENT SCHEMA"
special
> register, but this doesn't seem to work against an AS/400 server.  :-(


> > Hello there,

> > We have a AS/400 with DB2 installed, and are trying to connect to the
> > database by DB2 Connect.
> > We are gaining access to the database, but the tables should be in a
library
> > with the same name as the username of the user which we logged on with.
> > Is there any way to avoid this, or is this the way you have to connect
to
> > the database.

> > i.e. when I connect to the AS/400 by the ODBC driver and use the
username
> > 'GERBEN', the data which I want to access has to be stored in the
library
> > 'GERBEN'.
> >    I can't connect to another library, which I want to do.

> > Is there anyway to connect to another library.

> > With kind regards,

> > Gerben de Vries

> --
> Larry Menard
> IBM Workstation Database (DB2) Performance Team
> Defender of Geese and of all things Natural



Sat, 03 May 2003 03:00:00 GMT
 Accessing DB2 on AS/400 by DB2-Connect
   Sorry, I assumed you knew that, but considered it an unattractive option.
That's how you would do the SELECT in the view creation, but they you would need
to specify it only once.

Quote:

> Thank you for the idea. I think this should be possible.
> In the mean time I have found out another way how to access more libraries.
> You have to catalog all the databases (read: libraries on AS/400) and to
> connect to them all. In the select statement you can say something like:
> SELECT * FROM [library/database].[tablename]

> Thanks anyway

> Gerben de Vries



> >    Unless anyone else has any suggestions, you could create a view in your
> own
> > schema/collection/library which is basically a "SELECT * ..." from the
> table in
> > the other schema/collection/library.

> >    In a strictly workstation environment we have a "CURRENT SCHEMA"
> special
> > register, but this doesn't seem to work against an AS/400 server.  :-(


> > > Hello there,

> > > We have a AS/400 with DB2 installed, and are trying to connect to the
> > > database by DB2 Connect.
> > > We are gaining access to the database, but the tables should be in a
> library
> > > with the same name as the username of the user which we logged on with.
> > > Is there any way to avoid this, or is this the way you have to connect
> to
> > > the database.

> > > i.e. when I connect to the AS/400 by the ODBC driver and use the
> username
> > > 'GERBEN', the data which I want to access has to be stored in the
> library
> > > 'GERBEN'.
> > >    I can't connect to another library, which I want to do.

> > > Is there anyway to connect to another library.

> > > With kind regards,

> > > Gerben de Vries

> > --
> > Larry Menard
> > IBM Workstation Database (DB2) Performance Team
> > Defender of Geese and of all things Natural

--
Larry Menard
IBM Workstation Database (DB2) Performance Team
Defender of Geese and of all things Natural


Sat, 03 May 2003 03:00:00 GMT
 Accessing DB2 on AS/400 by DB2-Connect
   Sorry, I assumed you knew that, but considered it an unattractive option.
That's how you would do the SELECT in the view creation, but then you would need
to specify it only once.

Quote:

> Thank you for the idea. I think this should be possible.
> In the mean time I have found out another way how to access more libraries.
> You have to catalog all the databases (read: libraries on AS/400) and to
> connect to them all. In the select statement you can say something like:
> SELECT * FROM [library/database].[tablename]

> Thanks anyway

> Gerben de Vries



> >    Unless anyone else has any suggestions, you could create a view in your
> own
> > schema/collection/library which is basically a "SELECT * ..." from the
> table in
> > the other schema/collection/library.

> >    In a strictly workstation environment we have a "CURRENT SCHEMA"
> special
> > register, but this doesn't seem to work against an AS/400 server.  :-(


> > > Hello there,

> > > We have a AS/400 with DB2 installed, and are trying to connect to the
> > > database by DB2 Connect.
> > > We are gaining access to the database, but the tables should be in a
> library
> > > with the same name as the username of the user which we logged on with.
> > > Is there any way to avoid this, or is this the way you have to connect
> to
> > > the database.

> > > i.e. when I connect to the AS/400 by the ODBC driver and use the
> username
> > > 'GERBEN', the data which I want to access has to be stored in the
> library
> > > 'GERBEN'.
> > >    I can't connect to another library, which I want to do.

> > > Is there anyway to connect to another library.

> > > With kind regards,

> > > Gerben de Vries

> > --
> > Larry Menard
> > IBM Workstation Database (DB2) Performance Team
> > Defender of Geese and of all things Natural

--
Larry Menard
IBM Workstation Database (DB2) Performance Team
Defender of Geese and of all things Natural


Sat, 03 May 2003 03:00:00 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. DB2 Newbie: Connecting to AS/400 DB2 with JDBC problems

2. DB2 Connect and DB2 OS/400

3. DB2/400 and DB2 Connect

4. DB2 on AS/400 with DB2 Connect

5. DB2 on NT connecting to DB2/400

6. DBD::DB2-Linux-client connect to AS/400-DB2-database

7. Does DB2 Connect support DB2 AS/400 V3R7?

8. can't connect to DB2/400 from DTS, but can from Access 97

9. AS/400 - Seeking info on using VB to access DB2/400

10. AS/400, anyone used Delphi to access DB2/400

11. desire to move data from OS 390 DB2 to AS/400 DB2 using DTS

12. db2/400 vs. db2/Solaris


 
Powered by phpBB® Forum Software