Hi all,

we have a conflict with Oracle and synonyms:
Setup at the client:
on ACC, 2 users:
S366: schema owner. Has the rights to create tables, views etc.
A366: has only rights to update data. Has a synonym that references the
views that we need in the driver.

JDBC driver (remote loader) using the parameter
"-Doracle.jdbc.includeSynonyms=true"

When referencing the views/synonyms directly by the synonym name (eg
IAM_USERS), I get the following error:
Table/view 'IAM_USERS' contains a duplicate effective column identifier
'PK_USER_ID'.
In the logs, it seems to find the object twice, resulting in the shim
analyzing the object twice:

TRACE: BEGIN Get metadata for table 'IAM_USERS'.
TRACE: BEGIN Get parent table metadata.
TRACE: Searching for table/view 'IAM_USERSP' using type filter
["SYNONYM", "TABLE"].
TRACE: Match found.
TRACE: Searching for table/view 'IAM_USERS' using type filter
["SYNONYM", "VIEW"].
TRACE: Match found.
TRACE: BEGIN Column.
TRACE: Name: 'PK_USER_ID'
TRACE: SQL Type: java.sql.Types.VARCHAR
TRACE: Native Type: VARCHAR2
TRACE: Parameter Type: IN
TRACE: Length: 6
TRACE: Position: 1
TRACE: Nullable: YES
TRACE: END Column.
TRACE: BEGIN Column.
TRACE: Name: 'DT_BEGIN'
TRACE: SQL Type: java.sql.Types.TIMESTAMP
TRACE: Native Type: DATE
TRACE: Parameter Type: IN
TRACE: Size: 7
TRACE: Position: 2
TRACE: Nullable: YES
TRACE: END Column.
----8<---- Other columns are cut out to minimize logging
----8<---- Log file continued at last column being analyzed by the
driver.
TRACE: BEGIN Column.
TRACE: Name: 'PK_USER_ID'
TRACE: SQL Type: java.sql.Types.VARCHAR
TRACE: Native Type: VARCHAR2
TRACE: Parameter Type: IN
TRACE: Length: 6
TRACE: Position: 1
TRACE: Nullable: NO
TRACE: END Column.
TRACE: BEGIN Close connection 'dedicated0'.
TRACE: Connection implementation and/or child statements need to
be closed.
TRACE: END Close connection.
TRACE: Shutting down...

If I reference the view/synonym as S366.IAM_USERS, the shim does not
find the views.
If I reference the view/synonym as A366.IAMS_USERS, the driver seems to
work.

The latter however results in changing the mappings, driver config etc
when going from DEV to ACC (on DEV, the client does not make the
distinction between the 2 users: we only have 1 user (D366) owning the
schema and having rights to manipulate data).

I also tried without the oracle parameter
"-Doracle.jdbc.includeSynonyms=true", but then the driver never works.

Any clue how we can reference directly the views (eg IAM_USERS) when
using synonyms?

Thanks,

Stefaan


--
scauwe
------------------------------------------------------------------------
scauwe's Profile: http://forums.novell.com/member.php?userid=5150
View this thread: http://forums.novell.com/showthread.php?t=417440