Oracle jdbc: non-schema-owner needs access

Hi there,

Here’s the problem:

Let’s say I have a user called MYAPP who is the owner of MYAPP. If I use
MYAPP’s username and password to connect to oracle, then ActiveRecord’s
scaffold and other features work perfectly. However, when I use another
user
(e.g. MY_APP_USER ) to access MYAPP’s tables, scaffold runs into
trouble.
MY_APP_USER has all the privledges (I think) necessary to query MYAPP’s
tables, but when scaffold runs, I get a list of “Show Edit Destroy.”
Here’s
the difference visually

When I use MYAPP/MYAPP (username/password) I get the whole shabang:

FIRST_NAME

LAST_NAME

SOME_DATE

Bob

Hi

09-SEP-07

Show Edit Destroy

Bob2

Hi2

19-SEP-07

Show Edit Destroy

Bob3

Hi3

29-SEP-07

Show Edit Destroy

When I use MY_APP_USER/MY_APP_USER I don’t get the data columns, just:

Show Edit Destroy

Show Edit Destroy

Show Edit Destroy

So ActiveRecord is retrieving the total number of records, but none of
the
actual data or column names. I did have to add set_table_name
“MYAPP.tablename” to the error-prone setup’s model (e.g. rails’ file
called
model/MY_APP_USERS.rb) but even after messing around with connection
settings
for several hours I can’t figure this out.

Here are the two connection settings I’ve used on my local machine to
test
this out:

adapter: jdbc

driver: oracle.jdbc.driver.OracleDriver

url: jdbc:oracle:thin:@irrelevanthost:1521:XE

username: MYAPP

password: MYAPP

host: irrelevanthost

Schema owner

Perfect scaffolding

No errors

adapter: jdbc

driver: oracle.jdbc.driver.OracleDriver

url: jdbc:oracle:thin:@irrelevanthost:1521:XE

username: SYSTEM

password: SYSTEM

host: irrelevanthost

NOT the Schema owner

Scaffolds with NO data

Requires set_table_name ‘MYAPP.tablename’ to work.

Is there a JDBC parameter that I’m missing here? I’ve tried the database
parameter and that doesn’t seem to affect anything at all…no matter
what I
put in it.

Any help would be tremendously appreciated :slight_smile:

Thanks a bunch and keep up the great work!

Regards,

Bernie