How do you export settings from the Database Publishing Wizard?


I'm using the Database Publishing Wizard in VS2008 to push changes to my hosting provider. It doesn't look like those settings go with the project (which seems a little silly to me), but rather they go with the machine.

On each new machine that I'd like to publish from I need to go through the process of digging up my database settings.

Is there a way to backup/export/save these settings to a file?

If so, what is it?


Hmmm ... it appears that the publishing wizard uses 2 config files for it's application configuration:

The Publish Database Wizard uses the files user.config and hoster.config to store configuration information. The directory in which these files are stored must have the appropriate NTFS file system permissions set. These files contain user names and encrypted passwords. The passwords are encrypted by using DPAPI.

user.config File

This file stores persisted host and configuration settings for the Publish Database Wizard. The user.config file is located at %SystemDrive%\Documents and Settings\%Username%\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Publishing Wizard\user.config.

hoster.config File

This file stores options about Web service addresses, user names, and databases for shared hosting providers. The hoster.config file is located at %SystemDrive%\Documents and Settings\%Username%\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Publishing Wizard\hoster.config.

I'm trying to access these files in Vista (with VS2008 and SQL Express installed) and striking out. I'll keep you posted.

Update: Looks like I didn't have the Publishing Wizard installed after all. After grabbing the version for VS2008 here, and then installing (and don't worry -- you won't see any indication it's getting installed, but it does).... and THEN setting up my first database using the wizard, it looks like there are indeed some settings stored uder the 'Application Data' directory listed above. However, it looks like it's just a user.config, and then an XML file for each database configured. I believe you can backup each of these files for later use.

Apart from using the proper colour constants for standard colours I invest some extra effort for applications that we need to use internally on high DPI screens, or where customers may need this.

I have a unit with helper functions for determining proper sizes and placement margins, which compute these from the default GUI font and the standard values in dialog units as given in the UI guidelines, and with helper functions to compute the maximum width / height of an array of controls, place controls, things like that. For fixed size forms and dialogs I calculate the placement of controls once after translating their text with GNU gettext, for resizable forms I do this in an OnResize handler.

This gives good results, is however time-consuming. I would like to have something like the wxWidgets sizer functionality, which automates resizing once the minimum size of a control is set. I have never seen something similar for Delphi, though.

By : mghie

This video can help you solving your question :)
By: admin