View Single Post

   
  #4 (permalink)  
Old 02-27-2008, 03:49 AM
Santiago Ordax Solivellas
 
Posts: n/a
Default Re: SQL error 204 when we try to access tables via alias

To Thiru:

> Hi,
> Is enough privileges availables for both the libraries to access the
> other library's object?
>
> Cheers,
> Thiru


Well, if you are talking about the privileges granted to the users
that have the same name as the library, lib1 user has enough
privileges on lib2 library. There is no lib2 user.

To Knut:

Knut Stolze <stolze@de.ibm.com> wrote in message > I don't quite understand your question. A table is uniquely identified by
> its schema name, combined with the table name. If no explicit schema name
> is given, then DB2 will consult a so-called special register named CURRENT
> SCHEMA. Per default, the value in that special register is set to the name
> of the user who connected to the database.
>
> In the above examples, the schema name used to find the tables is OWNER,
> lib1, or lib2. Do you actually want to do away with the schemas
> alltogether?
>
> Personally, I'd recommend to _always_ qualify your table names explicitly
> with schema names. I don't see a good reason speaking against it, and it
> does make things clearer.


We are using an user with the same name as the library lib1, so the
user in the above examples is lib1.

We are developing and testing or programs on PC workstations and
accessing database on a AS/400 host via DB2 connect. Once the programs
are finished they are generated to host where they run. We do not
qualify table names on our programs cause we want them to use the
database library the AS/400 user has defined in his library list.

There is no problem with alias once the programs are running on the
AS, our problem is when accessing via DB2 connect with our developing
tool or any DB2 client.

Thanks both
Reply With Quote