KUBO Takehiro
1/15/2005 3:40:00 AM
Andreas Habel <mail@exceptionfault.de> writes:
> Hi,
>
> I`m writing a tiny agent in ruby to simplyfy my daily dba jobs and
> monitor the database activity, especially the state of my standby databases.
>
> My library of choice is RubyOCI8 because it`s the only one I think,
> where I can logon as SYSDBA. Please correct me if I´m wrong!
>
> The following statement caused OCI8 to die
> SQL> SELECT * FROM DBA_TEMP_FILES;
>
> OCIError: ORA-01455: Ueberlauf von Integer-Datentyp bei Umwandlung der
> Spalte
> #translation: Overflow of integer-datatype during conversion of column
>
> from c:/ruby/lib/ruby/site_ruby/1.8/OCI8.rb:499:in `fetch'
> from c:/ruby/lib/ruby/site_ruby/1.8/OCI8.rb:499:in `fetch_a_row'
> from c:/ruby/lib/ruby/site_ruby/1.8/OCI8.rb:499:in `do_ocicall'
> from c:/ruby/lib/ruby/site_ruby/1.8/OCI8.rb:499:in `fetch_a_row'
> from c:/ruby/lib/ruby/site_ruby/1.8/OCI8.rb:312:in `fetch'
> from ./lib/database.rb:284:in `tempfiles'
> from (irb):16
Please change line 449 of oci8.rb as following:
From: if precision <= 9 # the precision of Fixnum (assuming 31 bit integer)
To: if precision > 0 && precision <= 9 # the precision of Fixnum (assuming 31 bit integer)
The datatype of MAXBYTES is NUMBER whose scale and precision are not
specified. In that case scale and precision are zeros, so ruby-oci8
define it as Fixnum.
> My system:
> RDBMS Oracle 9.2.0.4 Enterprise / Standard Edition (tested both)
> Client 9.2.0.6 / 10.0.1.3 (tested both)
> OS: Windows 2000 / 2003 (Client / Server)
> RubyInstaller is up to date
>
> The killing value seems to be the column MAXBYTES with a value of
> 34,359,721,984. The strange thing is, if I call DBA_DATA_FILES instead,
> where MAXBYTES is equal to MAXBAYTES in *_TEMP_FILES, I got no problems.
In my environment I get problems in also DBA_DATA_FILES.
BTW I must release ruby-oci8 next version...
--
KUBO Takehiro
kubo@jiubao.org