mssqltips logo

Define a publish profile for SSDT



By:

Overview

As we saw in previous slides, publishing our database was pretty easy. However, there are many advanced publishing options and we don't want to re-apply any we want to change every time we want to publish.

Explanation

To alleviate the nuisance of re-entering publishing options you may want to always use (such as backing up the database before publish, for instance), you can save publish profiles and refer to them every time you want to publish. These profiles are XML based files that reside in the root folder of your project.

Let's see how we can define a publish profile. Right click on the Futbol project and choose Publish. You will again be presented with the Publish Properties dialog. Go through the previous steps to define the target instance and any Advanced options. Finally, on the main publish screen, choose Save Profile As:

Save Profile

You will then see that you will be given a Save dialog where you can save your choices to a file. Click Save to save the publish file and Cancel the publish (since all we want to do is just create a publish file).

Save Profile xml to OS

Once the file is saved, you will see that it appears within the Solution Explorer:

Solution Explorer

Now let's look at the contents of the publish file. Navigate to where the file was saved and open it with any text editor.

XML file contents

As you can see, it's just a XML file that will hold all the properties for your publish which you can refer to over and over again.


Last Update: 7/22/2014




More SQL Server Solutions











Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name
*Email
Email me updates

Signup for our newsletter

I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.






download





get free sql tips

I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



Learn more about SQL Server tools