Bidding farewell to year 2011

We have come to an end to the year 2011 and I think you all had a fantastic and satisfactory year in 2011. I wanted to look back and see what the year 2011 was to me both personally and professionally in SQL Server.

In terms of SQL Server, I attended PASS Summit for the first time, which has been my 3 years wish. I started using SQL Server 2012 since CTP 3 ( was called Denali). I had a fabulous year in 2011 especially in the last quarter of 2011 was much involved in writing blogs @ LearnSQLWithBru.com. Overall I wrote 58 blogs in 2011 (excluding this bog) out of which 52 were in the last 3 months, that shows how busy was it.

Apart from just blogs, I added a section called Learn SQL Server which focuses on helping beginners to get some  hands on the SQL Server subject area. I also made few changes to the look and feel of the blog, added a header to the blog and got rid of SQL Server forums. It was a bit pain to loose that content, but it was also relieving to get rid of those spam user registrations (there were 40,000 pending user registrations that I had to approve). For commenting on the blogs, I deployed DISQUS, which helps me saving a lot from spam comments that I had in the past. Getting rid of those few things actually helped me spend more time productively on writing content for the site and I really enjoy it…

Personally I was happy to achieve one of my long term passion, “Become a better Tennis Player” and I think I definitely achieved this by playing way better than how I played in 2010 (which was my first year of playing Tennis). I also joined USTA and played one  tournament in NTRP 3.5 level and currently playing a winter mixed doubles league at a local club. I wish to continue improve my Tennis game and be a better player in 2012.

I am going to write a list of my goals for the year 2012 tomorrow (Jan 1st 2012), so lets see what are those goals and how I will fare against those at the end of year 2012.

— Bru Medishetty

Finding Databases which had Transaction Log Growth

Ever wanted to know the list of databases where Transaction Log file grew? The following T-SQL script will give the list of the databases and how many times the log file grew by using the auto-grow value. This information is available since the last restart of the SQL Instance and will be reset again when the Instance is restarted.

SELECT INSTANCE_NAME,cntr_value FROM MASTER.dbo.sysperfinfo
WHERE COUNTER_NAME = 'Log Growths'
AND INSTANCE_NAME NOT IN ('_Total','mssqlsystemresource')
AND CNTR_VALUE <> 0

Note: This list will not count if you grow the log file manually.

Do you like this site? Like our FB page @ Facebook.com\LearnSQLWithBru so that, you know when there is a new blog post.

— Bru Medishetty

How to Install Sample Databases in SQL Server 2008 R2

In this blog, we shall learn “How to install sample databases in SQL Server 2008 R2”. Sample databases are really helpful,  when you want to practice what you have learnt in SQL Server be it from a text book or an online article, blog etc sample databases are readily available to test. Knowing that it is easy to start from scratch on these sample databases makes you play with and even try some things that you would not want to do on other databases. Database and Log file shrinking (which is not suggested on user databases) but in order to learn such topics, your best choice is a sample database. With that lets focus on our goal (Installing the sample databases, if you have already forgotten…)

The first step is downloading the sample database. Visit the Microsoft Database Product Samples website and choose the sample database for the version that you want. Since we are dealing with SQL Server 2008 R2 he is the link. Once you have downloaded the file (approx 80 MB). Go to the location where the downloaded file is residing. Right click on the file AdventureWorks2008R2_SR1.exe (if you have not renamed it) and select Open; you can also double click on the file.

The exe file starts extracting to a temporary location on your local drive and once the extraction is done, the SQL Server 2008R2 SR1 Database Installer is displayed. The below screen is the first screen in which you have to accept to the license terms. Choose the check box and click Next.

In the next screen, it will displays on which database Instance the Sample databases will be added. If you have multiple instances on the machine, you can choose the Instance name from the drop down list.

Note that for some databases there are warning (yellow triangle with exclamation) icon being displayed, those databases cannot be installed through this installed but they can be added manually using Business Intelligence Developer Studio. You can click more information to find details on how to perform that task.

By default all sample databases that can be added, will be selected, you can un-check those databases that you would not want to install. Once you are done, click Install

The installation of sample databases progress is displayed, you can click Show Details button to view the detailed information in text format..

Once the installation is done, the progress bar indicates that installation is complete.. Click Finish to close the Installer.

Do you like this site? Like our FB page @ Facebook.com\LearnSQLWithBru so that, you know when there is a new blog post.

— Bru Medishetty