Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Wednesday, January 30, 2008

SQL Server 2005 Logon Triggers

Every time a user connects to the database a trigger is fired. In the logon trigger you simple insert a row into an auditing table. Yuo can read about SQL Server 2005 Logon Triggers here.

Tuesday, January 29, 2008

What's New (SQL Server 2008)

Here you can read about new or improved features of Microsoft SQL Server 2008.

MERGE Statement in MS SQL Server 2008

MS SQL Server 2008 introduces new MERGE statement. You can perform INSERT, UPDATE, and DELETE operations in a single statement using MERGE. The MERGE syntax allows you to join a data source with a target table or view, and then perform multiple actions based on the results of that join.
You can read about new MERGE statement at MSDN Site.
Here are examples of MERGE from MSDN:
MERGE Production.ProductInventory AS pi
USING (SELECT ProductID, SUM(OrderQty) FROM Sales.SalesOrderDetail sod
JOIN Sales.SalesOrderHeader soh
ON sod.SalesOrderID = soh.SalesOrderID
AND soh.OrderDate = GETDATE()
GROUP BY ProductID) AS src (ProductID, OrderQty)
ON (pi.ProductID = src.ProductID)
WHEN MATCHED AND pi.Quantity - src.OrderQty = 0
THEN DELETE
WHEN MATCHED
THEN UPDATE SET pi.Quantity = pi.Quantity - src.OrderQty;
MERGE Departments AS d
USING Departments_delta AS dd
ON (d.DeptID = dd.DeptID)
WHEN MATCHED AND d.Manager <> dd.Manager OR d.DeptName <> dd.DeptName
THEN UPDATE SET d.Manager = dd.Manager, d.DeptName = dd.DeptName
WHEN NOT MATCHED THEN
INSERT (DeptID, DeptName, Manager)
VALUES (dd.DeptID, dd.DeptName, dd.Manager)
WHEN SOURCE NOT MATCHED THEN
DELETE;

Thursday, January 24, 2008

Monday, January 21, 2008

Improving Performance with SQL Server 2005 Indexed Views

The document Improving Performance with SQL Server 2005 Indexed Views describes the improved indexed views capability of SQL Server 2005 Enterprise Edition. Indexed views are explained and specific scenarios in which they may provide performance improvements are discussed.

Implementing Row- and Cell-Level Security Using SQL Server 2005

The paper Implementing Row- and Cell-Level Security in Classified Databases Using SQL Server 2005 describes how SQL Server 2005 can be used to support row- and cell-level security (RLS/CLS). The examples provided in this white paper show how RLS and CLS can be used to meet classified database security requirements.

Tuesday, July 17, 2007

Literature

Here are links to some useful books.
I've chosen all these books as very helpful for developing Business Intelligence solutions on the MS BI Platform.

Data Warehousing and ETL
The Data Warehouse Toolkit: The Complete Guide to Dimensional Modeling, 2nd Edition by Ralph Kimball, Margy Ross
The Data Warehouse ETL Toolkit: Practical Techniques for Extracting, Cleaning, Conforming, and Delivering Data by Ralph Kimball, Joe Caserta
The Data Warehouse Lifecycle Toolkit: Tools and Techniques for Designing, Developing, and Deploying Data Warehouses by Ralph Kimball, Laura Reeves, Margy Ross and Warren Thornthwaite

Microsoft BI
The Microsoft Data Warehouse Toolkit: With SQL Server 2005 and the Microsoft Business Intelligence Toolset by Joy Mundy, Warren Thornthwaite, Ralph Kimball
Microsoft SQL Server 2005 Analysis Services (SQL Server Series) by Edward Melomed, Irina Gorbach, Alexander Berger, Py Bateman
Applied Microsoft Analysis Services 2005: And Microsoft Business Intelligence Platform by Teo Lachev
Microsoft SQL Server 2005 Integration Services (SQL Server Series) by Kirk Haselden
Fast Track to MDX by Mark Whitehorn, Robert Zare, Mosha Pasumansky
MDX Solutions: With Microsoft SQL Server Analysis Services 2005 and Hyperion Essbase by George Spofford, Sivakumar Harinath, Christopher Webb, Dylan Hai Huang, Francesco Civardi
Data Mining with SQL Server 2005 by ZhaoHui Tang, Jamie MacLennan

Microsoft SQL Server
Inside Microsoft SQL Server 2005: The Storage Engine by Kalen Delaney
Inside Microsoft SQL Server 2005: T-SQL Programming (Pro-Developer) by Itzik Ben-gan, Dejan Sarka, Roger Wolter
Inside Microsoft SQL Server 2005: T-SQL Querying (Solid Quality Learning) by Itzik Ben-Gan, Lubor Kollar, Dejan Sarka

.NET Framework and C#
CLR via C#, Second Edition (Pro Developer) by Jeffrey Richter