| Author |
image data - copy in out
|
|
| P Brent 2006-03-07, 11:24 am |
| We have seen growth in image blob data and I need to make
sure when moving this data using bcp all of the data is
copied. In the past , I 've used the parameter -T 1000000.
Does this value need to be change ? Can I check the max
length of a image row.?
We're using ASE 12.5.1
Thanks..
| |
| Sherlock, Kevin 2006-03-07, 8:24 pm |
| to find the length of an image or text field, use the "datalength(<fieldname> )"
built-in fuction.
In theory, you could do this:
select max(datalength(<myblobfield> ))
from mytable
where <myblobfield> is not null
<P Brent> wrote in message news:440da86d.68c8.1681692777@sybase.com...
> We have seen growth in image blob data and I need to make
> sure when moving this data using bcp all of the data is
> copied. In the past , I 've used the parameter -T 1000000.
> Does this value need to be change ? Can I check the max
> length of a image row.?
>
> We're using ASE 12.5.1
>
> Thanks..
| |
| P Brent 2006-03-07, 8:24 pm |
| This is great.. thanks.
I checked and the max length is around 750000 - less
than the -T1000000 max set in the bcp.
Do you know whether bcp returns error if image size is
greater than -T size provided ? Also , is there a max you
can use for -T ??
Thanks..
> to find the length of an image or text field, use the
> "datalength(<fieldname> )" built-in fuction.
>
> In theory, you could do this:
>
> select max(datalength(<myblobfield> ))
> from mytable
> where <myblobfield> is not null
>
> <P Brent> wrote in message
> length of a image row.? >
>
>
| |
| Sherlock, Kevin 2006-03-08, 3:24 am |
| If it's coded in bcp as a signed int, the max value would be
2147483647 (2Gb)
I would think that max value should be documented somewhere. I'll take a
look and post if I find anything definitive.
<P Brent> wrote in message news:440df93e.6ca6.1681692777@sybase.com...[color=darkred]
> This is great.. thanks.
> I checked and the max length is around 750000 - less
> than the -T1000000 max set in the bcp.
>
> Do you know whether bcp returns error if image size is
> greater than -T size provided ? Also , is there a max you
> can use for -T ??
>
> Thanks..
>
| |
| Bret Halford 2006-03-08, 9:25 am |
| Yes, the maximum size of a TEXT or IMAGE is 2GB.
I believe that bcp *does not* return an error if the actual
size is larger than what you specify. This is easy to test
though (I'm just at home and don't have a server handy):
try using a really small value like -T2048 against data that you
know is larger.
-bret
"Sherlock, Kevin" wrote:
[color=darkred]
> If it's coded in bcp as a signed int, the max value would be
> 2147483647 (2Gb)
>
> I would think that max value should be documented somewhere. I'll take a
> look and post if I find anything definitive.
>
> <P Brent> wrote in message news:440df93e.6ca6.1681692777@sybase.com...
| |
| P Brent 2006-03-08, 8:25 pm |
| Ok.. Thanks.
> If it's coded in bcp as a signed int, the max value would
> be 2147483647 (2Gb)
>
> I would think that max value should be documented
> somewhere. I'll take a look and post if I find anything
> definitive.
>
> <P Brent> wrote in message
>
>
| |
| P Brent 2006-03-08, 8:25 pm |
|
Ok , Thanks..
Seems to me , the default bcp should copy in/out all data
--when would you want to use -T option ?
> Yes, the maximum size of a TEXT or IMAGE is 2GB.
>
> I believe that bcp *does not* return an error if the
> actual size is larger than what you specify. This is easy
> to test though (I'm just at home and don't have a server
> handy): try using a really small value like -T2048 against
> data that you know is larger.
>
> -bret
>
> "Sherlock, Kevin" wrote:
>
> definitive. >
>
| |
| Emmanuel Cerisier 2006-03-21, 11:33 am |
| Bret Halford wrote:
> Yes, the maximum size of a TEXT or IMAGE is 2GB.
>
> I believe that bcp *does not* return an error if the actual
> size is larger than what you specify. This is easy to test
> though (I'm just at home and don't have a server handy):
> try using a really small value like -T2048 against data that you
> know is larger.
>
> -bret
I can confirm bcp won't return any error in case '-T' arg gets too
short...It'll just truncate the output.
--
Emmanuel
| |
| Bret Halford 2006-03-30, 8:28 pm |
| I do have to agree with you. The textsize / -T settings date back to a
time when disk
space was much more precious that it is now, and I think we have gotten
to the
point where backward compatibility is conflicting with common sense.
-bret
P, Brent wrote:
[color=darkred]
> Ok , Thanks..
> Seems to me , the default bcp should copy in/out all data
> --when would you want to use -T option ?
>
|
|
|
|