Problems executing executing store procedure on different environments

Problems executing executing store procedure on different environments

Post by David Pined » Sat, 04 Aug 2001 00:03:29



I have two installations of SQL Server both have the same
database, then I run the same store procedure ( It insert
several rows into a table) on both DB and for one of these
I got an error.

The error

8152    16      String or binary data would be truncated.

Why I got an error just for one DB, exist any
configuration which increase or decrease the error
tolerance.

I follow the store procedures and the row that has the
problem is not inserted in both cases but just one report
this to me.

I need this two DB supporting this kind of errors (Warning
for me!) because is out of control the maximum size of the
fields due to this messages came from an unknown HOST.

Thanks,

David

 
 
 

Problems executing executing store procedure on different environments

Post by Zachary Well » Sat, 04 Aug 2001 00:02:17


You're sure that both tables have the EXACT same column data types? You may
want to double check.

Zach


Quote:> I have two installations of SQL Server both have the same
> database, then I run the same store procedure ( It insert
> several rows into a table) on both DB and for one of these
> I got an error.

> The error

> 8152 16 String or binary data would be truncated.

> Why I got an error just for one DB, exist any
> configuration which increase or decrease the error
> tolerance.

> I follow the store procedures and the row that has the
> problem is not inserted in both cases but just one report
> this to me.

> I need this two DB supporting this kind of errors (Warning
> for me!) because is out of control the maximum size of the
> fields due to this messages came from an unknown HOST.

> Thanks,

> David


 
 
 

Problems executing executing store procedure on different environments

Post by David Pined » Sat, 04 Aug 2001 00:36:40


Yes, I did a strict check. Any idea??

>-----Original Message-----
>You're sure that both tables have the EXACT same column
data types? You may
>want to double check.

>Zach



>> I have two installations of SQL Server both have the
same
>> database, then I run the same store procedure ( It
insert
>> several rows into a table) on both DB and for one of
these
>> I got an error.

>> The error

>> 8152 16 String or binary data would be truncated.

>> Why I got an error just for one DB, exist any
>> configuration which increase or decrease the error
>> tolerance.

>> I follow the store procedures and the row that has the
>> problem is not inserted in both cases but just one
report
>> this to me.

>> I need this two DB supporting this kind of errors
(Warning
>> for me!) because is out of control the maximum size of
the
>> fields due to this messages came from an unknown HOST.

>> Thanks,

>> David

>.

 
 
 

Problems executing executing store procedure on different environments

Post by Tim Sutto » Sat, 04 Aug 2001 06:26:45


I think this "error" is actually a warning.  The fact that this error occurs
on one server and not another would indicate the setting "ANSI_WARNINGS"
would be off on one and on on the other.

Tim


Quote:> I have two installations of SQL Server both have the same
> database, then I run the same store procedure ( It insert
> several rows into a table) on both DB and for one of these
> I got an error.

> The error

> 8152 16 String or binary data would be truncated.

> Why I got an error just for one DB, exist any
> configuration which increase or decrease the error
> tolerance.

> I follow the store procedures and the row that has the
> problem is not inserted in both cases but just one report
> this to me.

> I need this two DB supporting this kind of errors (Warning
> for me!) because is out of control the maximum size of the
> fields due to this messages came from an unknown HOST.

> Thanks,

> David

 
 
 

Problems executing executing store procedure on different environments

Post by Erland Sommarsko » Mon, 06 Aug 2001 23:10:17


[posted and mailed, please reply in news]


> I have two installations of SQL Server both have the same
> database, then I run the same store procedure ( It insert
> several rows into a table) on both DB and for one of these
> I got an error.

> The error

> 8152      16     String or binary data would be truncated.

> Why I got an error just for one DB, exist any
> configuration which increase or decrease the error
> tolerance.

This error is dependent on the setting for ANSI_WARNINGS. This setting
can be set in various ways. You can set up a global default by means
of the configuration parameter useroption. You can set it on database
level as a database option, and you can set it per process with
SET ANSI_WARNINGS ON/OFF. The latter takes precedence and the
default behaviour by ODBC and OLE-DB is to turn this setting on.

--
Erland Sommarskog, Abaris AB

SQL Server MVP

 
 
 

1. Executing stored procedure in a different database from isnide job too slow

I have a job that updates ~1000 rows in a table based on some condition. In
order to update the individual rows, a lookup has to occur in another
database. The job looks something like this in pseudo-code:

use DB1
declare cursor c for select from DB1.dbo.T1 where ...
open c
fetch next from c into ...

begin
  exec DB2.dbo.StoredProcedure ...
  update T1 set ...
  fetch next from c into ...
end
close c
deallocate c

So this stored procedure acts on DB1, but retrieves the to values from DB2
through a stored procedure.

The problem is that if I execute this job, it takes hours to finish (each
stored procedure invocation takes a few seconds). If I open SQL Server
Enterprise Manager, open DB2 and then execute the job, it takes only about
60 seconds to run to completion. I've tried inserting a step into the job
that touches the DB2 database, but that doesn't help one bit. Does anyone
have an idea how to solve this?

best regards,
Marcel van Brakel

PS sorry if the subject is formulated a bit bad...didn't know how else to
describe this in only one sentence

2. Help with passwords

3. Different results when executing the same Stored Procedure!

4. Announcing: TESTING COMPUTER SOFTWARE (TCS2000) -- Featured Speakers and Workshops

5. Different results when executing a stored procedure and from Access

6. Does GNU make SQL engine ?

7. Executing a Stored Procedure in a Stored Procedure and selecting on the result

8. Object converter (DOS to Win) for pdx 7

9. Executing stored procedure from another stored procedure.

10. executing system stored procedures within a stored procedure

11. problem in executing stored procedure

12. Problem with job that executes stored procedure with sendmail in it

13. Problem executing stored procedure with ODBC