I have a SQL Server 2008 DB Project, and want to execute multiple scripts, in order, on post deploy.
I've added a PostDeploy.Sql
script to a scripts folder, and marked that as PostDeploy
, and that works fine. I'm aware that only one script can be marked as post deploy; so I thought I could do this within the script:
-- Post Deploy stuff
SELECT * FROM MYTABLE
GO
:r RunPostDeploy2.sql
GO
Where RunPostDeploy2.sql
is located within the same directory as a link. I've tried copying the file locally, but the issue seems to be the use of :r
.
Is it possible to call external scripts from post deploy in this way and, if so, how?