Archive for the ‘Tools’ Category

Data Dude - Project Variables not set in SQL scripts

Wednesday, July 25th, 2007

[Ed. - Question resolved. See Update at the end of the post] 

I am using Visual Studio Team Suite with the Database Professionals add on (”Data Dude”) - with SR1 installed. However, when I build the database project, I am not getting the expected results in the resulting omnibus .SQL script. As a result, I have to build the project, then manually edit the .SQL file, and deploy the script from the command line using SQLCMD.EXE — all of which is preventing me from automatically building & deploying with a single-click from the VS IDE (which I want to do).

Here are how I’ve set up the variables in my database project (click the image to enlarge):

Data Dude Project variables

Building the project creates a script with no “setvar: ” statements for the variables I’ve added to the project:

SET ARITHABORT, CONCAT_NULL_YIELDS_NULL, ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
GO
:setvar DatabaseName "SIDW_LOCALDEV"
:setvar PrimaryFilePhysicalName "F:\SQL2005 DATA\SIDW_LOCALDEV.mdf"
:setvar PrimaryLogFilePhysicalName "F:\SQL2005 DATA\SIDW_LOCALDEV_log.ldf"

I expected (but did not see) the following lines as well:

:setvar SQLUserDWETL "DevDWETL"
:setvar SQLUserDWAudit "DevDWAudit"
:setvar SQLUserDWReader "DevDWReader"

These values are used in other scripts, such as this line in the “Post-Deployment” script “Permissions.sql”

GRANT SELECT ON OBJECT::[DW].[vDailyCalendar_dim] TO [$(SQLUserDWReader)]
GO

Are my expectations out of line, or should the “Build” command for the database project output a SQL file that contains the setvar statements?

Note - I’ve created a thread on microsoft’s forums to help track down a resolution. If one surfaces, I’ll be sure to note it here.

UPDATED - Turns out my expectations were incorrect. See the thread for the details. Basically if you deploy from the IDE, DataDude will pass the variable values to the deployment and you’re good to go. If you want to use the SQL script generated by a build, you’ll have to provide them there (basically doing what Data Dude does within the IDE). Many thanks to Gert Drapes for the prompt response.

DataDude SR1

Wednesday, July 25th, 2007

Data Dude SR1(EN) - (KB936612)

TFS - Event Subscription Tool

Tuesday, July 24th, 2007

http://blogs.vertigosoftware.com/teamsystem/archive/2007/02/08/Team_Foundation_Server_Event_Subscription_Tool.aspx

Format .dtsConfig files

Friday, July 6th, 2007

In BIDS: Ctrl-K, Ktrl-D

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=263780&SiteID=1 

roundup

Friday, March 16th, 2007

Using SQL Server Files for Unit Testing in VS2005 TS

One of the nice features of VSTS is data-driven testing. It’s as easy as hooking up a couple of attributes to the test classes, which then allows tests to be run for multiple sets of input data. The problem is when you want to include data with the test project.

(a solution follows)


Using capistrano to manage EC2 instances (amazon.com’s “virtual computing environment”). The comments also have some interesting discussion about the considerations made in choosing to use Amazon’s services for a startup. See also: Building a Web Application with Ruby on Rails and Amazon S3.

Dare Obasanjo pondering the future of Amazon’s S3 & EC2 services:

What I suspect is that without some catalyst (e.g. the next YouTube is built on S3 + EC2)these services will not reach their full potential. This would be unfortunate because I think in much the same way we moved from everyone rolling their own software to shrinkwrapped software, we will need to move to shrinkwrapped Web platforms in the future instead of everyone running their own ad-hoc cluster of Windows or LAMP servers and solving the same problems that others have solved thousands of times already.


Passing Variables Between Packages

Monday, March 12th, 2007

I recently came across a roadblock in an SSIS project — how to pass the variables scoped in one package to a “child” package executed via an “Execute Package Task”. Like most SSIS speedbumps, the solution was easy to implement once I found the answer (at SQLIS.com) — Package Configurations.

On the menu bar: SSIS >> Package Configuration ….

From the Configuration Type dialog, select “Parent package variable” and go through the wizard to map the Parent package variable to the variable in this Child package

Parent Package Variables