I have a SQL Server 2008 database project, and I want to run several scripts so that, after posting.
I added a script to the scripts folder PostDeploy.Sqland noted how PostDeploy, and this works fine. I know that only one script can be marked as post deploy; so I thought I could do it in a script:
SELECT * FROM MYTABLE
GO
:r RunPostDeploy2.sql
GO
Where RunPostDeploy2.sqlis in the same directory as the link. I tried to copy the file locally, but the problem seems to be to use :r.
Is it possible to call external scripts from post-deployment in this way, and if so, how?
source
share