What is New in SQL Server 2008

Thursday, March 5, 2009

What is new ?

One of the first items noticed when reviewing Microsoft documentation on SQL Server 2008 is the new lingo classifying features and benefits into groups, or Key Areas. There are four Key Areas, Enterprise Data Platform, Dynamic Development, Beyond Relational Database, and Pervasive Insight. This article will follow these groupings in an effort to make cross referencing with Microsoft articles easier.

Enterprise Data Platform Available

The Enterprise Data Platform grouping, sometimes referred to as the Mission Critical Platform, contains the core SQL Server Engine features and benefits including Data Encryption methods, Resource Management, System Analysis, and Server Management Features.
Have your data Encryption in placeThere are several encryption options; the first is called Transparent Data Encryption. In SQL Server 2008, the entire database can be encrypted by the SQL Engine. This method encrypts all database data and log files for a database. By using this all-encompassing method, all Indexes and Tables are encrypted. Changes to programming applications are not required.The next encryption feature is Backup Encryption. SQL Server 2008 has a method of encrypting backups to prevent data disclosure or tampering. In addition, Restoring of backups can be limited to specific users.Lastly, there are new options for External Key Management. If you are involved with credit card processing or PCI (payment card industry) compliance, SQL 2008 will support Hardware Security Modules (HSM). Hardware Security Modules are third party hardware solutions used to store Keys in a location separate from the data they protect.

Yes Auditing is there

In addition to the standard auditing of logon / logoffs and permission changes, SQL Server 2008 allows for monitoring of data changes or access. Auditing is configured by TSQL statements as in this example: AUDIT UPDATE(Salary) ON Employee TO MyAuditFolder WHERE Salary>200000

Waiting for Data Compression, Here it is

Usually, data compression is associated with general hard disk savings, and with smaller physical files, backup times are reduced. While this holds true for SQL Server Data Compression, the main goal is Fact Table size reduction. The stated advantages for Data Compression include the following:Improves query performance by reducing I/O and increasing buffer-hit rates Provides compression ratios of 2X to 7X for real DW fact data Is orthogonal to other features Is available for both data and indexes According to Microsoft, while using compression will slightly increase CPU usage, overall system performance will be improved because of less IO.
Its new Resource GovernorNew in SQL Server 2008 is the Resource Governor. The Governor is used to restrict users or groups of users from consuming high levels of resources. Items that can be monitored include CPU bandwidth, timeout waits, execution times, blocking times, and idle times. If a Resource Governor threshold level is reached, the system can trigger an event or stop the process. There are a series of steps involved in utilizing the Resource Governor that will be reviewed in an upcoming article.

More Performance Data

The amount of Performance Counters in SQL Server 2008 has been expanded compared to earlier versions. IO and memory usage counters are just a couple of the items that can be collected to monitor performance. The data collected by the counters is stored in a centralized data warehouse. Microsoft states that running the default set of performance related monitors will consume less than 5% of CPU and memory resources.There is also now a Performance Dashboard tool that can read saved performance data. In addition, historical and baseline comparisons can be made and used to create action triggers. For example, if memory use exceeds a threshold for more than five minutes, a more detailed data collection can be automatically triggered.New in SQL Server 2008 is the Performance Studio. The Studio is a collection of performance tools. Together they can be used for monitoring, troubleshooting, tuning and reporting. The Data Collector component of the studio is configurable and low overhead. It supports several collecting methods including TSQL queries, SQL Trace, and Perfmon Counters. Data can also be collected programmatically. Once data is collected, there are drill-down and aggregate reporting options. Microsoft lists these six client side features of the Performance Studio:SQL Server dashboard Performance monitoring Current and historical data analysis Suggestions for potential performance tuning Data collection sets-based reports MDW-based reports

We will see more in Part - 2

Read more...

What is Generics in .NET Part - 1

Sunday, February 22, 2009

What is Generics ?

The name gives you little bit of idea that why it must be so lets start upon what are advantages of using generics while coding in .Net technology.
When we look at the term "generic", unrelated to the programming world, it simply means something that is not tied to any sort of brand name. For example, if we purchase some generic dish soap, soap that has no brand name on it, we know that we are buying dish soap and expect it to help us clean our dishes, but we really don't know what exact brand (if any) will be inside the bottle itself. We can treat it as dish soap even though we don't really have any idea of its exact contents.

Generics is to facilitate code reuse, especially the reuse of algorithms, C# includes a feature called generics. Just as methods are powerful because they can take parameters, classes that take type parameters have significantly more functionality as well, and this is what generics enable. Like their predecessor, templates, generics enable the definition of algorithms and pattern implementations once, rather than separately for each type. However, C# implements a type-safe version of templates that differs slightly in syntax and greatly in implementation from its predecessors in C++ and Java. Note that generics were added to the runtime and C# with version 2.0.

Think of Generics in this manner. We can refer to a class, where we don't force it to be related to any specific Type, but we can still perform work with it in a Type-Safe manner. A perfect example of where we would need Generics is in dealing with collections of items (integers, strings, Orders etc.). We can create a generic collection than can handle any Type in a generic and Type-Safe manner. For example, we can have a single array class that we can use to store a list of Users or even a list of Products, and when we actually use it, we will be able to access the items in the collection directly as a list of Users or Products, and not as objects (with boxing/unboxing, casting).

What is Generic type

Lets create a very simple generic class and demonstrate how it can be used as a container for a variety of other Types. Below is a simple example of what a generic class could look like:

public class Col
{
T t;
public T Val { get { return t; } set { t = value; } }
}


The class name "Col" is our first indication that this Type is generic, specifically the brackets containing the Type placeholder. This Type placeholder "T" is used to show that if we need to refer to the actual Type that is going to be used when we write this class, we will represent it as "T". Notice on the next line the variable declaration "T t;" creates a member variable with the type of T, or the generic Type which we will specify later during construction of the class (it will actually get inserted by the Common Language Runtime (CLR) automatically for us). The final item in the class is the public property. Again, notice that we are using the Type placeholder "T" to represent that generic type for the type of that property. Also notice that we can freely use the private variable "t" within the class.

What is Generic Collections

The .NET team has provided us with a number of generic collections to work with in the the latest version of the .NET Framework. List, Stack, and Queue are all going to be implemented for us. Let's see an example on how to use the provided Generic List class.
public class User
{
protected string name;
protected int age;
public string Name { get { return name; } set { name = value; } }
public int Age { get { return age; } set { age = value; } }
}
Above Class can be use as

public class UserData
{
public static void Main(string[] args)
{
System.Collections.Generic.List users = new System.Collections.Generic.List();
for (int x = 0; x < user =" new" name = "Rob" age =" x;" x =" 0;">

Which will give Output as
Rob0:0
Rob1:1
Rob2:2
Rob3:3
Rob4:4
press enter
Rob0:0
Rob1:1
Rob2:2
Rob3:3
Rob4:4

This is just basic of Generics we will discuss more about it in our upcoming articles


Read more...

Back to TOP