I have the need to execute a bunch of shell commands during deployment. Is there any initiative to allow the ExecuteShellCommand in the deployment scripts. Essentially, I would like to be able to supplement the Script.PostDeployment.sql script with shell commands such as:
!!bcp mydb.dbo.mytable in "C:\tmp\mytable.dat"
Right now the DB Professional Project errors out during deployment with the following error message:
"SQL Execution error: Scripting warning. Command ExecuteShellCommand is not supported."
Thanks in advance for any insights

Command ExecuteShellCommand is not supported
Wouterd
Markus -
Unfortunately, we only support a subset of SQLCMD commands in the initial release. You can find additional information in the product documentation: http://msdn2.microsoft.com/en-us/library/aa833281(VS.80).aspx
Vladimir Nikitin
Thanks in advance for your help!
phanikumarkvr
AliJC
I am not the program manager (Mairead can feel free to chime in), but if I recall correctly, it was not included due to the difficulty (in terms of time and effort) to implement support for that feature in a secure fashion. The last thing we want to do is provide exploitable security holes.
My SQL is a bit rusty, but could you instead use:
exec xp_cmdshell 'bcp mydb.dbo.mytable in "C:\tmp\mytable.dat"'
This is not something I have tried (using bcp via exec xp_cmdshell), but it seems like it should work. You would have to enable the use of xp_cmdshell by using sp_configure, though, as it's off by default for security reasons.
With respect to future releases, if it is an important feature, you should submit a feature request through the Connect site. I am certain that we will be taking a closer look at better support for deployment of static data as part of the v2 planning process. It is too early at this point to know what features will be planned for v2 and which are not (v1 is going through the release process as I type this :).
There may be an additional alternative that I'd almost forgotten. You can specify a post-build command line to be executed as part of the build process. For more information, refer to these topics:
thanks,