RE: ORA-12663 and @connection.describe with Oracle7

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of William FISK
Sent: Thursday, April 13, 2006 10:25 AM
To: [email protected]
Subject: [Rails] ORA-12663 and @connection.describe with Oracle7

I am trying to use Rails and an Oracle 7 database.

Are you querying across a DB link? Can you successfully run a describe
command from a sqlplus shell?

Google seems to indicate that this is a known issue when trying to
describe a remote table from an Oracle 8 client to an Oracle 7 server.
Note that the Ruby Oracle adapter is meant for Oracle 8 or later (it
uses the OCI8 interface).

I have the following error message:
(eval):3:in __send__': ORA-12663: Services required by client not available on the server (OCIError) from (eval):3:in describe’

and the line oracle_adapter,rb:361:
(owner, table_name) = @connection.describe(table_name)

Do I need this describe line?

Can I replace with something else just to get the query to work?

The workaround that I’m seeing on Google involves doing a select on
all_tab_columns instead.

Regards,

Dan

Dan,

Yes it seems to be a known issue.

Commeting out the offending line and just hard-coding the owner worked
(but not very nice).

So instead of investigating any further I am giving up on that idead and
just using another set of tables which are on Oracle 10g.

Thanks

William

William FISK wrote:

Dan,

Yes it seems to be a known issue.

Commeting out the offending line and just hard-coding the owner worked
(but not very nice).

So instead of investigating any further I am giving up on that idead and
just using another set of tables which are on Oracle 10g.

Thanks

William

William,

I have just run across the same issue (Curses!) and don’t have the
opportunity to use a different Oracle version (Double curses!). I am not
totally comfortable yet with messing around with the innards of
activerecord. Could you post the code you used instead of the describe?

Many thanks

Jeff

I have just run across the same issue (Curses!) and don’t have the
opportunity to use a different Oracle version (Double curses!). I am not
totally comfortable yet with messing around with the innards of
activerecord. Could you post the code you used instead of the describe?

Many thanks

Jeff

Never mind, I was being a wimp. I used the following which appears to
have worked:

(owner, table_name) = @connection.exec(“select owner, table_name from
all_tab_columns where table_name = ‘#{table_name}’”)

Probably very ugly and will haunt me later but it appears to have worked
for now.

Thanks for the initial discussion. Otherwise I would have been totally
lost!

Jeff