I have a SQL database project in VisualStudio 2010 in source control with TFS 2010 with several branches, each of which is deployed to different servers depending on the configuration profile.
Using the sqlcmdvars file with the configuration profile added to the file name (Debug.sqlcmdvars, etc.) for each configuration profile, I can specify a unique file path for a specific deployment environment using the reserved names Path1 and Path2 for the mdf file and the log file .
<?xml version="1.0" encoding="utf-8"?> <SqlCommandVariables xmlns="urn:Microsoft.VisualStudio.Data.Schema.Package.SqlCmdVars"> <Version>1.0</Version> <Properties> <Property> <PropertyName>Path1</PropertyName> <PropertyValue>C:\SQLSERVER LOG\$(DatabaseName)\</PropertyValue> </Property> <Property> <PropertyName>Path2</PropertyName> <PropertyValue>C:\SQLSERVER DATA\$(DatabaseName)\</PropertyValue> </Property> </Properties> </SqlCommandVariables>
Now I'm trying to add my own FileStream file with the associated FileStream FileGroup
I added an extra entry to the sqlcmdvars files:
<Property> <PropertyName>PathBlobStream</PropertyName> <PropertyValue>C:\SQLSERVER DATA\$(DatabaseName)\BlobStream\</PropertyValue> </Property>
But I'm not sure how to tell the database that SchemaObjects \ Database Level Objects \ Storage \ BlobStore.sqlfile.sql declared:
ALTER DATABASE [$(DatabaseName)] ADD FILE (NAME = [BlobStore], FILENAME = 'C:\SQLSERVER DATA\####\BlobStream') TO FILEGROUP [BlobStreamFileGroup];
How do you use the new entry in sqlcmdvars to override the path for the new FileStream file?
source share