Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help ! Lost Contents of Long Raws
Noel O'Brien wrote:
> I am told the onlt way to verify the contents of the long raw columns are ok
> is to export the table which would show errors if corrupt.
>
> Does anybody know how to extract/export the contents of my long raw
> columns form the database end ? any oracle utility to do this ?
Well, that good old exp, I presume.
> we dont get any oracle errors at all from the client app when trying to
> extract the long raw. of maybe 100 rows in table maybe 10 can be viewed
> something that is curious is that can no longer calculate the size of the
> long raw
> columns, we have some powerbuilder code that looks at the long raw and shows
> the size in bytes.
>
> any ideas
>
I don't know how the internals of Powerbuilder are coded, but when you
code in Pro*C the length of a long or long raw is not returned when you
fetch a column of that type (contrarily to what happens with usual
datatypes) - you must allocate a buffer hopefully big enough, and if
your buffer is undersized then you will get an error which will tell you
how big it should have been, which allows you to reallocate what is
required. I presume this is the original reason why in the few data
dictionary tables which contain LONG values (view$, trigger$ ...) you
always have an additional column which gives you the length of the long.
However, when you code in OCI, there is a special datatype which you can
use which is a two-field structure à la Pro*C VARCHAR, in which the
first four bytes contain the length of what follows - great for
returning LONG RAWs.
I am always suspicious when people say 'I have done nothing and then
it suddenly stopped to work'. There must have been a change somewhere,
either on the server or client side, and identifying it will probably
help you solve the problem.
--
Regards,
Stéphane Faroult
Oriole Corporation
![]() |
![]() |