Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top