I notice that when I am deploying a database from a VS2012 Database project that the physical file paths of my data files are bound to SQLCMD Variables ($(DefaultDataPath)$(DefaultFilePrefix) OR $(DefaultLogPath)$(DefaultFilePrefix)) depending on file type.

If I had for example 4 files (primary, log, file1, file2) and I wanted to script this out to deploy each file on to a different drive (and possible folder schema) is there a way to configure this in Visual Studio?

有帮助吗?

解决方案

You'll need to create project level variables (such as the above for $(DefaultLogPath) ). You'd then use those in your storage SQL commands. You'll probably want to default them as well and you could run into issues if the paths don't exist on the box. I've used that in the past to ensure placement on different drives or in different folders.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top