Deploying MDS Samples in SQL Server 2012

Deploying MDS Samples in SQL Server 2012

Rate This
  • Comments 8

[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.

image

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.

MDSModelDeploy.exe listservices

image

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.

image

Then you can explore the newly deployed samples

 image

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:

image

Then on the Sytem page, hover on the System menu and click deployment.

image

The web Deployment wizard will popup

image

Click Deploy and point to the file location. For example C:\Program Files\Microsoft SQL Server\110\Master Data Services\Samples\Packages

image

Next it will show if the package can be accessed and read.

image

Then click Next. Get an error… if it has data it will fail with the error shown.

image

The package file cannot be deployed because it contains data.

To deploy a package with data, use the MDSModelDeploy.exe tool.

Learn more about the MDSModelDeploy tool

Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post
  • Great information, thank you very much for sharing :-)

  • I saved a huge amount of time ... great work

  • nice article so far. But I have a problem. I could deploy the example packages with the given cmd command, but no other user can see the modell (Yes, did click on the refresh cached information link). :(

  • @Toffer - did you set up permissions on the new model for the existing users? I suppose the default is that the admin can see it, but probably users have to be added.

  • This is very good info, I was looking for exacly this!! Thanks for sharing.

  • Jason - Thanks for sharing.

  • A few simple steps, but it's a great help if someone who has done it before shares his experience. Many thanks!

  • Great info and very accessible read, Jason!

Page 1 of 1 (8 items)