﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Programming / TFS/Data Dude/DBPro </title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 24 May 2012 12:54:46 GMT</lastBuildDate><ttl>20</ttl><item><title>SQL Structure in TFS</title><link>http://www.sqlservercentral.com/Forums/Topic1299777-2998-1.aspx</link><description>I've been elected in my company to devise TFS structure for the maintenance of SQL items. We have 3 versions of SQL still being supported with another on the way. What I am looking for is a recommendation for folder structure within TFS. Our existing VSS databases have entries that are version-specific, like SSIS 2005. I'd like to avoid 'versioning' the storage that way but also make it possible for developers, DBAs and support people to find code easily. Also, out existing VSS has NO database object control so I am treading some new ground here.Since databases can, are and will be used by many projects, I want database and SSAS objects  separate from any other project entries. On the other hand I can see bundling SSRS and SSAS with the projects that caused them to be developed.I've seen a lot of conversation here regarding TFS and SQL but haven't found any recommendations for structure. TIA for any suggestions.</description><pubDate>Mon, 14 May 2012 12:05:26 GMT</pubDate><dc:creator>G Bryant McClellan</dc:creator></item><item><title>Using Views that reference Synonyms in VSTS 2008</title><link>http://www.sqlservercentral.com/Forums/Topic1263559-2998-1.aspx</link><description>I have recently started using Visual Studio 2008 for Database Professionals. We work in an environment with may queries running across databases on the same server and have one set of databases per country. Therefore I use synonyms to keep the code constant and ease the deployment task.However, if a use synonyms in a View, I am hit with a multitude of Build Errors in VS. These are of the form:Error	227	TSD03006: View: [dbo].[vw_AddressProfile] has an unresolved reference to object [dbo].[TransactionHistory].	C:\[i][Database Project Name][/i]\Schema Objects\Views\dbo.vw_AddressProfile.view.sqlIn the above case vw_AddressProfile is the View I am creating and dbo.TransactionHistory is a synonym which references a table in another database. The View works a treat if scripted directly in SSMS - the problem is purely with Visual Studio.I found one source which suggested turning off the "Enable Extended Transact-SQL Verification" option on the Build tab. However that option is not present when I look.Any ideas on how to solve this?</description><pubDate>Thu, 08 Mar 2012 05:22:00 GMT</pubDate><dc:creator>Richard Warr</dc:creator></item><item><title>Query Work Items in TFS from SQL</title><link>http://www.sqlservercentral.com/Forums/Topic1252318-2998-1.aspx</link><description>Hi AllJust wondering if anyone knows of a way to get Work Item names from the TFSWarehouse database?They are inserted with what I can only really describe as a TFS GUID which I cant seem to translate to a table to get the WI name.Trying to do this via T-SQK direct on the database rather than using WIQL via Visual Studio as its not really that clued up for the information that the people want on the reports.Any help is appreciated.ThanksAnt</description><pubDate>Wed, 15 Feb 2012 02:23:18 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>Schema Compare and Foreign Keys Created WITH NOCHECK</title><link>http://www.sqlservercentral.com/Forums/Topic1252412-2998-1.aspx</link><description>Hi All,We're trying to create a schema synchronization script by comparing a database project in Visual Studio/TFS (source) to a deployed database (destination). The script produced will be used to bring the populated destination database inline with the code checked into Visual Studio/TFS. In TFS foreign keys are defined in the form:[font="Courier New"]ALTER TABLE [dbo].[foo]    ADD CONSTRAINT [FK_Foo_Bar] [b][u]WITH NOCHECK [/u][/b]FOREIGN KEY ([Bar_Id]) REFERENCES [Dbo].[Bar] ([Bar_Id]) ON DELETE NO ACTION ON UPDATE NO ACTION;[/font]In the destination database all foreign keys are inactive and marked as untrusted and the underlying data violates the key's logic, i.e. if we were to try and re-enable the foreign keys with CHECK CHECK, it would fail. For info. the only reason that we have the foreign keys in this database is to enable any design tool to show data relationships, we actively do not want the FKs to enforce integrity for operational/performance reasons.When we compare the schema, a difference is picked up between the foreign keys and the source foreign key looks like:[font="Courier New"]ALTER TABLE [dbo].[foo]    ADD CONSTRAINT [FK_Foo_Bar] FOREIGN KEY ([Bar_Id]) REFERENCES [Dbo].[Bar] ([Bar_Id]) ON DELETE NO ACTION ON UPDATE NO ACTION;[/font]So the schema comparison tool is stripping off/ignoring the WITH NOCHECK clause and attempting to create the foreign key as active, which causes the script to fail when run over the database (due to the data not adhering to it as described above). Does anyone know of a setting which controls the behavior of scripting FKs, i.e. ignoring this option in the key's script or setting a default of active/inactive at the sync level?  Or indeed any information regarding this behavior at all would be very useful?Thanks in advanceOur environment is as follows: Destination database is on a SQL Server 2008 Enterprise (Build 10.0.2531.0) server and we're using Visual Studio 2008, 9.0.30729.1.</description><pubDate>Wed, 15 Feb 2012 04:55:12 GMT</pubDate><dc:creator>Ringo-394296</dc:creator></item><item><title>Developing Databases via Visual Studio</title><link>http://www.sqlservercentral.com/Forums/Topic1231975-2998-1.aspx</link><description>After reading an excellent SQLBlog post by Jamie Thompson ([url=http://sqlblog.com/blogs/jamie_thomson/archive/2012/01/01/implementing-sql-server-solutions-using-visual-studio-2010-database-projects-a-compendium-of-project-experiences.aspx]link[/url]) and running through a quick tutorial on Pluralsight by Robert Cain ([url=http://www.pluralsight-training.net/microsoft/Courses#visual-studio]link[/url]), I am a changed man.I've only developed a handful of databases from scratch but I just could not stand working through SSMS and managing a bunch of *.sql files.  Not to mention how frustrating it was having to make sure everything appeared in the db-creation script in order of dependency.  Don't get me started on Refactoring and Unit Testing...Anyone else have some sources for a beginner?</description><pubDate>Sat, 07 Jan 2012 14:40:53 GMT</pubDate><dc:creator>iPolvo</dc:creator></item><item><title>TFS for databases</title><link>http://www.sqlservercentral.com/Forums/Topic1174514-2998-1.aspx</link><description>Any recommendations how to do db-versioning in TFS? (sqlserver/oracle).</description><pubDate>Tue, 13 Sep 2011 15:16:16 GMT</pubDate><dc:creator>Jo Pattyn</dc:creator></item></channel></rss>
