Deploying MDS Samples in SQL Server 2012
[This post was created by Jason Howell, Senior Escalation Engineer in the SQL Server Support team specializing in MDS]
MDS ships 3 samples model packages in SQL Server 2012 (as of Release Candidate 0 timeframe) that you can use to show MDS and play around with the features.
The sample package files live under the SQL Server installation folder, for example the default location on 32-bit and 64-bit is
C:\Program Files\Microsoft SQL Server\110\Master Data Services\Samples\Packages
The readme.html has information on the format of each model’s entities.
Packages that do not contain data values can be deployed using the webpage System Administration / Deployment page in the browser.
However the 3 samples have some data values and can only be deployed with the command line tool, or you will get the error “The package file cannot be deployed because it contains data.“
Follow the advice in SQL Books Online http://msdn.microsoft.com/en-us/library/hh479646(SQL.110).aspx
The Syntax pattern for the tool is MDSModelDeploy.exe deploynew -package PackageName -model ModelName -service ServiceName
1. Launch cmd as administrator Start > Cmd – right click. Run as Administrator. I did this on the server machine (not on a client machine).
2. Change into your SQL Folder:
Cd "C:\Program Files\Microsoft SQL Server\110\Master Data Services\Configuration"
3. List the MDS web services to connect to if you are unsure of the service name. The default being MDS1 as shown by this command.
4. Deploy the package by pointing to the package file, and connecting to that service listed from step #3. Provide a model name for the model that you want to deploy.
MDSModelDeploy.exe deploynew -package "C:\Program Files\Microsoft SQL Server\110\Master Data Services\Samples\Packages\customer_en.pkg" -model CustomerSample -service MDS1
MDSModelDeploy.exe deploynew -package "C:\Program Files\Microsoft SQL Server\110\Master Data Services\Samples\Packages\chartofaccounts_en.pkg" -model ChartOfAccountsSample -service MDS1
MDSModelDeploy.exe deploynew -package "C:\Program Files\Microsoft SQL Server\110\Master Data Services\Samples\Packages\product_en.pkg" -model ProductsSample -service MDS1
5. If your MDS users are in their browser windows, they may not immediately see the newly deployed models.
On the main MDS webpage, click the hyperlink over on the right that says “Refresh cached information” so that they get the latest list of models, and can explore the newly added sample models.
Then you can explore the newly deployed samples
Just FYI - By comparison, for packages that don’t have data you can use the website deployment wizard. If the package has data inside it may fail as shown:
Then on the Sytem page, hover on the System menu and click deployment.
The web Deployment wizard will popup
Click Deploy and point to the file location. For example C:\Program Files\Microsoft SQL Server\110\Master Data Services\Samples\Packages
Next it will show if the package can be accessed and read.
Then click Next. Get an error… if it has data it will fail with the error shown.
The package file cannot be deployed because it contains data.
To deploy a package with data, use the MDSModelDeploy.exe tool.