Forum: Ruby on Rails RE: ORA-12663 and @connection.describe with Oracle7

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F3b7b8756d0c7f71cc7460cc33aefaee?d=identicon&s=25 Berger, Daniel (Guest)
on 2006-04-13 18:47
(Received via mailing list)
> -----Original Message-----
> From: rails-bounces@lists.rubyonrails.org
> [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of William FISK
> Sent: Thursday, April 13, 2006 10:25 AM
> To: rails@lists.rubyonrails.org
> 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
5726e6410f03a6d52d1127fce76d02ad?d=identicon&s=25 William FISK (Guest)
on 2006-04-13 19:09
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
C728d93eb5205cf20cac0c2928b0ad62?d=identicon&s=25 Jeff Jones (rurounijones)
on 2006-06-02 17:33
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
C728d93eb5205cf20cac0c2928b0ad62?d=identicon&s=25 Jeff Jones (rurounijones)
on 2006-06-02 18:04
> 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
This topic is locked and can not be replied to.