"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

July 18, 2011

BI Learning - Part I

Yea, As we learnt Selenium we will now look at learning BI. I found SQLBI Methodology a good place to get started on this topic. I'm going to start by downloading required adventureworks DB. We will look at SQL Server 2008 as Database for our exercise

Download below two databases
  • Adventure Works DW - Link
  • Adventure Works DB
Below listed are 4 part series details

1. SSIS - ETL Jobs
2. Populating DW Tables
3. Cubes - SSAS Development
4. Best Practices for BI Development

Let's get started

1. Enable FileStream by following steps in link. This is required before installing AdventureWorks OLTP database

2. Installed Adventureworks and Adevntureworks DW Database



3. Next Example is Adding the SSAS and SSIS Packages

4. SQL Server 2008 All Product samples without DB cab be downloaded from link
With this we are ready with OLTP, DW, SSIS, SSAS Adventureworks samples :)

5. Opened AWDataWarehouseRefresh SSIS Solution.


Next Step is Analysing this SSIS solution.
More Reads
SQL Server Integration Services Samples
SQL Server 2008 – How To Build and Deploy AdventureWorks OLAP Cubes
SSAS Tutorial: SQL Server 2008 Analysis Services Tutorial

Happy Learning!!!

Moving On

Finally I decided to move on exploring opportunities outside Amazon.

My Learning's @ Amazon
  • Gave me good exposure on Web Testing
  • Got an opportunity to code in Java, Update Couple of Test Cases in Automation Suite
  • Exposure to Non-Microsoft World (Linux, JIRA Bug Tracking)
My Learning's outside my Work
  • Developing Test Automation Framework based on Selenium. You can find posts tagged Selenium Automation Series
  • Explored Selenium1, Selenium2 (Web Driver)
  • Learnt TestNG framework. You can find posts tagged TestNG
  • Blogged couple of SQL Related posts
  • .NET 2.0 Web Services Automation
What I missed in Last 1 Year
  • Couldn't get an opportunity to work in SQL / .NET
  • I planned to conduct few sessions for sqlcommunity.com in bangalore. This was missed. Hoping to do this in next few months
 Road Ahead
  • Need a break right now :)
  • Lot of health related issues last one year. Time for some rest
Next Reading List
  • Learn Jmeter
  • Learn Ruby / Python
  • Explore other tools Watir, Sahi, cucumber
Happy Reading!! 

Technical Learning - Windows Debugging - Refresher Posts

Basics Refreshers
Active Directory Related Articles


Happy Reading!!

July 13, 2011

Adding KPI in SSRS Reports

After a long break back to SQL :). This post is about learning on adding KPI in SSRS report. This is extension of our first SSRS report. I learnt adding KPI from post.

Lets get started

Step 1 - Downloaded Red, Yellow, Green Images. Under Report Data->New->Images. Add the images.



Step 2 - Add a new column KPI at the end of the table


Step 3 - Under Toolbox -> Drag and drop Image option under KPI. Click on Image Properties



Step 4 - For Image Enter below expression

= SWITCH
(
 Fields!SaleValue.Value > 10000, "green",
 Fields!SaleValue.Value >= 2000 AND Fields!SaleValue.Value <= 10000, "yellow",
 Fields!SaleValue.Value < 1000, "Red"
)

Step 5 - For Tool Tip enter below expression

= SWITCH
(
 Fields!SaleValue.Value > 10000, "Green -> 10K",
 Fields!SaleValue.Value >= 2000 AND Fields!SaleValue.Value < 10000, "yellow 2K-10K",
 Fields!SaleValue.Value < 1000, "Red - < 10K"
)

Step 5 - Below is report with KPI listed


I'm extending this report to add Chart in the Same Report. Getting started with steps for the same

Step 1 - From Tool box Select Chart Option


Step 2 - Select the type of chart you want to display in report


Step 3 - Drag and Drop Fields from DataSet


Step 4 - Below is the sample display of report


Step 5 - Below is output of report. Changed the background to gray for better UI.


Step 6 - Followed tips provided in post to give this chart professional look. Below is the new chart layout


To add interactive reporting please follow steps in post

Please follow steps provided in post for configuring reporting services in sql server 2008. After Reporting services is setup. Steps provided below for deploying them. Configure the properties Report Server URL and Deploy using below snapshot.


After this step provide Report Server URL


After Deploying Open the browser in admin mode and access the report URL



More Reads

Let’s Get Visual: The Art of Report Design
SQL Server Reporting Services Conditional Formatting
Dashboard Design Best Practices (repeating on 6/9 at 11:45am)

Happy Learning!!!

July 02, 2011

SQL Tip of the Day

SQL Learning for the Weekend. Today's tip is learning from article Ten Common Database Design Mistakes

Taking Lessons and advice from the article, What are my checklist while designing a Database Table

1. Normalized Table - For OLTP System verify Table design is Normalized - Related Post -
Database Development Model

2. Naming Conventions - Naming tables in a way that is easy to understand from customer perspective - Related Post - Database Object Naming Rules

3. Ensuring Data Integrity aspects (Check Constraints, NOT NULL Values, Default Values, Primary Key, Foreign Key)

4. Selecting Proper Datatypes, Allocating Space for the data - Related Post - TSQL Tip of the Day

5. Indexes on the Tables based on queries run against the table

6. Archiving Details / Table Partitioning for the table. Related Post - Table partitioning basics

Templates for database objects creation is available in book Pro SQL Server 2005 Database Design and Optimization.

Happy Learning!!!

June 29, 2011

SQL Everywhere - SQL Server IDE - Nice Free IDE

SQL Everywhere is the Tool we will be learning in this post. This is Free IDE for SQL Server Development. Impressive list of Free SQL Tools from Atlantis Interactive. We have explored Schema Surf and Data Surf in earlier posts.

Below are list of features I am impressed based on my first look using SQL Everywhere
  • Suggestions intelli-sense support
  • Run queries in Test Mode, Automatic Rollback of Updates / Changes made
  • Code Formatting
  • Good Execution Plan Details to get started
Let's get started with the Tool
Step 1. Download tool from link
Step 2. Features snapshots are provided in link
Step 3. After Installing the Tool, Connect to DB. Select Server and DB details.
Step 4. After Connecting, You can view in Databases / Objects Tab
Step 5. After selecting browse options you would see below new window. When you hover over particular table you would see Tool Tip - Schema Details, Create Table statement, Index Details



Step 6. Another alternate option is selecting Object Browser

Step 7. Moving to Query Execution, Query Results, Execution plan details are returned when you provide query details. IDE provides intellisense support to select Table Name, Column Details etc. Execution Plan also provides cost details of operators involved in query



Step 8. Operators also provides details on Estimated cost as a Tool Tip when you hover over the query plan


Step 9. One feature I observed different from SSMS is, Query execution reports execution time plus network time as well. This looks cool



Step 10. Next Option we would check is Generate Insert Statements. Right click on object browser to select the option for Generate Inserts



Step 11. Generate Inserts has option to include / exclude Identity column values


Step 12. Next is Test Mode feature. All updates / Data / Schema changes would be rolled back automatically when you exit Test Mode. Nice feature. This relieves us from the burden to rollback changes made.



Step 13. Code Formatting, I have posted my code before and after formatting. Looks good with after formatting :)


Step 14. After Code Formatting, Modified Proc



I'm impressed with SQL Everywhere. I'm going to use this tool. I would be updating this post in coming weeks.

Happy Learning !!!

June 26, 2011

SQL Search 1.0

Next free tool we are going to learn today is SQL Search 1.0. This is pretty good to search for objects within database.
Lets get started with the tool.

Step 1. Download from link

Step 2. After Installation in SSMS you would see this as listed below



Step 3. Good Snapshots of usage provided in link

Step 4. Search Preference is impressive.
  • Table Name
  • Functions
  • Procedures
We are using AdventureWorks Database. This database can be dowloaded from link.




Search Feature is also present in SSMS tool addin. We checked it in earlier post.

Advantage is here, You need not right click and search. As you type you will see results listed
CONS - This does not search for data in tables. SSMS tools does provide data search



Search within Stored Procedures also lists the stored procedure content in preview tab



Search within database objects is very good with this tool.


Great Tool. Both SSMS Tools and SQL Search Complement each other.

Happy Reading!!

Feedback for my Blog

I dropped a note to Brent Ozar to thank his post on SQL Server Free Tools and useful SQL Articles in his blog. His post on free tools is my motivation for exploring free tools. I have also referenced his article in one of my post.

Below is Brent's reply for my mail.

Glad I could help!  Your step-by-step walkthroughs are great.

Have a good weekend!
Brent
---
Brent Ozar - Founder, Brent Ozar PLF, LLC
Microsoft Certified Master, MVP
http://www.BrentOzar.com

I'm happy to hear his feedback on blog post presentation (step-by-step). This appreciation is a great motivation for me to learn more. Happy to hear positive feedback from Brent Ozar, SQL Server Expert and Expert blogger.


Happy Learning!!!

June 25, 2011

SQL Reverse Engineer - Learn the Database System from Database Tables and Data

Today we will look at two powerful free tools which would help to understand the database based on data and schema. Data Surf and SQL dependency & live entity ER diagram tool are very interesting and impressive tools.

First tool for Discussion is Data Surf. Analyze the table based on Data.  This helps to understand data flow, relationships between tables.

Let's get started
Step 1. For this example lets download adventureworks database. Download adventureworks from link

Step 2. Download the tool from link

Step 3. Install AdventureWorks database. After installation you would see the new databases as in below snapshot


Step 4. Double click on Atlantis Data Surf link placed in desktop

Step 5. Select the Server and Database name to get started



Step 6. Select the Table in next step


Step 7. Select the rows from the table to view relationships / dependencies


Step 8. Based on the select row, You can view parent and child records. In SSMS, You would check with schema, foreign key dependencies. This is a very cool way to view relationships, foreign keys, visualize data flow



Great Tool. Nice Approach to understand Database Tables. Thanks to the creator of this tool for providing this as Free tool.


Next tool is SQL dependency & live entity ER diagram tool

You are going to work on larger database system. You need to understand tables and relationships. You would like to learn it interactively. Analyzing based on schema, viewing multiple levels of dependencies is possible with this tool. Both the tools help us visualize the entities in database.

Step 1. Download and Install the tool from link. We will reuse AdventureWorks Database for this example

Step 2. After Installing the tool, Provide Database and Server Details to get started




Step 3. Select the table to view schema details and dependencies. I like the Grid View Layout Approach



Step 4. To view two level relationships you can select the option as highlighted below.



I'm Impressed with this two tools. They would be of great help for learning any backend system.


Happy Learning and Reading!!

June 24, 2011

SQLCop - Auditing Database for Best Practices

Last few posts we looked into SQL Server Free tools. In this post we will look at SQLCop. Auditing your database for SQL Server Best practices. Pretty simple to use and powerful tool, Let's get started.

Step 1. Download SQLCop from link

Step 2. Install the tool

Step 3. Provide database name, server name to connect. Snapshot provided below


Step 4. You would see results displayed. Red is violation of best practice, Also suggested solution for the same is displayed.




Step 5. Range of issue that is detected / analyzed by the tool are provided in link. Detected Issues

Step 6. I have not checked on SQL Best Practices Analyzer. I need to give it a try to compare both the tools.


Awesome tool, easy installation and very useful results along with suggestions for fixing identified issues.


More Reads - Custom SQL Stored Procedure Best Practices Analyzer - SQL Cop, Maybe?
Visual Studio Database Edition 2010 – Static Code Analysis Review (Part 1)
Visual Studio Database Edition 2010 – Static Code Analysis Review (Part 2)


Happy Reading!!!