Monday, January 30, 2012

Getting started with MongoDB

MongoDB is a famous representative of NoSQL databases. It is a document-oriented database, which means that data will be stored in documents. In this article it will see how to set up MongoDB for Windows and how you can get started with it.

This has C# and VB.net samples to create databases, create and access collection etc.

Friday, January 27, 2012

Concurrent Administration Tasks?

Can you run a full database backup and a file shrink at the same time?

Can you run a full database backup and a filegroup backup at the same time?

Answer to both of the questions are NO.

Can you run run full back and log backup at the same time?

Answer is Yes Smile with tongue out

How to you know these? What can be done with what? Here is the chart which tells you about it?

This image will tell you the story.

clip_image001

Source: MSDN

Not all administrative tasks are allowed to run concurrently. In the table above, a black circle indicates two operations that cannot run in a database at the same time.

Tuesday, January 24, 2012

Monday, January 23, 2012

Why not to use NOT IN?

NOT IN is handy syntax use. However, is it a syntax you can always use? Just see the following examples.

Let use say we have two tables named First and Second and data contains as follows.

image

Let’s say you execute following statement.

image

What do you think about about. You might think that you should get 2 – Oracle as the result. If so, you are WRONG!!!

Above query will result NOTHING!!! Yes nothing.

Let us try to replace NOT IN with NOT EXISTS and compare the results.

image

Well, NOT EXISTS returned the desired results.

Let us interchange the tables.

image

Again NOT IN not giving us the correct results. Point to note here is, NULL values not working very well with NOT IN. So make sure you are not dealing with NULL values when using NOT IN.

Sunday, January 22, 2012

New SSIS Functions in Denali

Four New functions are included in Denali for SSIS.

Function Example Output
LEFT LEFT(“Denali,3) Den
TOKEN TOKEN(“SQL Server 2012”,” “ ,2) Server
TOKENCOUNT TOKENCOUNT(“SQL Server 2012”,” “ ) 3

REPLACENULL

REPLACENULL(NULL,2)

2

Tuesday, January 17, 2012

[SS SLUG] January 2012 Meetup

Announcing the January 2012 meet-up of the SQL Server Sri Lanka User Group (SS SLUG).


Session #1

Using Resource Governor to Manage workload and resources by Dinesh Asanka (MVP)

Resource Governor is a new technology in SQL Server 2008 that enables you to manage SQL Server workload and resources by specifying limits on resource consumption by incoming requests. Join this session to see how you can take advantage of this cool piece of technology.

Dinesh blogs at: http://dbfriend.blogspot.com/

Session #2

Eliminating roundtrips: MERGE and the TABLE data type by Dinesh Priyankara (MVP)

Is your client application still making multiple calls to SQL Server for updating a single dataset? If so, each time the client application makes a call, it affects the network layer unnecessarily. In this session we will see how we can minimize this, passing the dataset with a single call and updating the table with a single statement.

Dinesh blogs at: http://dinesql.blogspot.com/

Where:

Microsoft Sri Lanka
11th Floor
DHPL Building
No. 42
Nawam Mawatha
Colombo 2
SRI LANKA

When:

January 18th (WEDNESDAY), 2012
6:00 PM Onwards

Who:

Everyone are welcome. Entrance: FREE

Map:

CLICK HERE FOR MAP

More Information:

SS SLUG Home Page

Monday, January 16, 2012

Finding Running SQL Server Agent Jobs

Monitoring SQL Server agent jobs is a critical task for DBAs. There are several ways of achieving this. Read this FAQ to find them.

Sunday, January 15, 2012

Favorites in SSIS

 

In SSIS sometimes it will be difficult to select correct task since there are lots of tasks. In SQL Server 2012 a.k.a. Denali there is a favorites so that it is easy to pick frequently used tasks.

 

Control Flow

image

Data Flow

image

You can move the task to favorites by right clicking the task and automatically most used task will be moved.

image

Friday, January 13, 2012

SQL 2012 Wallpapers

@SQLSserver account posted 4 new wallpapers for SQL Server 2012

1024x768

http://twitpic.com/7d7y08/full

1280x800

http://twitpic.com/7d7x8d/full

1400x900

http://twitpic.com/7d7wiy/full


1680x1024

http://twitpic.com/7d7vwh/full

Ideal for the background of your presentation VMs,

Monday, January 9, 2012

How to Differentiate System and User Databases In SQL Server?

 

This question is frequently asked in many forums and the most popular answer is to use the DB_ID() function which is not exactly correct. This FAQ shows how you can do that perfectly.