I'm running a script against 16 registered servers (6 SQL 2000, 4 SQL 2005, 6 SQL 2008R2) within the same connection.
It works well, except for 2 of 6 the SQL 2008R2.
I receive the error: Error 137 - you must declare the scalar variable.
The script starts like that:
Declare @datefull datetime
Declare @datelog datetime
Set @datefull = '01/05/13 23:12:00.500'
Set @datelog = '28/09/13 14:05:23.100'
I can't understand why those 2 SQL 2008R2 return this error, as it is the same script for all registered servers.
Could it be an Instance configuration ?