Client\Server Version
|
2008/R2
|
2012 RTM
|
2012 CU6 +
|
2012 SP1
|
2012 SP1 CU3 +
|
SQL 14
|
2008 R2
|
yes
|
yes
|
yes
|
yes
|
yes
|
yes
|
2012 (all versions)
|
yes
|
no
|
yes
|
no
|
yes
|
yes
|
SQL 14 CTP
|
yes
|
no
|
yes
|
no
|
yes
|
yes
|
yes - sp_prepare returns metadata
no - sp_prepare does NOT return metadata
The following matrix shows when sp_prepare should return metadata for multi-statement batches, such as
declare @p1 int
set @p1=NULL
exec sp_prepare @p1 output,NULL,N'select * from sys.objects; select 1;',1
select @p1
Client\Server Version
|
2008/R2
|
2012 RTM
|
2012 CU6 +
|
2012 SP1
|
2012 SP1 CU3 +
|
SQL 14
|
2008 R2
|
yes
|
yes
|
yes
|
yes
|
yes
|
yes
|
2012 (all versions)
|
yes
|
no
|
no
|
no
|
no
|
no
|
SQL 14 CTP
|
yes
|
no
|
no
|
no
|
no
|
no
|
Bob Dorr - Principal SQL Server Escalation Engineer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.