# Wednesday, October 19, 2005

Tomorrow is the 12th annual Technology Enterprise Forum here in Manhattan.

I was a judge this year in the outsourcing category. It was fun to judge the submissions, you can submit yourself for a best practice award next year here.

posted on Wednesday, October 19, 2005 3:46:32 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Monday, October 17, 2005

Have you ever been to a Microsoft conference and listened to them carefully? They make up words.

 

 Now those who know me know that I also make up words all the time-my staff at Zagat use to keep a list on a whiteboard, and then hold contests to see who can figure out what my new words mean. The problem is that since I attend so many Microsoft conferences as a speaker, I start to pick up Microsoftese. What is even worse is that I now use these “words” in every day life. When I am in the hardware store and ask about the “functionality” of the new vacuum cleaner I want to buy. Or when I am buying a new electronic toothbrush I ask if one model is more performant than the other?

 

Functionality is a word now, even if Microsoft made it up. I decided to start using performant in my new SQL Server book. I got this comment from the editor:

 

[LF] Steve: I don't think "performant" is a word.

 

And the tech editor replied:

 

[JFC] "performant" is one of those classic 'words' that Microsofties use in presentations; techies understand it, but it's not really a word.  Please revise, and avoid its use in the future.

 

I decided to use it anyway. I then emailed Bill and Andrew on the topic hoping they would think it is funny, but got this reply from Andrew:

 

----

From: Andrew Brust

Sent: Monday, October 10, 2005 1:44 PM
To: Zack, William; Stephen Forte; Wzack (E-mail)
Subject: RE: some humor from book hell

 

I agree with her on that one.  It’s not a word, and it should be revised.  If you don’t take it out, the copy editors will.

-----

 

I decided to challenge Andrew on this one. I looked it up. It is in Webster's New Millennium™ Dictionary of English.


So I guess it is a word after all….

posted on Monday, October 17, 2005 3:26:14 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [5] Trackback
# Thursday, October 13, 2005

My brother, Richard Campbell, and Carl will be in town tomorrow night, come on and check it out:

NET Rocks NYC!

.Net Rocks NYC! at our very own user group. Be part of the fun. Click
here to register.
https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032280187&Culture=e\
n-US

Friday, October 14, 2005 6:00 PM - Friday, October 14, 2005 9:00 PM (GMT-05:00) Eastern Time (US & Canada)
Language: English-American

Microsoft Corporation
1290 Avenue of the Americas
6th Floor New York, New York 10104
United States


General Event Information
Products: .NET.

Recommended Audience: Developer.

That's right, America! Carl Franklin, Richard Campbell, Geoff the sound guy, and a makeshift podcasting crew are hitting the highway in an RV on a coast-to-coast road trip from Boston to San Francisco October 12th to November 7th, 2005!

They'll be hosting evening events and producing DNR shows in 18 cities: Boston, Hartford, New York, Philadelphia, Baltimore, Washington DC, Raleigh, Atlanta, Jacksonville, Nashville, Memphis, Dallas, Houston, Austin, Phoenix, San Diego, and Los Angeles; and ending at the launch of Visual Studio .NET 2005 in San Francisco!! 

In each city, a sneak peek at new and exciting things coming in Visual Basic 2005 and Mobility Development in Visual Studio 2005, and lots of giveaways including DNR swag, sponsor software, and even mobile devices!! AND post-event DNR interviews with local developers who are doing cool things with .NET 1.1 and the beta of 2.0!

There will be parties along the way! Of course, they'll be blogging and podcasting photos and video (for the next DNR Movie), and a new .NET Rocks! show online every day during the road trip! Ok, maybe not EVERY day, but they're producing a show in every city!

posted on Thursday, October 13, 2005 5:26:38 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Wednesday, October 12, 2005

I have a wonderful VPS of Yukon and Whidbey with all of my conference demos. I my first TSQL session and it went well but the VPC was slow. Then I had my next session “Ranking and Windowing” functions, 15 minutes later in another room. I suspended my PC and went on. VPC was dead in the water.

I had to do a song and a dance. A delegate named Harold lent me his computer so I can demo code. I decided to reboot my machine while I was working on Harold's PC. Once back, life was good.

So lesson learned, do not suspend your computer with a VPC. However another speaker, Walt Ritscher, let me know that there is a hotfix for this craziness. Installed and life is good. 

 

 

posted on Wednesday, October 12, 2005 2:24:41 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [6] Trackback
# Tuesday, October 11, 2005

When I installed the latest beta of SQL Server 2005 and ran the Merge Replication wizards to create a Publication, I got a strange new error not present in previous betas. The error said that the “XP Agents are not enabled and you must run sp_configure to enable them.”

I figured that MS did the right thing and turned this feature off by default. I ran the new SQL Server Surface Area Configuration Tool and could not find anything for enabling XP Agent stored procedures, etc. I did find a lot of good stuff disabled by default that will make SQL Server more secure. This is good since by default out of the box an installation of SQL Server will leave some of the advanced, yet powerful tools disabled to deny a hacker the ability to guarantee that it will be turned on.

So in my case, MS turned it (XP Agents) off but do not give a way in the tool to enable it. After some trial and error and help from help I got this to make it all work and my publication agent ran smoothly:

You can't just run sp_configure, you first have to turn on advanced options so SQL Server knows it exits:

use master
go
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
go
RECONFIGURE
GO

It is good that this stuff is turned off by default, it will just mean a little more time for us developers to setup and deploy. Worth the tradeoff.

posted on Tuesday, October 11, 2005 8:15:40 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Monday, October 10, 2005

Speaking at VSLive again down in Orlando, Florida. Should be a great show. I am speaking on SQL Server 2005 topics, hope to see you there.

TSQL Enhancements
Stephen Forte, Corzen, Inc.
10:30 a.m.

By now you have heard that you can write stored procedures in C# and VB . NET for SQL Server 2005. Does that mean TSQL is dead? NO! A lot has changed in the world of TSQL with the next version of SQL Server. See how efficient you can become with the new TSQL enhancements. You can crosstab in seconds with the PIVOT statement, perform recursive queries much easier with Common Table Expressions, manipulate XML data easier with the XML datatype and aggregate with ease using the new TOP functions. Report with ease with ranking functions. We’ll take a look at the new TSQL enhancements, data types, and the like. We’ll also look at how to choose between CLR Stored Procedures and TSQL.

Data Analysis Using Ranking and Windowing Functions
Stephen Forte, Corzen, Inc.
11:45 a.m.

SQL Server 2005 adds the functionality of a ranking expression that can be added to your resultset that is based on a ranking algorithm being applied to a column that you specify. This will come in handy for reporting and in .NET applications for paging and sorting in a grid as well as many other scenarios. We’ll explore the ROW_NUMBER() function, which assigns a running count to each row and compare it to RANK() and DENSE_RANK(). Use these functions to solve complex SQL Problems. Then we’ll look at custom percentile ranking using NTILE() and look at business and academic applications of NTILE. Lastly, we’ll apply windowing functions to all of the four ranking functions with PARTITION BY to perform hard code aggregate functions. 

 

 Mobile Enterprise Applications with SQL Server 2005 Mobile Edition
Stephen Forte, Corzen, Inc.
4:30 p.m.

Using SQL Server 2005 Mobile Edition and Visual Studio 2005, Microsoft has made developing applications for the Windows SmartPhone and Pocket PC devices as easy as developing conventional Windows and Web applications. The .NET Compact Framework and SQL Server Mobile give you full functionality on the device with the ability to perform Merge Replication with a back-end SQL Server. This session will help you leverage your existing .NET and SQL Server to build mobile enterprise applications from scratch that can dynamically update a backend SQL Server or work offline and synchronize later.

posted on Monday, October 10, 2005 10:40:26 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Sunday, October 09, 2005

I know that all my firends in Pakistan read my blog, and let me say my heart goes out to you. You and your country really touched me on my most recent visit.

While most of my firends are safe in Karachi, I had to search for Saqib Ilyas in Lahore, much closer to the epicenter. Thankfully he is ok.

My buddy Fahad Majeed reports about the earthquake here.

You can donate here.

posted on Sunday, October 09, 2005 10:38:32 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [1] Trackback
# Saturday, October 08, 2005

SQL Server 2005 allows you to store XML in a native data type. That is cool, however, having XML in the database is almost useless unless you can query the elements and attributes of the XML data natively. XQuery becomes very useful when you can use it to search based on the values of a particular element or attribute. The xml.exist() function accepts an XQuery as input and returns 0, 1, or NULL, depending on the result of the query; 0 is returned if no elements match, 1 is returned if there is a match, and NULL is returned if there is no data to query on. For example we will verify if a node exists in this particular XML string of classes.

DECLARE @XML xml

Set @XML='

<classes>

   <class name="SQL Server Index"/>

   <class name="SQL Precon"/>

</classes>

'

Select @XML.exist('/classes')

 

The code above returns a 1 since the “classes” element exists in the XML variable. If you change the XQuery expression to search for an XML node that does not exist like,  Select @XML.exist('/dogs), then it will return 0.

You can see this in action as part of a CHECK CONSTRAINT. SQL Server will not allow you to use an xml.exist as part of a CHECK CONSTRAINT. So you have to first create a user defined function (UDF) to perform the action. This UDF accepts an XML field and retunes the value of an xml.exist() method looking for an instance of < Orders'>:

USE AdventureWorks

GO

CREATE FUNCTION dbo.DoesOrderXMLDataExist        

(@XML XML)                    

RETURNS bit                       

AS

BEGIN                              

RETURN @XML.exist('/Orders')   

END;

GO

 

            To use this UDF as a CHECK CONSTRAINT, just create a table and pass the column you want to apply the constraint to the UDF you just created.

--create the table using the function

CREATE TABLE OrdersXMLCheck

   (OrderDocID INT PRIMARY KEY,

   xOrders XML NOT NULL Default '<Orders/>'

 CONSTRAINT xml_orderconstraint

  CHECK(dbo.DoesOrderXMLDataExist(xOrders)=1))

 
Its that simple, now you have a rule enforced on that column making sure that an <Order> element is added to this table.
posted on Saturday, October 08, 2005 3:56:06 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [2] Trackback