May 2007 - Posts
When you create your DB Dude project and try to build and deploy the project to the client's sandbox at the first time, you suddenly get the error:
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections."
This error occurred because the networking protocols are disabled by default in SQL Server Express. In order to solve this problem you should configure SQL Server Express to accept remote connections. I followed this post's (at SQL Express WebLog) instuctions and the problem was solved.
A lot of users feel confused about the installation requirements of VSTS for DB Professionals (DB Pro).
"Team Suite or other product must be installed before Db Pro" as the ReadMe file says.
The requirements of VSTS for Database Professionals are:
- Visual Studio Professional Edition/Visual Studio Team Suite. Team Edition for Database Professionals is available as a separate product; however, to evaluate the Team Edition for Database Professionals Trial you must first install the Visual Studio 2005 Team Suite 180-Day Trial.
- The Visual Basic or C# language feature must be installed.
- MSXML must be installed.
- Visual Studio Professional Edition is included on the DVD for Visual Studio Team Edition for Database Professionals.
On Monday we held the third meeting of Israeli ALM User group. This session was dedicated to Team Build features. Excellent presentation was held by Dudu Shmaya from Clarizen. Dudu is extremely smart guy and we are always happy to work with him.
We are still working on user group home page. In the meanwhile, you can download complete slide deck and demo projects from here. Presentation and demos from our previous session (dedicatted to Testing) can be found here.
When deploying test data to database (such as your sandbox database) with triggers, you need that the triggers will be disabled before generating test data and then re-enabled after the data has been appropriately generated.
I wrote two scripts for this issue: DisableTriggers.sql , EnableTriggers.sql .
Execute this T-Sql before deploying test data:
DisableTriggers.sql
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'#AllTriggers') AND type in (N'U'))
DROP TABLE #AllTriggers
--Getting all trigger names ad on what tables and schemas they reside:
--Put the list in a temp tab
SELECT T.Name as TrigName, o.Name as TabName, s.Name as SchemaName
INTO #AllTriggers
FROM sys.triggers T join sys.objects o
ON T.parent_Id = o.object_ID
JOIN sys.schemas s
ON o.schema_Id = s.Schema_ID
--Disabling all triggers: A cursor to run over the temp table
DECLARE TrigCurs Cursor
FOR SELECT TrigName, TabName, SchemaName FROM #AllTriggers
OPEN TrigCurs
DECLARE @TrigName varchar(250), @TabName varchar(250), @SchameName VarChar(250), @cmd varchar(1000)
FETCH Next FROM TrigCurs INTO @TrigName , @TabName , @SchameName
WHILE @@Fetch_Status = 0
BEGIN
SET @cmd = 'disable trigger all on '+ @SchameName+'.'+@TabName+';'
EXEC (@cmd)
FETCH Next FROM TrigCurs INTO @TrigName , @TabName , @SchameName
END
GO
I execute this script before data generation started.
Re-enable them after the data was generated. The T-Sql is:
EnableTriggers.sql
--Enabling back all triggers: A cursor to run over the temp tab
DECLARE TrigCurs2 Cursor
FOR SELECT TrigName, TabName, SchemaName from #AllTriggers
OPEN TrigCurs2
DECLARE @TrigName varchar(250), @TabName varchar(250), @SchameName VarChar(250), @cmd varchar(1000)
FETCH Next from TrigCurs2 into @TrigName , @TabName , @SchameName
WHILE @@Fetch_Status = 0
BEGIN
SET @cmd = 'enable trigger all on '+ @SchameName+'.'+@TabName+';'
EXEC (@cmd)
FETCH Next FROM TrigCurs2 INTO @TrigName , @TabName , @SchameName
END
DROP TABLE #AllTriggers
GO
I execute it after data generation ended. Both of the scripts executed from the Script.PostDeployment.sql file.
You can download both scripts: EnableTriggers.sql , DisableTriggers.sql
What does error message TSD4001 means? Or TSD3025?
How can you filter out db dude's warning messages?
A great list that summarizes and explains the warning and error messages of db dude and the way to filtering warning messages, you can find at gert's post.
Check it out.
Some time you don't want specific type of changes to be shown in check-in window during checking-in other changes.
In order to prevent this you should do those changes in separate workspace on your computer. For instance you don't want to see your locked documents when you check-in other files, to do this create new workspace and use it only for locked documents.
By using different workspace for different changes you can define what kind of changes will appear in check-in window.
The patterns and practices VSTS team has created a project in CodePlex some time ago. Recently, they have (slightly J) opened it up to community contribution using a Wiki. Our first article is by Maor David and is discussing the synchronization between TFS and test director.
We believe that the Wiki and the whole project are extremely important to the community and will do our best to raise more contributions.
First of all, an introduction - a new blog by Maor David . Maor is an experienced .NET architect, developer and ALM specialist. Maor has recently implemented DB Dude of 3 customers sites and I hope that he will find the time to blog about it. I believe hsi new blog will be a very intresting place to track.
Another blog, by Guy Kolbis is a mixture of .NET and advanced ALM Testing posts. Guy is a our web, load and stress specialist and has recently performed some complicated performance labs for our customers.
Last, but by all means not least, is Leon Langleyben’s blog – Leon is our chief architect and an ASP.NET MVP, he is blogging in both locations of different issues.
One of our customers implemented DB Dude as part of the development cycle.
The customer had the following requirements from the data generation:
- The data must be closer as possible to the production environment data (remote machine).
- The data generation has to be fast - generate only new data when deployment occur.
The Data generation plan which supplied with the Db Dude is a great utility but the customer has ~1000 tables , ~10K columns and to create data generation plan that answers these requirements is a very complicated thing.
We developed a utility (win form) that generates an import script from one database to another. The utility displays to the user the available databases on the source server; the user selects the required tables to be included in the import script; the user select the target database.
The utility generates the import script based on the 'Open RowSet' method and selects only the new/updated data that should be imported to the sandbox database.
This generated script is placed at the post deployment scripts as the last executable script.
Over the last year I frequently asked by our customers "What is the best way to structure my team projects?"
This is a very good question!
And the answer?....
Miscrosot produced a whitepaper (Guidance for Structuring Team Projects) that summarizes the factors to consider when making this choice.
Take a look on it.
The public CTP for the first service release of Visual Studio Team Edition for Database Professionals just released.
For all the details, please check out Gert's post right here.
The third meeting will take place on the 14 of May in its regular location. (microsoft offices in Raanana)
This month we'll focus on the Team Build capabilities - those that come 'out-of-the-box' and extensive customization issues.
Our speaker is Dudu Shamaya http://notsosmartbuilder.blogspot.com/. I deeply recommend a tour in his blog - this guy has a lot to say about TFS in general and the build mechanism in particular.
see you there.
http://www.microsoft.com/israel/msdn/default.mspx