sp_24hoursofpass

August 6th, 2009 | Uncategorized | No Comments »

BEGIN TRAN

This is an invitation to subscrive to the 24 Hour Pass event.

Please register,

Its really seems a very good oportunity to learn about the SQL potential in the market.

http://24hours.sqlpass.org/

The sessions will be:

  • Session 01 (Dev) – Start time: 00:00 GMT

    10 Big Ideas in Database Design

    Presenters: Louis Davidson and Paul Nielsen

  • Session 02 (DBA) - Start time: 01:00 GMT

    Using PowerShell to Get the Most Out of SQL Server

    Presenter: Allen White

  • Session 03 (PD) - Start time: 02:00 GMT

    Team Management Fundamentals

    Presenter: Kevin Kline

  • Session 04 (BI) – Start time 03:00 GMT

    Delivering Good Performance Consistently with SSIS

    Presenter: John Welch

  • Session 05 (DBA) – Start time 04:00 GMT

    Using SQLdiag to Troubleshoot SQL Server Problems

    Presenter: Brad McGehee

  • Session 06 (DBA) - Start time 05:00 GMT

    The SQL Server 2008 Vanishing Act

    Presenter: Peter Ward

  • Session 07 (BI) – Start time 06:00 GMT

    Text Mining

    Presenter: Dejan Sarka

  • Session 08 (Dev) – Start time 07:00 GMT

    Tips and Tricks for Writing SET Based Queries

    Presenter: Jacob Sebastian

  • Session 09 (DBA) – Start time 08:00 GMT

    Mirrored Databases

    Presenter: Thomas Grohser

  • Session 10 (Dev) – Start time 09:00 GMT

    Working with Spatial Data in SQL Server 2008

    Presenter: Greg Low

  • Session 11 (DBA) – Start time 10:00 GMT

    Effective Indexing

    Presenter: Gail Shaw

  • Session 12 (BI) – Start time 11:00 GMT

    Reporting Services Inside Out: The Things You Should Know

    Presenter: Simon Sabin

  • Session 13 (DBA) – Start time 12:00 GMT

    Query Performance Tuning 101

    Presenter: Grant Fritchey

  • Session 14 (BI) – Start time 13:00 GMT

    Reporting from Analysis Services Cubes Using Excel 2007

    Presenter: Peter Myers

  • Session 15 (BI) – Start time 14:00 GMT

    Data Warehousing: Laying the Foundation to Success

    Presenter: Erik Veerman

  • Session 16 (DBA) – Start time 15:00 GMT

    Database Compatibility Settings: What They Really Do… and Don’t Do

    Presenter: Don Vilen

  • Session 17 (PD) – Start time 16:00 GMT

    Building a Better Blog

    Presenter: Steve Jones

  • Session 18 (Dev) – Start time 17:00 GMT

    Building Flexible Data Services for the Web Using the ADO .NET Data Services Framework

    Presenter: Artemakis Artemiou

  • Session 19 (Dev) – Start time 18:00 GMT

    SQLCLR or T-SQL? A Brief Survey of Performance Options

    Presenter: Adam Machanic

  • Session 20 (BI) – Start time 19:00 GMT

    Loading a Data Warehouse in SSIS

    Presenter: Brian Knight

  • Session 21 (DBA) – Start time 20:00 GMT

    What’s Simple about Simple Recovery Model

    Presenter: Kalen Delaney

  • Session 22 (Dev) – Start time 21:00 GMT

    What’s New, Harder, and Easier in SQL Server 2008 Security

    Presenter: Don Kiely

  • Session 23 (DBA) – Start time 22:00 GMT

    Analyzing File and Wait Statistics

    Presenter: Andrew Kelly

  • Session 24 (BI): Start time 23:00 GMT

    Embed Reporting Services into Your Applications

    Presenter: Jessica Moss

2009pass_signature02

COMMIT TRAN

sp_scriptallprimarykeys

July 23rd, 2009 | Uncategorized | No Comments »

I was reading recently Pinal Dave blog asking about a script so we can create all the primary keys in a data base.

Here is my answer

Version:0.9 StartHTML:-1 EndHTML:-1 StartFragment:0000000111 EndFragment:0000010215

DECLARE @NewLinechar CHAR(2)

SET @NewLinechar =   CHAR(13) + CHAR(10) – This one came from one of your articles

SELECT ‘ALTER TABLE [' + s.name + '].[' + t.name + '] ADD CONSTRAINT [' + c.name + ']‘ + @NewLinechar + ‘PRIMARY KEY ’ + i.type_desc collate SQL_Latin1_General_CP1_CI_AS + @NewLinechar + ‘([' + col.name +'] ASC’ + @NewLinechar + ‘) on [' + ds.name + ']‘ + @NewLinechar + ‘GO’

FROM sys.key_constraints c

JOIN sys.tables t

ON c.parent_object_id = t.object_Id

JOIN sys.schemas s

ON t.schema_id = s.schema_id

JOIN sys.indexes i

ON c.unique_index_id = i.index_id

JOIN sys.index_columns ic

ON i.object_id = ic.object_id

AND i.index_id  = ic.index_id

JOIN sys.columns col

ON t.object_id  = col.object_id

AND ic.column_id = col.column_id

JOIN sys.data_spaces ds

ON i.data_space_id = ds.data_space_id

WHERE c.type = ‘PK’


sp_UsingTheResourceGovernor

July 20th, 2009 | Uncategorized | No Comments »

Hi there,

I was supposed to start writing about different stuff about SQL and databases (and believe me, I’ll) but first. Take a good look to the Whitepaper by Aaron Bertrand and Boris Baryshnikov about using the new Resource Governor, Very interesting actually.

Here is the link

sp_start

July 16th, 2009 | Uncategorized | No Comments »

Hello,

This is my first post as a blogger and I decided to make a small contribution to all the ones who wants to start using, allready use o are tired of using SQL server and database management.

Please stay tune for more.