Sunday, October 5, 2008

Countdown to PDC2008: What the heck are Microsoft’s Live Platform Services? Treadwell Tells All!

 

Countdown to PDC2008: What the heck are Microsoft’s Live Platform Services? Treadwell Tells All!

Entry Media

What are the platform infrastructure details behind the Mesh technologies?  Corporate Vice President of Live Platform Services, David Treadwell, will be spilling all the beans in his PDC keynote in just a few weeks, but in this Q&A he gives us a sneak peek.  David explains how there’s so much more to Mesh than just the user experience, and how he and his team will be revealing the underlying particulars that fall below the line at PDC – the platform infrastructure that helps developers build stellar Software + Services apps.  And did Tread mention bits that will be given out at the PDC?   I think he did, but you gotta listen to find out more about what we affectionately call the goods.

Description of System Center Operations Manager 2007 Service Pack 1 support for Microsoft SQL Server 2008

 

Walter Chomak's System Center Operations Manager 2007 Landing Zone

Description of System Center Operations Manager 2007 Service Pack 1 support for Microsoft SQL Server 2008

Currently, it is not a supported scenario to run SQL Server 2008 together with System Center Operations Manager 2007 SP1. Additionally, there is no planned support for scenarios where you run SQL Server 2008 together with the original release version of System Center Operations Manager 2007. For additional information, please visit http://support.microsoft.com/kb/958170

Published Sunday, October 05, 2008 7:41 PM by walterch

Walter Chomak's System Center Operations Manager 2007 Landing Zone : Description of System Center Operations Manager 2007 Service Pack 1 support for Microsoft SQL Server 2008

Saturday, October 4, 2008

Running SQL Server 2008 in a Hyper-V Environment - Best Practices and Performance Recommendations - Whitepapers

 

Running SQL Server 2008 in a Hyper-V Environment - Best Practices and Performance Recommendations

Published: October 2008

Writers: Lindsey Allen, Mike Ruthruff, Prem Mehra
Reviewers: Cindy Gross, Burzin Patel, Denny Lee, Michael Thomassy, Sanjay Mishra, Savitha Padmanabhan, Tony Voellm, Bob Ward

Based on hypervisor technology, the Hyper-V™ virtualization feature in the Windows Server® 2008 operating system is a thin layer of software between the hardware and the operating system that allows multiple operating systems to run, unmodified, on a host computer at the same time. Hyper-V is a powerful virtualization technology that can be used by corporate IT to consolidate under-utilized servers, lowering total cost of ownership (TCO) and maintaining or improving quality of service (QoS). Hyper-V opens more potential development and test environment types that otherwise might be constrained by hardware availability. It is challenging enough in general to right-size the hardware to consolidate current workloads and provide headroom for growth. Adding virtualization to the mix increases the potential capacity planning challenges. The goal of this document is to help address these by focusing on two key areas of running Microsoft® SQL Server® in a Hyper-V environment:

  • System resource overhead imposed by running SQL Server in a Hyper-V environment

  • How well Hyper-V scales running SQL Server 2008

This white paper describes a series of test configurations we ran, which represented a variety of possible scenarios involving SQL Server running in Hyper-V. The paper discusses our results and observations, and it also presents our recommendations. Our test results showed that SQL Server 2008 on Hyper-V provides stable performance and scalability. We believe Windows Server 2008 Hyper-V is a solid platform for SQL Server 2008 for the appropriate workload. It is practical to run production workloads under a Hyper-V environment, as long as the workload is within the capacity of your Hyper-V guest virtual machine.

For more information, please refer to the whitepaper Running SQL Server 2008 in a Hyper-V Environment - Best Practices and Performance Recommendations.

Published Oct 03 2008, 01:38 PM by Lindsey.allen

Filed under: Performance, SQL, Consolidation, Virtualization

Running SQL Server 2008 in a Hyper-V Environment - Best Practices and Performance Recommendations - Whitepapers

out-sql Powershell function - export pipeline contents to a new SQL Server table

 

out-sql Powershell function - export pipeline contents to a new SQL Server table

Recently I needed to take output of command-line tool and cross-reference it with information in the database. The tool's output was XML, and I was additionally processing it a bit with Powershell. Now, how to get that to SQL Server?

I searched for out-sql Powershell cmdlet or function which allows to save the pipeline data to SQL Server, and I could not find one. So I wrote one.

It did the job for me, but obviously it's not perfect. Specifically:

  • I use plain old INSERT statements - it's not the fastest method for inserting large amounts of data. Furthermore, I send each individual statement as a batch and an individual transaction. But I would not worry about it unless I insert hundreds of thousands or rows.
  • No explicit error handling. SQL will throw the errors if it has a problem. The drawback is that script execution won't stop on say connection open error, and will continue - printing an additional error for every row.
  • Short of dates, I save everything as NVARCHAR(MAX). I chose not to mess with integers - it was not needed for my project.

If you do end up using this, drop me a note on your experiences. If you do make enhancements, feel free to share with me!

Here's the function:


##############################################################################
##
## out-sql.ps1
##
## by Alexey Yeltsov, Microsoft Corp.
##
## Export pipeline contents into a new SQL table
##
## Parameters:
##    $SqlServer        - SQL Server
##    $Database      - Database name
##    $Table         - Table name
##    $DropExisting  - Drop $Table if it already exists and recreate it
##                    (default $false)
##    $RowId         - Add identity column named $RowId and make it a primary key.
##                    (default "RowID". Can pass $null if identity is not needed)
##
##
## Examples:
##    ##    #First, load the function
##    . .\out-sql.ps1
##
##    #Export processes to table Process in database Scratch on local sql server
##    get-process | out-sql -SqlServer . -database Scratch -table Process -dropexisting $true
##
##    #Export volume details from 4 servers into a table
##    @("Server1","Server2","Server3","Server4") `
##    | % {$Server = $_ ; Get-WMIObject Win32_Volume -computer $Server } `
##    | Select-Object `
##        SystemName, `
##        Name, `
##        @{Name="CapacityGb";Expression={[math]::truncate($_.Capacity / 1Gb)}}, `
##        @{Name="FreeGb";Expression={[math]::truncate($_.FreeSpace / 1Gb)}} `
##    | out-sql -sqlserver . -database Scratch -table DiskVolume -dropexisting $true
##
##
##
##############################################################################   function Out-Sql($SqlServer=$null,$Database=$null,$Table=$null,$DropExisting=$false,$RowId="RowID") {   begin   {        $Line = 0        [string]$CreateTable = ""        if(-not $SqlServer) { throw 'Out-Sql expects $SqlServer parameter' }        if(-not $Database) { throw 'Out-Sql expects $Database parameter' }        if(-not $Table) { throw 'Out-Sql expects $Table parameter' }        if($DropExisting) { write-debug "Note: If the table exists, it WILL be dropped and re-created."}          $SqlConnectionString = "  Provider=sqloledb;" +                            "  Data Source=$SqlServer;" +                     "  Initial Catalog=$Database;" +                     "  Integrated Security=SSPI;"          write-debug "Will open connection to SQL server ""$SqlServer"" and will populate table ""$Table."""        write-debug "Connection string: `n$SqlConnectionString"        $SqlConnection = New-Object System.Data.OleDb.OleDbConnection $SqlConnectionString        $SqlCommand = New-Object System.Data.OleDb.OleDbCommand "",$SqlConnection        $SqlConnection.Open()   }   process   {        $Line ++          $Properties = $_.PSObject.Properties        if (-not $Properties)        {          throw "Out-Sql expects object to be passed on the pipeline. The object must have .PSObject.Properties collection."        }          #if we're at the first line, initialize the table        if ($Line -eq 1)        {               #initialize SQL connection and create table                             if($DropExisting) { $CreateTable += "IF OBJECT_ID('$Table') IS NOT NULL DROP TABLE $Table;`n"}                             $CreateTable +="CREATE TABLE $Table ( `n"                             $col = 0               if ($RowId)               {                      $col++;                      $CreateTable +="$RowId INT NOT NULL IDENTITY(1,1) PRIMARY KEY CLUSTERED `n"               }               foreach($Property in $Properties)               {                      $col++;                      if ($col -gt 1) { $CreateTable +="," }                                           # In below, why not use "if ($Property.Value -is [datetime])"?                      # Because access can be denied to the value, but Property.TypeNameOfValue would still be accessible!                      if ($Property.TypeNameOfValue -eq "System.DateTime")                      {                            $CreateTable +="$($Property.Name) DATETIME NULL `n"                      }                      else                      {                            $CreateTable +="$($Property.Name) NVARCHAR(MAX) NULL `n"                      }               }                 $CreateTable +=")"                      write-debug "Will execute SQL to create table: `n$CreateTable"                                    $SqlCommand.CommandText = $CreateTable                             $rows = $SqlCommand.ExecuteNonQuery()                      }               #Prepare SQL insert statement and execute it        $InsertStatement = "INSERT $Table VALUES("        $col = 0        foreach($Property in $Properties)        {               $col++;               if ($col -gt 1) { $InsertStatement += "," }                             #In the INSERT statement, do speacial tratment for Nulls, Dates and XML. Other special cases can be added as needed.               if (-not $Property.Value)               {                      $InsertStatement += "null `n"               }               elseif ($Property.Value -is [datetime])               {                      $InsertStatement += "'" + $Property.Value.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'`n"               }               elseif ($Property.Value -is [System.Xml.XmlNode] -or $Property.Value -is [System.Xml.XmlElement])               {                      $InsertStatement += "'" + ([string]$($Property.Value.Get_OuterXml())).Replace("'","''") + "'`n"               }               else               {                      $InsertStatement += "'" + ([string]$($Property.Value)).Replace("'","''") + "'`n"               }        }        $InsertStatement +=")"          write-debug "Running insert statement: `n $InsertStatement"          $SqlCommand.CommandText = $InsertStatement        $rows = $SqlCommand.ExecuteNonQuery()   }   end   {        write-debug "closing SQL connection..."        $SqlConnection.Close()   }
}



 





Enjoy,

Alexey




Random thoughts by SQL DBA/System Administrator : out-sql Powershell function - export pipeline contents to a new SQL Server table

Friday, October 3, 2008

Script to configure SQL Server Maximum Memory

 

Script to configure SQL Server Maximum Memory

I’ve often got SQL Server running on my workstation, laptop or VPC and find that it just soaks up all my memory. This script sets the maximum limit:

USE [master]

GO

-- Set max server memory limit

EXEC sp_configure 'show advanced options', 1

RECONFIGURE WITH OVERRIDE

EXEC sp_configure 'max server memory (MB)', 484

RECONFIGURE WITH OVERRIDE

-- Check the setting

EXEC sp_configure 'max server memory (MB)'

Grant Holliday's blog : Script to configure SQL Server Maximum Memory

Thursday, October 2, 2008

How Do I: Deploy Document-Level Office 2007 Solutions with Windows Installer? (Mary Lee)

 

Deploy Document-Level Office 2007 Solutions with Windows Installer? (Mary Lee)

Published 02 October 08 09:26 AM

In Deploying an Office solution using Windows Installer, you read how to deploy document-level Office 2007 solutions with Windows Installer.  As a follow up, you can now see how to add a Setup project to your VSTO solution and add a custom action to update custom document properties. This example uses Excel 2007, but you can apply these principles to any document-level customization.

Deploying Excel Document-level Customizations with Windows Installer

MSI2

This video is based on the whitepaper: Deploying a Visual Studio Tools for the Office System 3.0 Solution for the 2007 Microsoft Office System Using Windows Installer (Part 2 of 2), where you can get the code and follow along step-by-step.

Mary Lee, Programming Writer.

Office Development with Visual Studio : How Do I: Deploy Document-Level Office 2007 Solutions with Windows Installer? (Mary Lee)

Wednesday, October 1, 2008

Windows Vista Shortcut Keys

 

Windows Vista Shortcut Keys

Shamelessly copied from  The WinVista Club here is a great list of all the Shortcut keys in Windows Vista

WinKey - Open and close the Start Menu

WinKey + D - Minimize all windows to the desktop. Press again to reverse action

WinKey + E - Open Computer in Windows Explorer

WinKey + L - Lock the computer

WinKey + F - Open the Search window to find files and folders

WinKey + M - Minimise all windows

WinKey + Shift + M - Maximise all windows after minimizing them

WinKey + R - Open the Run dialog box

WinKey + X - Open Windows Mobility Center

WinKey + E  - Open Windows Explorer

WinKey + Tab  - Activates Flip 3D. Use mouse wheel to cycle windows

WinKey + U  - Open Ease Of Access Center

WinKey + Pause  - Opens the Systems Properties dialog box

WinKey + F1  - Opens Windows Help & Support

WinKey + B - Sets focus on the Task bar, Allows navigation using arrow keys; opens applications on pressing Enter key.

Updated 24 Sept 2008

Winkey + Space – shows all the sidebar and desktop gadgets

Updated 01 Oct 2008 - found this by mistake!

Winkey + S – Create a screen clipping and send to Microsoft OneNote

Rob

The blog of Rob Margel : Windows Vista Shortcut Keys

Blog Archive