OK, finally figured this one out. I needed to set the batch="false"
attribute on the task. SQL Management Studio would generate a
script like this:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[MyView] WITH SCHEMABINDING
AS
etc etc
By unbatching the script, the two SETs a
I tried swapping the task for running osql.exe from , so my
build file looks like this:
So the problem isn't with the scripts per se, it's how interacts
with them. I'll play around with a few more settings and see what
happens.
From: David Keaveny
Sent: