如何从数据库发布向导导出设置?

发布于 2024-07-09 03:30:43 字数 315 浏览 3 评论 0原文

我正在使用数据库发布向导在 VS2008 中将更改推送到我的托管提供商。 这些设置看起来并不适合项目(这对我来说有点愚蠢),而是它们适合机器。

在我想要发布的每台新机器上,我都需要完成挖掘数据库设置的过程。

有没有办法将这些设置备份/导出/保存到文件中?

如果有,那是什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拧巴小姐 2024-07-16 03:30:43

嗯...看来发布向导 使用 2 个配置文件作为其应用程序配置

发布数据库向导使用
文件user.confighoster.config
存储配置信息。 这
这些文件所在的目录
存储必须具有适当的 NTFS
文件系统权限设置。 这些
文件包含用户名并加密
密码。 密码已加密
通过使用 DPAPI。

user.config 文件

该文件存储持久化的主机和
发布的配置设置
数据库向导。 用户.config 文件
位于%SystemDrive%\Documents
和设置\%用户名%\应用程序
数据\微软\微软SQL
服务器\90\工具\发布
向导\用户.config。

hoster.config 文件

该文件存储有关Web的选项
服务地址、用户名和
共享托管数据库
提供商。 hoster.config 文件是
位于 %SystemDrive%\Documents 和
设置\%用户名%\应用程序
数据\微软\微软SQL
服务器\90\工具\发布
Wizard\hoster.config。

我试图在 Vista 中访问这些文件(安装了 VS2008 和 SQL Express)并删除。 我会及时向大家发布。

更新:看来我根本没有安装发布向导。 在获取此处的 VS2008 版本之后,然后安装(不用担心-- 您不会看到任何正在安装的指示,但确实如此)......然后使用向导设置我的第一个数据库,看起来确实有一些设置存储在上面列出的“应用程序数据”目录下。 然而,看起来它只是一个 user.config,然后是每个配置的数据库的 XML 文件。 我相信您可以备份这些文件以供以后使用。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文