Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Case Sensitivity in sp_describe_undeclared_parameters

$
0
0








We recently upgraded one of our databases to 2012 Compatibility Mode, and are now getting an error from sp_describe_undeclared_parameters when running an SSIS package that one of the parameters isn't valid.

We've tracked it down to the parameter in the command in the package not having the same case as the parameter in the stored procedure.  This obviously wasn't an issue prior to 2012, and we've been able to reproduce it with other stored procedures and parameters.

Both the server and database have collations of SQL_Latin1_General_CP1_CI_AS, so I'm not sure where this case sensitivity is coming from...

This is easily reproduced for us with the following queries:

create proc test @test1 varchar(128) as

select * from sys.objects where [name] = @test1

exec sp_describe_undeclared_parameters N'exec test @test1 = @P1' --runs successfully

exec sp_describe_undeclared_parameters N'exec test @Test1 = @P1' --invalid parameter

exec test @test1 = 'test' --Runs successfully

exec test @Test1 = 'test --Runs successfully



Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>