Accessing multiple servers with the SQL Server 2008 PowerShell provider

Short post this evening… Just in case anyone else flails around looking for this feature, its right under your nose. When you use the PowerShell SQL Server 2008 provider, you have visibility to a single, local machine (and all its SQL Server instances you can access with integrated security) by default. To get access to […]

More about sparse columns and column_sets

I'm still getting used to the new sparse column feature in SQL Server 2008. I'd just read in the BOL definition of ALTER TABLE that you can add a column_set to an existing table. I was converting a sample app from an EAV (entity attribute value) design to sparse columns. I used the existing "attribute-value" […]

Programming Policy-Based Management with SMO – Part 6 – Categories, Subscriptions, Wrapup

This is the last part of a series on programming policy-based management. The series starts here. In the previous installment, I created a policy that was constrained to a single database. To accomplish this, I used a Condition that called out the database by name, and tied it to the TargetSet using TargetSet's SetLevelCondition method. […]

Programming Policy-Based Management with SMO – Part 5 – TargetSets and TargetSetLevels

This post is part of a series on programming policy-based management. The series begins here. So, we were working with a policy that required an ObjectSet. ObjectSets contain TargetSets. For example, the ObjectSet for the naming policy (IMultipartName) we were working on needs a TargetSet for Procedure, Synonym, Table, Function, Type, View, and XmlSchemaCollection. Note […]

Programming Policy-Based Management with SMO – Part 4 – Introducing ObjectSets

This is part of a series on programming policy-based management. The series starts here. Now, we'll tackle programming a little bit more complicated policy. The table-naming standard that applies to a set of database objects. For this, we need three items: 1. Condition for defining the policy itself. 2. Policy that uses the condition and […]

Programming Policy-Based Management with SMO – Part 3 – ExpressionNode and Policy

This is part three of a series on programming policy-based management. The series starts here. So, to initialize my Condition's ExpressionNode I need more than just a string. It doesn't look like, at this time, every ExpressionNode CAN initialized with a string. But we can use the subclasses. The ones I need here are Operator, […]

Programming Policy-Based Management with SMO – Part 2 – Conditions

This is the second part in a series about programming policy-based management. The series starts here. To build our MailOffByDefault policy we need:    Condition that specifies properties and settings    Policy that uses the condition Condition first. This looks pretty straighforward. Condition con1 = new Condition(ps, "MailOffSMO"); con1.Facet = "ISurfaceAreaFacet"; con1.ExpressionNode = ExpressionNode.Parse(                         […]

Programming Policy-Based Management with SMO – Part 1 – Intro

I've been looking at the new Policy-Based Management (was: Declarative Management Framework) in SQL Server BOL. All of the BOL examples use the SSMS user-interface to define and maintain the policy store. While there will likely be 3 ways to configure PBM as there is with, say, replication (SSMS, SMO, and system stored procs), I […]

MHO: LINQ to SQL and Entity Framework: Panacea or evil incarnate? Part 6

This is the last post in the series, at least for now. I'll update it (or post more on the topics discussed here) as the products involved evolve and mature. This one's about: LINQ to SQL and EF queries will be "untunable" because, even if you discover a performance problem, you can't change the underlying […]

MHO: LINQ to SQL and Entity Framework: Panacea or evil incarnate? Part 5

This post is part of a series about worries when implementing LINQ to SQL or ADO.NET Entity Framework from a SQL database-centric programmer's perspective. The last two worries are related. It's mostly about either level of abstraction being one level away from the "real SQL code" that's being executed. First off… LINQ to SQL and […]

MHO: LINQ to SQL and Entity Framework: Panacea or evil incarnate? Part 4

This post covers LINQ to SQL and EF worry #4. That is: LINQ to SQL and EF will write code that gets too much or too little data at a time. Too much data in one query is a waste. Too little data is also bad because it means extra database round-trips. I really put […]

Feature synergy in SQL Server 2008

SQL Server 2005 introduced some new features that left “traditional” SQL folks puzzled. What’s the hidden use for SQLCLR? Or the XML data type? Or Service Broker? Besides being available to you as a programmer, these are all used internally.  I once had a conversation with a database person (not SQL Server) who, when asked […]

MHO: LINQ to SQL and Entity Framework: Panacea or evil incarnate? Part 3

This post is part of a series, see parts 1 and 2. Sorry to be so long getting back to this series. This post covers LINQ to SQL and EF worry #3. That is: LINQ to SQL and EF will encourage "SELECT to middle-tier, then update/delete" rather than issuing SQL UPDATE/DELETE statements that are set-based. […]

Installing .NET 3.5 on a SQL Server 2005 machine…be careful

Recently I had the occasion to load .NET 3.5 on to a machine that had an existing instance of SQL Server 2005. .NET 3.5 does not work by versioning the “main .NET assemblies” (e.g. there is no “version 3.5″ of mscorlib.dll, System.dll) but by replacing the 2.0 versions of them. You can observe this by […]

Ed’s Blogging about SQL Server Spatial

It’s good to see Ed Katibah open up a blog on SQL Server spatial data. Ed is sort of the “dad” of spatial data in SQL Server; he’s got a ton of experience and history in this space. Be sure to catch his posting on what’s new in spatial for CTP6.  I’ve been trying out the new functions […]