문제

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