Sql-Clr

PASS Summit 2011

Davide Mauri

Si rinnova l’appuntamento con il PASS Summit 2011, la più grande ed importante conferenza mondiale con SQL Server! Un’occasione unica di formazione e di crescita professionale: tutti i più rinomati speaker modiali si troveranno lì…non mancare!

  • A grande richiesta Keynote di David DeWitt, Microsoft Technical Fellow
  • 168 Sessioni
  • 2 Giorni di seminari Pre-Conference
  • 5 Track con sessioni da livello 100 a 500
  • Networking con migliaia di esperti, MVP, persone del team di sviluppo e del SQL CAT
  • Ask The Experts

A tutto questo aggiungete che tutti i membri di UGISS potranno beneficiare di uno sconto di 200$ (duecento dollari), che non è cosa da tutti i giorni! :)

PASS Summit 2010

Davide Mauri

Si rinnova l’appuntamento con il PASS Summit 2010, la più grande ed importante conferenza mondiale con SQL Server! Un’occasione unica di formazione e di crescita professionale: tutti i più rinomati speaker modiali si troveranno lì…non mancare!

  • 160 Sessioni
  • 2 Giorni di seminari Pre e Post conference
  • Networking con migliaia di esperti, MVP, persone del team di sviluppo e del SQL CAT
  • Ask The Experts

A tutto questo aggiungete che tutti i membri di UGISS potranno beneficiare di uno sconto di 200$ (duecento dollari), che non è cosa da tutti i giorni! :)

Microsoft SQL Server 2008 R2 Feature Pack

Davide Mauri

E’ disponibile il Microsoft® SQL Server® 2008 R2 Feature Pack, contenente una numerosa lista di software e librerie per utilizzare al meglio tutte le feature di SQL Server 2008 R2.

Tra i piu interessanti, spiccano senza dubbio il Report Builder 3.0 e PowerPivot

  • Microsoft® SQL Server Report Builder 3.0 for Microsoft® SQL Server 2008 R2
  • Microsoft® SQL Server® PowerPivot for Microsoft® Excel
  • Microsoft® SQL Server® 2008 R2 Reporting Services Add-in for Microsoft® SharePoint® Technologies 2010
  • Microsoft® SQL Server® 2008 Reporting Services Add-in for Microsoft® SharePoint® Technologies 2007
  • Microsoft® SQL Server® 2008 R2 Policies
  • Microsoft® Sync Framework 2.0 Software Development Kit (SDK)
  • Microsoft® SQL Server® Compact 3.5 SP2
  • Microsoft® SQL Server® Compact 3.5 SP2 For Windows Mobile
  • Microsoft® SQL Server ®Compact 3.5 SP2 Server Tools
  • Microsoft® SQL Server® Compact 3.5 SP2 Books On-line
  • Microsoft® SQL Server® JDBC Driver 3.0
  • Microsoft® Connect 1.1 for SAP BW for SQL Server® 2008 R2
  • Microsoft® System CLR Types for SQL Server® 2008 R2
  • Microsoft® SQL Server® 2008 R2 Remote Blob Store
  • Microsoft® SQL Server® 2008 R2 Books On-line
  • Microsoft® SQL Server® 2008 R2 Upgrade Advisor
  • Microsoft® SQL Server® 2008 R2 Native Client
  • Microsoft® Core XML Services (MSXML) 6.0 SP 1
  • Microsoft® OLEDB Provider for DB2
  • Microsoft® SQL Server® 2008 R2 Command Line Utilities
  • Microsoft® SQL Server® Service Broker External Activator for SQL Server® 2008 R2
  • Microsoft® Windows PowerShell Extensions for SQL Server® 2008 R2
  • Microsoft® SQL Server® 2008 R2 Shared Management Objects
  • Microsoft® SQL Server® 2008 R2 ADOMD.NET
  • Microsoft® Analysis Services OLE DB Provider for Microsoft® SQL Server® 2008 R2
  • Microsoft® SQL Server® 2008 R2 Analysis Management Objects
  • Microsoft® SQL Server® 2008 Data Mining Add-ins for Microsoft® Office 2007
  • Microsoft® Datamining Viewer Controls For Microsoft® SQL Server® 2008
  • Microsoft® SQL Server® Driver for PHP 1.1
  • Microsoft® SQL Server® Migration Advisor
  • Microsoft® SQL Server® 2008 R2 Best Practices Analyzer

Ogni singolo tool è scaricabile separatamente da qui:

SQL Server 2008 R2 Update for Developers Training Kit (March 2010 Update 2)

Davide Mauri

Rilasciato l’Update 2 del “SQL Server 2008 R2 Update for Developers Training Kit”, package dedicato a tutti coloro che usano SQL Server 2008 e vogliono fare un pò di training per usarlo al meglio:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=fffaad6a-0153-4d41-b289-a3ed1d637c0d 

Il contenuto è estramamente interessante:

  • Presentations (15)
    • SQL Server 2008 R2 Update for Developers Overview Part I - SQL Server 2008 Review
    • SQL Server 2008 R2 Update for Developers Overview Part II - Introducing SQL Server 2008 R2
    • SQL Server 2008: Filestream
    • SQL Server 2008: Spatial
    • SQL Server 2008: T-SQL
    • SQL Server 2008: Date and Time Types
    • SQL Server 2008: SQLCLR
    • SQL Server 2008: Reporting Services
    • SQL Server 2008 R2: Introducing Application and Multi-Server Management with SQL Server 2008 R2 and Visual Studio 2010
    • SQL Server 2008 R2: Working with Data Tier Application Projects in Visual Studio 2010
    • SQL Server 2008 R2: Managing Change in Data Tier Application Projects with Visual Studio 2010 and SQL Server 2008 R2
    • SQL Server 2008 R2: Introducing SQL Server 2008 R2 StreamInsight
    • SQL Server 2008 R2: Querying Events in SQL Server 2008 R2 StreamInsight
    • SQL Server 2008 R2: Designing SQL Server 2008 R2 StreamInsight Event Models and Adapters
    • SQL Server 2008 R2: Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine
  • Demos (24)
    • SQL Server 2008: AdventureWorks Racing All-Up Demo
    • SQL Server 2008: Spatial Demo
    • SQL Server 2008: Spatial Types
    • SQL Server 2008: Introduction to Filestream
    • SQL Server 2008: SQL CLR Nullable Types
    • SQL Server 2008: Programming with Filestream
    • SQL Server 2008: Reporting Services Web Application Integration
    • SQL Server 2008: T-SQL Date and Time Support
    • SQL Server 2008: T-SQL Table-Valued Parameters
    • SQL Server 2008: T-SQL Row Constructors
    • SQL Server 2008: T-SQL Grouping Sets
    • SQL Server 2008: T-SQL Merge
    • SQL Server 2008 R2: Creating a Utility Control Point
    • SQL Server 2008 R2: Enrolling a Managed Instance
    • SQL Server 2008 R2: Creating Data-Tier Applications
    • SQL Server 2008 R2: Data-Tier Application Deployment
    • SQL Server 2008 R2: Managing Change in Data Tier Application Projects in Visual Studio 2010
    • SQL Server 2008 R2: Introducing SQL Server 2008 R2 StreamInsight
    • SQL Server 2008 R2: Querying Events in SQL Server 2008 R2 StreamInsight
    • SQL Server 2008 R2: Advanced SQL Server 2008 R2 StreamInsight Event Queries
    • SQL Server 2008 R2: Working with SQL Server 2008 R2 StreamInsight CTI Events and Advance Time Settings
    • SQL Server 2008 R2: Creating a SQL Server 2008 R2 StreamInsight Input Adpater
    • SQL Server 2008 R2: Choosing a SQL Server 2008 R2 StreamInsight Development Model
    • SQL Server 2008 R2: Using the SQL Server 2008 R2 StreamInsight Event Flow Debugger
  • Hands-on Labs (13)
    • SQL Server 2008: How to build your first Web Application with SQL Server and ASP.NET
    • SQL Server 2008: Using Spatial Data in TSQL
    • SQL Server 2008: Using Spatial Data in Managed Code
    • SQL Server 2008: Using SQL CLR in SQL Server 2008
    • SQL Server 2008 R2: Introduction to PowerPivot
    • SQL Server 2008 R2: Introduction to Reporting Services Improvements
    • SQL Server 2008 R2: Introduction to StreamInsight and Complex Event Processing
    • SQL Server 2008 R2: Introduction to Data-tier Applications
    • SQL Server 2008 R2: Creating and Deploying a Data-Tier Application
    • SQL Server 2008 R2: Managing Change in Data-Tier Application Projects in Visual Studio 2010
    • SQL Server 2008 R2: Querying Events in SQL Server 2008 R2 StreamInsight using LINQ
    • SQL Server 2008 R2: Working with the SQL Server 2008 R2 StreamInsight Samples
    • SQL Server 2008 R2: Working with the SQL Server 2008 R2 StreamInsight Event Flow Debugger
  • Videos (35)
    • SQL Server 2008 R2 Update for Developers Overview Part I - SQL Server 2008 Review
    • SQL Server 2008 R2 Update for Developers Overview Part II - Introducing SQL Server 2008 R2
    • Introducing SQL Server 2008 R2 StreamInsight
    • Demo: Real Time Analytics with SQL Server 2008 R2 StreamInsight
    • Introducing SQL Server 2008 R2 Application and Multi-Server Management
    • Introducing SQL Server 2008 R2 Reporting Services
    • Introduction To SQL Server 2008 R2 StreamInsight and Complex Event Processing
    • Introducing PowerPivot for Excel 2010 and SharePoint 2010
    • Presentation: Introducing Application and Multi-Server Management with SQL Server 2008 R2 and Visual Studio 2010
    • Demo: Creating a Utility Control Point
    • Demo: Enrolling a Managed Instance
    • Presentation: Working with Data Tier Application Projects in Visual Studio 2010
    • Demo: Creating Data-Tier Applications
    • Demo: Data-Tier Application Deployment
    • Presentation: Managing Change in Data Tier Application Projects with Visual Studio 2010 and SQL Server 2008 R2 (Part I)
    • Presentation: Managing Change in Data Tier Application Projects with Visual Studio 2010 and SQL Server 2008 R2 (Part II)
    • Demo: Managing Change in Data Tier Application Projects in Visual Studio 2010
    • Presentation: Introducing SQL Server 2008 R2 StreamInsight (Part I)
    • Presentation: Introducing SQL Server 2008 R2 StreamInsight (Part II)
    • Demo: Introducing SQL Server 2008 R2 StreamInsight
    • Presentation: Querying Events in SQL Server 2008 R2 StreamInsight (Part I)
    • Presentation: Querying Events in SQL Server 2008 R2 StreamInsight (Part II)
    • Demo: Querying SQL Server 2008 R2 StreamInsight Using LINQ
    • Presentation: Querying Events in SQL Server 2008 R2 StreamInsight (Part III)
    • Demo: Advanced SQL Server 2008 R2 StreamInsight Event Queries
    • Presentation: Designing SQL Server 2008 R2 StreamInsight Event Models and Adapters (Part I)
    • Presentation: Designing SQL Server 2008 R2 StreamInsight Event Models and Adapters (Part II)
    • Demo: Working with SQL Server 2008 R2 StreamInsight CTI Events and Advance Time Settings
    • Presentation: Designing SQL Server 2008 R2 StreamInsight Event Models and Adapters (Part III)
    • Demo: Creating a SQL Server 2008 R2 StreamInsight Input Adapter
    • Presentation: Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine (Part I)
    • Presentation: Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine (Part II)
    • Demo: Choosing a SQL Server 2008 R2 StreamInsight Development Model
    • Presentation: Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine (Part III)
    • Demo: Using the SQL Server 2008 R2 StreamInsight Event Flow Debugger

CLR User-Defined Function for Check Constraint

Sergio Govoni

Come possiamo scrivere l’espressione logica che verifica un vincolo di tipo CHECK ? Possiamo farlo con:

  • T-SQL
  • User-Defined Function
  • CLR User-Defined Function

Abbiamo apprezzato l’utilizzo del linguaggio CLR nel post SQLCLR instead of OLE Automation (sp_OA* method), ora vediamo come è possibile implementare e fare il deploy di una funzione CLR da utilizzare per verificare l’espressione logica di un vincolo CHECK, definito ad esempio su una colonna di tipo float.

Il linguaggio che utilizzeremo per implementare la nostra CLR User defined function sarà Microsoft Visual C#.

PASS Summit Unite 2009

Davide Mauri

L’annuale summit del PASS - Professional Association of SQL Server users, si terrà ancora una volta a Seattle. Il summit è la più importante conferenza su SQL Server a livello mondiale, alla quale partecipano solamente i migliori speaker, offrendo un’opportunità di formazione e di networking assolutamente unica.

Con 168 sessioni suddivise in 5 track - Database Administration, Database and Application Development, BI Platform Architecture, BI Information Delivery, and Professional Development - questa conferenza è indispensabile per tutti coloro che vogliono migliorare e rendere più efficiente il proprio lavoro con SQL Server e tutte le tecnologie ad esso legate, capire in che modo si evolverà il futuro con la release della versione R2, fare networking per espandere la proprio rete di conoscenze e - perchè no - passare una settimana di full-immersion in una città sempre bella come Seattle.

SQLCLR instead of OLE Automation (sp_OA* method)

Sergio Govoni

Riprendo il tema relativo all’aggiornamento dei dati esposti su una tabella pivot di un foglio di lavoro Microsoft Excel.

Abbiamo analizzato una possibile soluzione basata sull’utilizzo di OLE Automation (sp_OA*) con questo post Aggiornare una tabella pivot di Microsoft Excel. Vediamo ora com’è possibile raggiungere lo stesso risultato utilizzando però il linguaggio CLR.

Considerazioni sull’utilizzo del linguaggio CLR (common language runtime)

Talvolta chi sviluppa applicazioni database ha la necessità di estendere le funzionalità del linguaggio T-SQL per interagire meglio con il sistema operativo e con l’ambiente. Con le versioni di SQL Server che hanno preceduto SQL Server 2005 si poteva arricchire il T-SQL utilizzando le stored procedure estese e le classi di oggetti COM (Component Object Model). Era però necessario prestare molta attenzione nell’utilizzo delle stored procedure estese in quanto un malfunzionamento di queste ultime poteva compromettere l’engine di SQL Server con il rischio di arrestare il servizio principale (SQL Server service).

Pro SQL Server 2005 Database Design and Optimization

Davide Mauri
Titolo
Autore
Luis Davidson with Kevin Kline and Kurt Windisch
Editore
Apress
Livello
Intermediate-Advanced
ISBN
1-59059-529-7

Il libro di Luis Davidson è la naturale evoluzione della precedente versione scritta per SQL Server 2000. La prerogativa di questo libro – così come del precedente – è la focalizzazione non solo sull’uso di SQL Server come prodotto con tutte le sue feature e le sue peculiari caratteristiche, ma anche e soprattutto sulla parte architetturale dell’implementazione di un database, ossia la modellazione del database stesso.

SQLCLR Projects: come referenziare assembly esterne

Davide Mauri

Visual Studio 2005 mette a disposizione diversi template per la creazione di progetti SQLCLR. Creando un progetto ci accorgeremo ben presto che è impossibile utilizzare delle reference, salvo alcune predefinite dall’IDE.

Per ovviare a tale limitazione è necessario “sporcarsi le mani” all’interno dei file di progetto e seguire alcuni semplici passaggi.  La solution che ho creato e che potete scaricare qui è composta da due proget

  • MySQLCLRAssembly: il progetto SQLCLR al cui interno troviamo la funzione MyFunction
  • MyAssembly: la nostra assembly esterna o “di terze parti” che vogliamo usare nel progetto SQLCLR

Per prima cosa dobbiamo compilare il progetto MyAssembly , ottenendo nella cartella /bin/debug il file MyAssembly.dll