How to share redgate database tools settings with Team Foundation Service

In a previous post we’ve seen how to share the SQL Prompt snippet folder to the development team. We’ve used dropbox for sharing and powershell to copy files between the default directory and the new place (changing also the related registry keys). In this post we’ll focus on how to share all the Red-Gate development tools using Team Foundation Server or Team Foundation Service for team sharing (TFService and TFS Express are two free solution).

The requirements are:
– at least a folder, that will be shared to all team members
– the tools must support the customization of the configuration folders
– a script (powershell in the following samples) that can change the configuration folders

Keep in mind that we’re talking about third party tools, plugged in to SQL Server Management Studio. We will speak about:

  • SQL Prompt snippets (we will change snippet folder)
  • SQL Compare filter and project files (we will change filter and project file startup folder, .scp and .scpf files)
  • SQL Data Compare project files (we will change project file startup folder, .sdc files)

We’ll use Team Foundation Service as a Source Control Manager Continue reading “How to share redgate database tools settings with Team Foundation Service”

Repeating rows based on a value in a different column

I’ve just replied to a question in dotnethell italian forum about the topic in the title. Actually it’s not the first time I got this kind of question:

“How can I repeat a row using a value that is stored in another column of the same table?”

 
Ok, let’s describe a solution step by step.

Share t-sql snippets to the team with SQL Prompt

Red-Gate SQL Prompt is a plugin for SQL Server Management Studio that makes the developers life easier when writing t-sql. It provides improved intellisense, indent and coding styles, and also a snippet manager feature that allows the developer to create a set of useful shortcuts. Those autocomplete items can be really useful for a team, let’s see how we can share them in a team.

Continue reading “Share t-sql snippets to the team with SQL Prompt”

SQL Server Feature Limitations (Windows Azure SQL Database)

I’ve just received a question about features comparison between SQL Server and SQL Azure Database. This is one of the most frequently asked questions I receive in my blog PMs and forums.. Thus, I’m sharing the links in order to gather some information about this topic.

and
Another good start can be this link.
Stay Tuned! 🙂

ALTER SCHEMA does not reflect changes into the sys.sql_modules catalog view (definition)

I have recently found a strange behavior related to a comfortable DDL command, the ALTER SCHEMA statement. That happened while I was trying to move a stored procedure from a schema to another one. Both stored procedure and function definitions are stored on a catalog object which is accessible by the sys.sql_modules catalog view (column “definition”). After executing the ALTER SCHEMA statement the definition field is not updated.

We’re speaking about both SQL Server 2012 on premise and SQL Azure databases. My current SQL Server 2012 version/edition is:

Microsoft SQL Server 2012 (SP1) – 11.0.3128.0 (X64) 
Dec 28 2012 20:23:12 
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)

Continue reading “ALTER SCHEMA does not reflect changes into the sys.sql_modules catalog view (definition)”

SQL Server under source control with Team Foundation Services and Red-Gate Source Control

During the last few years I’ve been involved in database source control management and release plans tasks. These are important and (mostly) underestimated topics.

You can implement source control management in many different ways

  • Visual Studio and TFS/SVN/GIT/..
  • Direct integration with source control tools and filesystem
  • Sql Server Management Studio integrated with TFS/SVN/GIT/..
  • Database backups
  • misc..

IMHO, putting databases under source control management should be mandatory for every team.

In this post, I will try to explain how SQL Server Management Studio can cooperate with one of the third party tools that I’m currently using. This is the scenario: