May 2006 - Posts

Phil Factor's SQL Sudoku Generator

Phil Factor demonstrates some snappy SQL programming with his Sudoku Generator - check it out!

:{> Andy

Technorati Tags: SQL Server Sudoku Phil Factor Developer Community

Speaking Engagements: June 2006

In June, I'm speaking at the following locations / dates:

1 June 2006 - "Scrum with Visual Studio Team System" to the Richmond .Net Users Group.
8 June 2006 - "SSIS Tips and Tricks" to the Richmond SQL Server Users Group.
10 June 2006 - "Beginning SSIS Development", "SSIS Development with Team System", and a chalk talk on "Agile Database Development Practices" to the Reston, VA Code Camp.
27 June 2006 - "Scrum with Visual Studio Team System" to the Capital Area .NET Users Group.

If you read my blog and attend one of these events, please introduce yourself and let me know!

:{> Andy

Technorati Tags: Developer Community Code Camp Speaking SSIS SQL Server Team System Team Foundation Server

posted Saturday, May 20, 2006 11:01 PM by admin with 1 Comments

SQL Server Management Studio (SSMS) and Team System Source Control - the MSSCCI Provider

Source Control is important. To quote a former professor, "There are two types of developers: those who backup their work, and those who will." Team System provides integrated access to the Team Foundation Server Source Control engine for Visual Studio 2005 users.

Q: But what about those who use other Microsoft development platforms?
A: Microsoft Source Code Control Interface (MSSCCI).

The current version of the MSSCCI Provider allows applications that do not integrate with Team Explorer to utilize TFS Version Control. In addition to SQL Server Management Studio (SSMS), supported applications include Visual Studio .NET 2003, Visual C++ 6 SP6, Visual Visual Basic 6 SP6, Visual FoxPro 9 SP1, Microsoft Access 2003 SP2, and SQL Server Management Studio. Previous versions provide integrated TFS source control for a variety of development platforms - including Visual Studio 6.0 applications.

To use SSMS with TFS Source Control, you need to download and install the current version of the .

If I open SSMS and click Tools, Options prior to installing the MSSCCI Provider,

I have no options for Source Control:

Install the MSSCCI Provider by double-clicking the file or right-clicking it and selecting Install:

The wizard starts - click Next to continue:

Accept the license agreement and click Next:

Select an installation folder, execute permissions, and click Next:

Click Next to confirm installation:

When installation completes, click Close:

When complete, I have to close and re-open SSMS to access TFS Version Control functionality:

 

:{> Andy

Technorati Tags: SQL Server Team System Source Control TFS Visual Studio SSMS Management Studio

 

Configure Reporting Services to consume SSIS packages

A really cool feature of SQL Server 2005 is the ability to use a SQL Server Integration Services (SSIS) package as the source for a SQL Server Reporting Services (SSRS) report. There's an example in chapter 17 of the Wrox book .

Before you can take advantage of this functionality, you have to make a couple changes to some SQL Server config files.

Note: SSRS and SSIS must be installed on the same server to utilize this functionality.

Important Note: There are security implications to consider. Please see  for more information.

Navigate to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies (assuming you installed SQL Server on the C: drive) in Windows Explorer. Open the RSReportDesigner.config file in a text editor:

You can use any text editor - or even the Visual Studio 2005 IDE. Call me old-fashioned, I like Notepad. :)

Remove the comments from the config sections (there are two) beginning with the phrase: :

Don't forget the End Comment markup ("-->") at the end of each commented line. 
Save the file and close Notepad.

Next, navigate to C:\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer and open the rsreportserver.config file:

Note: On my demo machine, the file is located in ...\MSSQL.3\.... This will vary depending upon the number and type of SQL Server 2005 family of products you have installed on your machine.

Again, uncomment the section beginning with the phrase: :

 Save the file and close it.

Now, when you create an SSRS data source, you have the option of using SSIS as the data source:

How does this work? When your report refreshes, Reporting Services will call and execute the SSIS package. An important security consideration is the SSRS service account provides the security context for the SSIS package. For this reason, it is a good idea to hard-code SSIS connection string security data - you do not want to give the SSRS account the same permissions as you give an SSIS package.

:{> Andy

Technorati Tags: SQL Server 2005 SSIS SSRS Reporting Services Integration Services Data Source

 

posted Saturday, May 20, 2006 3:46 PM by admin with 0 Comments

Build a Team Foundation Virtual Server - Single Server RTM

This week at VSTeamSystemCentral.com, I start a multi-part series that describes how to build a Team Foundation Virtual Server with the RTM trial version. In this series, I examine installing TFS on a single-server.

In coming weeks, I plan to also document installing a dual-server TFS configuration on virtual servers.

Following, I will use these installations to demonstrate some really cool stuff with TFS!

:{> Andy

Technorati tags: TFS Team Foundation Server Team System

posted Tuesday, May 16, 2006 9:50 PM by admin with 0 Comments

The first meeting of the new Richmond SQL Server Users Group

Last night, the new Richmond SQL Server Users Group met for the first time! Everyone enjoyed the pizza, sodas (thanks Fahrenheit Technology!), and each other's company.

I presented on the topic: Introduction to SQL Server 2005 Installation. As always, I was asked some tough questions - most of which I knew the answer, but some made me go "hmm." If you asked one of those "hmm" questions, please and I will dig into the topic until I find an answer for you.

The next meeting is scheduled for 8 June 2006 at 6:30 PM at the Markel buildings (4600 Cox Road, Glen Allen, VA), speaker and topic to be announced. Hope to see you there!

:{> Andy

Technorati Tags: Sql Server 2005 Sql Server Installation Richmond Va Users Group Developer Community

posted Friday, May 12, 2006 9:12 AM by admin with 0 Comments

Technorati Profile

Technorati Profile

Technorati Tags: Technorati

posted Monday, May 08, 2006 2:40 AM by admin with 0 Comments

The Words We Use

This isn't a rant, it's a confession.

A popular, albeit opinionated, radio talk-show host sometimes says "words mean things." He's right (pun intended) - they do.

I use words quite often - speaking and writing professionally, business communications, websites, articles, and blogs. Sometimes I use less appropriate words than at other times. If the words remain under my control, such as on this blog or one of my websites, I can edit out the less appropriate words for better words when I realize my error. When I click the Send button on a business email, however, it's almost always impossible to correct inappropriate words contained therein.

When I use inappropriate words, I tend to follow a pattern. It's not that the word can't mean what I intended to communicate - it's a combination of it rarely meaning what I intended along with there being a much better word for expressing (or expressing more of) the thought. Some examples may help:

Word(s) I Use               Better Word(s)
Difficult                         Important
Wrong                           Incomplete

That's not possible          I don't understand

Wrong                           Different

You see? Call it a mid-year resolution - as opposed to a New Year's resolution: I resolve henceforth to use the best words for each situation.

:{> Andy

Technorati Tags: Software Business Business Communication

posted Sunday, May 07, 2006 4:26 PM by admin with 0 Comments

Dynamic SQL in SQL Server Integration Services (SSIS)

I sometimes miss the Dynamic Properties Task in DTS. I used it for all sorts of functionality - and I'm struggling to replace some of that flexibility in complex SSIS development.

I recently developed a package with dynamic SQL serving as the data source for a Data Flow. I accepted the mission and here's an example to demonstrate how I accomplished this:

Drag a Data Flow Task onto the Control Flow canvas:

Double-click the Data Flow task to edit it. Drag a DataReader Source onto the Data Flow canvas and double-click it for editing. The Advanced Editor opens. Select or create an ADO.Net connection manager on the Connection Managers tab:

On the Component Properties tab, enter an SQL Statement in the SqlCommand property (I query a table I created named dbo.TestTable which contains three columns: TestID [Identity PK], TestName [VarChar(20)], and TestValue [int]):

Verify the SqlCommand field names on the Column Mappings tab:

Drag a Flat File Destination onto the Data Flow canvas and (this is important) connect the output of the DataReader Source to the Flat File Destination with a Data Path (green arrow) [Note: Previously, I incorrectly identified this as a Precedence Constraint. Precedence Constraints are found only on the Control Flow. Data Paths are the connecting arrows on the Data Flow. My apologies for any readers misled.]:

Double-click the Flat File Destination to edit it. On the Connection Manager page, click the New button to create a new Flat File Connection Manager:

Assign the Flat File Connection Manager a name (I used "OutFile") on the General page. Enter a filename ("OutFile.txt") and specifics regarding collation and row delimiters:

Click Columns to configure column details.

Why? I always create Flat File Connection Managers for new files from the Flat File Destination task. If the target file does not exist, the Destination task has no better way to know which columns to expect.

Note the Preview grid displays the expected columns (read from the DataReader Source via the precendence constraint connector):

Click OK to create the Connection Manager and return to the Flat File Destination Editor:

Click the Mappings item in the page list to view (and auto-map) the DataReader Source columns to the Flat File Destination columns:

Return to the Control Flow tab and click any empty space on the Control Flow canvas.

Why? You are about to create a new Variable. Unlike DTS variables (which were all global in scope), SSIS variables have specific scope. Scope is determined, for better or worse, by the Task or SSIS Object that has focus when you create a new variable. I say "for better or worse" because I've not yet discovered a method for changing variable scope during the variable creation process. Clicking on the Control Flow canvas gives it focus, and Package-scoped (global) variables may then be created.

Click View, then Other Windows, then Variables to display the Variables dialog. Set the Data Type to String and enter some query in the Value field. Note: the query used here must expose the same columns as the query in the SqlCommand property of the DataReader Source or the Data Flow will fail during pre-execution package validation (There is most likely a method to address this - more later, perhaps...). I created a variable named SQLOut with a default value of "SELECT 0 AS TestID, 'Zero' AS TestName, 0 AS TestValue":

Drag a Script Task onto the Data Flow canvas. Connect it via Data Path (green arrow) [Note: Previously, I incorrectly identified this as a Precedence Constraint. Precedence Constraints are found only on the Control Flow. Data Paths are the connecting arrows on the Data Flow. My apologies for any readers misled.] to the Data Flow task as shown:

Double-click the Script Task to open the Script Task Editor. Click on Script in the page list and add the variable name created earlier (SQLOut) to the ReadWriteVariables property:

Click the Design Script button to open the Visual Studio for Applications (VSA) Script Editor. Enter the following script in the Main subroutine of the ScriptMain class:

MsgBox(Dts.Variables("SQLOut").Value)

Dts.Variables("SQLOut").Value = "SELECT 1 AS TestID, 'Unos' AS TestName, 12 AS TestValue"

MsgBox(Dts.Variables("SQLOut").Value)

Dts_TaskResult = Dts_Results_Success

To test, close the VSA Editor and click the OK button to close the Script Task Editor. Right-click the Script Task and click Execute Task:

The first MsgBox command should execute displaying the default contents of the SQLOut variable:

Click the OK button. The second MsgBox command should display the updated SQLOut variable contents:

Click the OK button. The Script task should complete without error:

Announcing the Richmond SQL Server Users Group!

Frank La Vigne and I are proud to announce the formation of the Richmond SQL Server Users Group!

The first meeting is scheduled for 6:30 PM 11 May 2006 at 4600 Cox Road, Glen Allen, VA. I'll be speaking, and since this is the first meeting I think I will start at the beginning - with a presentation on installing and configuring SQL Server 2005.

We're working on a website and hope to have it online sometime this month.

Special thanks to Fahrenheit Technology for sponsoring our inaugural meeting!

I hope to see you there Thursday!

:{> Andy

Technorati Tags: SSIS Sql Server Developer Community Richmond Virginia

posted Sunday, May 07, 2006 1:58 AM by admin with 0 Comments

Speaking at the Richmond .Net Users Group (Updated)

On Thursday, 1 June 2006 (updated from "4 May 2006"), I will be presenting at the Richmond .Net Users Group. I'll be talking about using Team System with the Scrum Development methodology.

If you're in the area, stop by and say "Hi!"

:{> Andy

Technorati Tags: Team System Scrum Developer Community Richmond Virginia

posted Tuesday, May 02, 2006 6:20 PM by admin with 0 Comments