简体   繁体   English

如何将SQL Server数据库对象添加到TFS?

[英]How can I add SQL Server database objects to TFS?

We don't currently have our SQL Server objects in any form of source control. 我们目前没有任何形式的源代码控制的SQL Server对象。 We recently installed TFS 2008 and I'd like to get our SQL server code added. 我们最近安装了TFS 2008,我想添加我们的SQL服务器代码。 I think I could script all of the database and create script files for each object, but I'm hoping there is a way to point to a database in SSMS and create a project that can be added to TFS or something similar. 我想我可以编写所有数据库的脚本并为每个对象创建脚本文件,但我希望有一种方法可以指向SSMS中的数据库并创建一个可以添加到TFS或类似项目的项目。 Basically, I'm look for the simplest way to get from point A to point B. I've installed the TFS MSSCCI Provider and I see TFS in the source control provider options in SSMS. 基本上,我正在寻找从A点到B点的最简单方法。我已经安装了TFS MSSCCI Provider,我在SSMS的源控制提供程序选项中看到了TFS。 The SQL Server instance is SS2005. SQL Server实例是SS2005。

If you have a visual studio Team Developer license you can download the Database edition. 如果您拥有Visual Studio Team Developer许可证,则可以下载数据库版本。 It has a project type that can bring your tables, sprocs, triggers, etc under source control and check it into TFS. 它有一个项目类型,可以将您的表,sprocs,触发器等置于源代码管理之下,并将其检入TFS。

update: 更新:
Redgate has a product called SQL Source Control . Redgate有一个名为SQL Source Control的产品。 Which ties back into several source control systems like TFS, SVN, etc. 它与TFS,SVN等多个源控制系统相关联。

You could also try ApexSQL Version, a SSMS add-in for versioning databases and db objects directly in SSMS. 您还可以尝试ApexSQL版本,这是一个SSMS加载项,可直接在SSMS中对数据库和数据库对象进行版本控制。

We're in the process of constant improvement and you can also see our roadmap for future improvements in this article: Redesigning ApexSQL Version – The road map 我们正在不断改进,您还可以在本文中看到我们未来改进的路线图: 重新设计ApexSQL版本 - 路线图

Disclaimer: I work for ApexSQL 免责声明:我为ApexSQL工作

Hope this helps 希望这可以帮助

I think generating your own scripts is the best way to do it, as described in this excellent series of articles: 我认为生成自己的脚本是最好的方法,如本系列文章所述:

http://odetocode.com/Blogs/scott/archive/2008/01/31/11710.aspx http://odetocode.com/Blogs/scott/archive/2008/01/31/11710.aspx

I use Tasks -> Generate Scripts in SSMS to create a SQL script that I store in my project. 我在SSMS中使用Tasks - > Generate Scripts来创建我存储在项目中的SQL脚本。 If you do this make sure that you choose options to include things like triggers and indexes. 如果这样做,请确保选择包含触发器和索引之类的选项。 I typically ignore the extended properties in the script generation to make things a little more compact. 我通常会忽略脚本生成中的扩展属性,以使事情更紧凑。

The simplest way to do this is with Quest Toad for SQL Server. 最简单的方法是使用Quest Toad for SQL Server。 Disclaimer - I work for Quest, hahaha. 免责声明 - 我为Quest工作,哈哈哈。 Anyway, Toad integrates with TFS so you can check objects in and out of source control. 无论如何,Toad与TFS集成,因此您可以检查进出源控件的对象。 You don't have to hassle with scripting the objects out first. 您不必为首先编写对象脚本而烦恼。 If you want to play with it, grab the latest beta version for free, and there's an active user community on that site where you can ask questions. 如果您想玩它,请免费获取最新的测试版,并且该网站上有一个活跃的用户社区,您可以在其中提问。

Toad for SQL Server Toad for SQL Server

You probably need Visual Studio Team System For Database Professionals to do what you want. 您可能需要Visual Studio Team System For Database Professionals来执行您想要的操作。

I use the standard Database project and just keep three scripts per database: one for the schema, one for the stored procs, and one for data population. 我使用标准的数据库项目,每个数据库只保留三个脚本:一个用于模式,一个用于存储过程,一个用于数据填充。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何集成tfs数据库和sql server数据库以在tfs中生成报告 - how can i integrate tfs database and sql server database to generate reports in tfs 如何使用SQL Server中的隐藏数据库对象? - How can I work with the hidden database objects in SQL Server? 如何将SQL Server数据库中的图像添加到DataGrid? - How can I add images form a SQL Server database to a DataGrid? 如何在项目设置中添加SQL Server数据库 - How can I add SQL Server Database in my project setup 如何在带有图形数据库对象的 SQL Server 2017 中使用“生成脚本”? - How can I use 'Generate Scripts' in SQL Server 2017 with Graph Database Objects? 我们如何识别数据库中 SQL 服务器中没有权限的对象 - How can we identify the Objects with out permissions in SQL Server for a database TFS和数据库项目(SQL Server) - TFS and DATABASE PROJECTS (SQL Server) 如何将TFS作为源代码控制插件添加到SQL Server Management Studio Express 2008? - How do I add TFS as a Source control plug in to SQL Server Management Studio Express 2008? 如何使用VS2012向我的SQL Server数据库添加行? - How can I add rows to my SQL Server database with VS2012? 如何在sql server中备份现有数据库并在TFS中另存为脚本 - how to take backup of existing database in sql server and save as a script in TFS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM