SQL Server 2008, VSLive, Orlando, Day three

by Terry 5/14/2008 8:13:00 AM

Some new features are now in SQL Server 2008 (beta as I write this).

Table Valued Parameters (TVP) are just that, parameters. They are more like objects that can be declared from a table definition. These TVPs can be passed to store procedures as a single value or marshaled to other clients as a whole.

The obvious advantage to this is large data changes. For example, I have an order and that order has a hundred order items. A stored procedure can be called that has two parameters; a TVP for the order header and a second TVP for all one hundred of the order items. This saves considerable back and forth travel time from a client. Ultimately, I think it can make transactions much more reliable.

In the past, I have done much the same thing, but less elegantly, with the somewhat more cumbersome use of XML objects passed into SQL Server 2000 stored procedures.

The Varbinary(MAX) FILESTREAM object declaration is pretty cool too. This allows BLOB data to be saved to the file system of the SQL Server, but still retain all the attributes of a varbinary object. The advantages are the blobs have transactional and SQL programmatic access, but are only limited to the size of space on the file system. I presume the disadvantage is that if the file system is not properly secured, the files can be edited outside of SQL Server, this was demonstrated, and therefore such edits, I assume, are not transaction secure. Being a beta product, it is too early to know for sure how that will be addressed.

Currently rated 1.5 by 40 people

  • Currently 1.45/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Mac Clones and other random notes

by Terry 4/14/2008 6:59:00 PM

Psystar sells a $399 Mac clone
"Why spend $1999 to get the least expensive Apple computer with a decent video card when you can pay less than a fourth of that for an equivalent sleek and small form-factor desktop with the same hardware,” says a note on the company Web site.
"There may be another problem for Psystar on the horizon. Apple’s end user license agreement states that 'You agree not to install, use or run the Apple Software on any non-Apple-labeled computer, or to enable others to do so.'"

Which I find interesting. Psystar is not offering anything but hardware that is functionally identical with what Apple offers. That is not a violation of any software license in itself. If I attempt to install OS X on non-Apple hardware, then I am technically in violation of the Apple agreement, but owning the hardware is no problem.

Karen and I spent most of the weekend preparing Karen's mother's home for sale. Karen helped clean and I moved boxes, packed loads into storage and played with attending children. We should hear if we need to paint and otherwise stage the home next weekend. The sort of it is, I did not work on our house this weekend, nor did I work on the martial arts lesson plans I need to complete. I will start that tonight and throughout the week.

I am working on a one-off data feed for a project at work. I am posting data for an outside vendor on a monthly cycle. I choose to use the SQLXML extension for IIS. This pulls and supplies the data from a data warehouse with a SQLXML template. This is useful because the template can incorporate additional data about the feed, like when it was generated as well as format the output.

I am writing a C#, .Net 2.0, application that will run as a scheduled task to periodically generate the data to a static file system, create an historical archive and manage directory cleanup and error notification. The static XML files can be opened in Excel as is. I am providing an Excel document that automatically opens the current file and formats the data. I will post the framework for all this in a static page on my site when it is complete. Rather simple, but elegant in some ways.

The SQLXML template looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<DataFeed xmlns:sql='urn:schemas-microsoft-com:xml-sql'>
     <sql:query>SELECT convert(varchar(22), GetUTCDate(), 126)</sql:query>
<sql:query>SELECT convert(varchar(22), GetUTCDate(), 112) + '.xml'</sql:query>
  <sql:query >
    SELECT *

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Powered by BlogEngine.NET
Theme by Mads Kristensen

About Terry Losansky

Terry Dee Losansky

I am a software architect, actively practice and teach martial arts and live in Snoqualmie, Washington. I have an amazing daughter who is the jewel of my life.

E-mail me Send mail
Terry's Facebook profile


<<  September 2020  >>

View posts in large calendar

Recent comments



The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2020

Sign in