Visual Studio 与 SQL Server Management Studio - 您的选择

发布于 2024-07-11 07:18:28 字数 536 浏览 7 评论 0原文

前言:我在一家从事 ASP.NET 开发的小公司工作,并使用 SQL Server 2005 来满足我们所有的数据库需求。

我很好奇使用 Visual Studio 或 SQL Server Management Studio 进行数据库方面的开发(即创建表、存储过程编写等)有何优缺点。

现在,我们在 Management Studio 中执行所有数据库任务,我想知道使用 Visual Studio 是否有一些好处。 是否可以更轻松地跟踪过程更改和对数据库的其他修改(无论是通过 Visual Studio 本身还是通过某种类型的源代码控制(计划很快实施颠覆)。

我个人在管理方面没有问题Studio,但如果通过 Visual Studio 以我不熟悉的方式更高效、更可控,我很想听听它:

我只是想指出我的特定开发环境 。是 SQL Sever 2005、Visual Studio 2005 Professional Edition 和 Visual Studio Team System 2008 Development Edition 我们没有运行或安装任何其他附加组件。

Just to preface: I work in a small company that does ASP.NET development and uses SQL Server 2005 for all of our database needs.

I was curious as to what were the pros and cons of using Visual Studio or SQL Server Management Studio for our development on the database side (i.e. table creation, stored procedure writing, etc.).

Right now we perform all of our database tasks inside Management Studio and I was wondering if there was some benefit to using Visual Studio instead. Would it make it easier to keep track of procedure changes and other modifications to the database (whether that is through Visual Studio itself or through some type of source control (planning on implementing subversion soon).

I don't personally have problems working with Management Studio but if it would be more efficient and more controllable through Visual Studio in ways that I am just not familiar with I would love to hear about it.

EDIT: I just wanted to note that my specific development environments are SQL Sever 2005, Visual Studio 2005 Professional Edition, and Visual Studio Team System 2008 Development Edition. We do not have team foundation server or any other extras running or installed.

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

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

发布评论

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

评论(6

栀梦 2024-07-18 07:18:28

我个人的方法是使用 SQL MS 处理所有与设计相关的内容(架构设计、图表、键、索引等),但在 Visual Studio 中的“数据库”项目中制作所有存储过程、函数等附加到我的解决方案 - 主要是因为它让我能够以这种方式更好地控制过程的版本(因为我发现它们通常比架构更频繁地更改),并且我发现使用 VS 中的上下文菜单来运行过程特别方便直接在我的测试和登台机器上,因为我经常这样做。

My personal method is to use SQL MS for all the design-related stuff (schema design, diagrams, keys, indexes, etc.), but to craft all my stored procedures, functions and the like in Visual Studio in a "Database" project attached to my solution -- mainly because it lets me keep the procs better version-controlled that way (as I find they generally change more often than the schema), and I find it's particularly handy using the context menus in VS to run the procs on my test and staging machines directly, since I do that so often.

堇色安年 2024-07-18 07:18:28

恕我直言,使用管理工作室的一大优势是“脚本”。 据我所知,VS 中没有类似的东西。

IMHO one big advantage to using the management studio is "script as". To my knowledge there is no equivalent in VS.

秉烛思 2024-07-18 07:18:28

Visual Studio 2010 对 SQL Server 项目和解决方案进行了一些相当不错的升级。 在这里阅读更多信息:

https://web.archive.org/web/20160407003056/http://leonardwoody.com/2011/08/27/introduction-to-visual-studio-database-management/

Visual Studio 2010 has made some pretty nice upgrades to the SQL Server projects and solutions. Read more here:

https://web.archive.org/web/20160407003056/http://leonardwoody.com/2011/08/27/introduction-to-visual-studio-database-management/

櫻之舞 2024-07-18 07:18:28

我之前使用 Management Studio 来完成所有 SQL 工作,但最近我发现 Visual Studio 的内部 SQL 管理器也非常好。 我越来越多地使用它来运行快速查询检查和对数据库方案的修改。

它有一个很棒的 SQL 缩进功能,我发现它非常有用。 在我看来,它胜过 Management studio 的 SQL 着色。

I used Management Studio for all of the SQL work earlier, but of late I've found that the in-house SQL manager of Visual Studio is pretty good too. I am using it more and more for running quick query checks, and modifications to the database scheme.

It's got a great feature of SQL indenting, and I've found it pretty helpful. In my view it beats SQL coloring of Management studio.

蒗幽 2024-07-18 07:18:28

这是一个很难的问题。 我想这取决于你在做什么。 如果您正在构建 DAL 之类的东西,那么使用 VS 可能会更容易,因为有一些很好的集成(拖放等)。 VS 可能足以满足您 95% 的日常数据库活动。

但正如有人已经提到的,您不会获得“Script As”帮助程序(我一直使用它)。 您也不会在用户管理工具(登录等)方面获得太多(如果有的话)。 据我所知,没有办法通过 Visual Studio 管理索引。 您也不会得到任何有关导入/导出数据的信息。

That's a difficult question. I guess it would depend on exactly what you're doing. If you're building DALs and stuff, it would probably be easier to use VS, since there's some nice integration (drag-and-drop, etc.). VS is probably adequate for 95% of your daily db activity.

But as someone already mentioned, you don't get the "Script As" helpers (which I use all of the time). You also won't get much (if anything) in the way of user management tools (logons, etc.). And as far as I know, there is no way to manage indexes via Visual Studio. You don't get anything with regard to importing/exporting data either.

背叛残局 2024-07-18 07:18:28

对我来说,Data Dude(又名 Visual Studio 2008 Team System 的数据库版本)在完成您的问题所涉及的事情方面是一个巨大的游戏规则改变者:保持“跟踪过程更改和对数据库的其他修改”。 您的团队作为一个整体不仅可以跟踪各种共享环境之间的更改,而且通过源代码控制,每个团队成员都可以跟踪他或她自己相对于所有共享环境的差异。 这使得数据库代码成为真正的代码,并具有所有随之而来的好处。

此外,它可以轻松地协调数据库之间的差异,并让该工具自动生成协调这些差异的代码。 理想情况下,数据库代码将直接从源代码控制中发布,就像 ASP.NET 代码通常所做的那样。 Data Dude 大大减少了实现这种对等的工作量。

缺点是成本:Data Dude 需要将 Visual Studio Pro 上的用户升级到 Team System。 幸运的是,微软显然将把这个功能引入到 Visual Studio 2010 的“开发者”版本中,该版本的定价可能与 Visual Studio 2008 Pro 类似。

For me Data Dude (aka Database Edition of Visual Studio 2008 Team System) has been a big game changer in terms of doing the very things your question addresses: keeping "track of procedure changes and other modifications to the database." Not only can your team as a whole keep track of changes between various shared-environments, but through source control each team member can track his or her own differences relative to all of the shared environments. This makes database code truly code, with all of the attendant benefits.

Further, it's a snap to reconcile differences between databases and have the tool automatically generate the code that would reconcile those differences. Ideally database code would be released right out of source control, just as ASP.NET code would typically be done. Data Dude greatly lessens the effort to achieve this parity.

The one negative is the cost: Data Dude requires an upgrade to Team System for those on Visual Studio Pro. Fortunately, evidently Microsoft is going to roll this functionality into the "Developer" edition of Visual Studio 2010, which presumably will have similar pricing to Visual Studio 2008 Pro.

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