Archive

Archive for the ‘Community’ Category

My Notes from the first UG meet of SQLBangalore

November 25th, 2012 4 comments

Yesterday I had the opportunity to attend Bangalore’s first SQL UG Meet.  It was amazing, lots of learning, and I had the opportunity to meet our favorite leads and see some of the people I have never heard about.  Lynn Langit and Raj Chauduri are those I see for the first time. Raj is an amazing SQL expert, his talks were fully on the practical side of the technology. You can find the full agenda of the event in my earlier post here.

Two rock starts of the Bangalore IT community took their debut as speaker.  Both of them did a great job. Finally there were cool snaps taken by event photographer Sandip (just kidding) and all of them is posted in Group Page.

 

Below are my notes from the sessions:

1) Short Circuit in SQL Server

SELECT * WHERE 1 / 0 = 1 AND 1 = 2    => No Error

SELECT * WHERE 1 / 0 = 1 OR 1 = 2       => Throws error

What I understood is  in such queries for an AND to be True, both condition should be true, SQL evaluates one condition and if its false, it doesn’t go to evaluate second, so there will be no error and no output as the query returns no match. when 1=2 is false, it does not have to check 1/0 = 0.

Same time when you use OR, or the query to be true one of the condition needs to be true, so for that SQL has to evaluate both, and while doing that in above example it reaches division by zero here. when 1=2 is false, it still need to check 1/0=0 because of OR.

What I am not yet clear is how can is say in the above Queries 1=2 is evaluated first, is there any precedence pattern for such queries.

2) DISTINCT is not a function when used in a SELECT Statement. (DISTINCT is used to get unique rows.)
3) New Functions in SQL Server 2012

EOMONTH() – this function returns the last day of the month, and can also be used to get last day of any given month, it accepts a second parameter, by which you can move months ahead or backwards.

For Example:

EOMONTH(GETDATE()) – End of this month

EOMONTH(GETDATE(),1) – End of Next Month

EOMONTH(GETDATE(),-1) – End of Last Month

4) When to use GETDATE()

When system generates the Date and its stored in the system, use GETDATE(). And to avoid time zone issues, always use GETUTCDATE() which will avoid time zone issues.

5) JOIN

I am a pure SQL User in most of my interactions with SQL, and I use SQL queries to retrieve data from tables for reporting or to make decisions. JOIN was something I wanted to learn as I knew it’s the way to collect related data from multiple tables. In Raj Chauduri’s session I have learned a major part of my Basics about JOINS.

To make a note to myself:

SELECT * FROM [Events] JOIN [Speakers] ON [Events].[SpeakerId] = [Speakers].[Id]

Note:- Best practice – Never use * in any SELECT statements.

What does a JOIN do in SQL, it first creates a Cartesian Product  of tables. What does it mean is each row from the second table is combined with each row of first table and with all fields. Then the Join Predicate is applied, meaning – from the combined table only rows matching the JOIN Condition is retrieved.

 There are three types of JOINS in SQL:  INNER, OUTER, and FULL

6) There are objects which are not migrated when you migrate a Database from one SQL Instance to Another:
  1. Logins
  2. Jobs
  3. Linked Servers
  4. CLR
  5. DB Mail
  6. Etc..

Contained databases in SQL Server 2012 comes as rescue for this, once this feature is enabled these configuration and metadata settings are included within the database.

Logins leaving behind when migrating a database was one problem I did see at job with SQL Server 2005, now I know what is the solution at least with SQL Server 2012.

7) ConlumStore Index makes you increase the speed of query without reducing the weight of the query.

 

I have posted in SQLBangalore to get answer to what I forgot, the products of the code names Ex-Velocity and Hackathone  – I will update here once I get an answer. Before I publish this post itself, I got the response:

Link Reference

 

A question asked by Vinod in his T-SQL Session:

Can you create a view when there is no table?

I guess yes, we can. As I understand a View is just like a definition or query, so you can create it when there is no table, but while retrieving the data from the View the Table should be existing.

I will update this once I get the correct answer.

The event was full of SQL and not to mention Pinal’s session was as usual full of laughter, but all those were well related to the subject he started from the 46th slide.

 

Below are a part of my collection of tweets from #SQLBangUG:

 

We will have such great meetings in future as well.

Happy Weekend!

 

Categories: Community Tags:

NOSQL UG Meet – SQLBangalore UG Meet on 24 Nov 2012

November 20th, 2012 2 comments

 

Do not get confused! it was intentional that i said NOSQL but i know not even abcd of NoSQL. What i really meant is its Not Only SQL (NoSQL) at least for me.  As i am not a SQL Admin or Dev, but i use it during the course of my life as a Messaging Administrator for reporting or as Back-end for third party or Microsoft technologies itself.  That is my interaction with SQL other than listening to some of the sessions as i like to learn technologies and sometimes just for the reason that i like sessions of a particular speaker.

 

I just want to share here details around SQLBangalore UG Meet which will be hosted on 24th Nov 2012. Here are some details around the same:

Session 1: SQL Server – T-SQL Pitfalls (30 mins)
Speaker: Vinod Kumar M, MTC – Technology Architect

Session 2: Top 5 SQL Server 2012 functions (30 mins)
Speaker: Manas Ranjan Dash

Session 3: Contained databases with SQL Server 2012 (30 mins)
Speaker: Sudeepta Ganguly, Sr. Systems Engineer – Atos

Session 4: Performance Tuning with Columnstore Index in SQL Server 2012 (30 mins)
Speaker: Pinal Dave, Technology Evangelist – Pluralsight

You can register for the event at this eventbrite page.

Venue: Signature Building, Microsoft India, Domlur – Bangalore

Schedule: 10:30am to 13:00pm

For early discussions around the same you can connect to the group and event at Facebook.

FB Group: SQLBangalore

FB Event: 24th Nov – SQL Server UG Meet

If you see the event agenda, there are sessions by those who any SQL geeks will never want to miss, Vinod Kumar is Technology Architect at Microsoft, and i love his blogs on SQL and more on Life skills from time management to leadership. You can reach him at Blog | Twitter. I dont have to say anything about Pinal sir, somebody said at TechEd 2011 that he is the SQL Celebrity of India.  I would stick to that, he is one of the true Technology Evangelists. You can reach him at Blog | Twitter.

Don’t miss session 2 and 3, those are the ones i want to listen from this event. Its simply b’coz Manas and Sudeepta are my Good Friends. Manas is an Excellent Developer and Sudeepta is a SQL Admin, but like me he explores different technologies. You can get in touch with them here: Sudeepta (Blog | Twitter) – Manas (Blog | Twitter).

If you like interactive sessions, then have a look at the related posts below and have questions ready, your questions may get answered by the Industry Experts.

SQLAuthority Archive for the �SQL Index’ Category

SQLAuthority Archive for the �SQL Optimization’ Category

SQL SERVER – Fundamentals of Columnstore Index

Contained Databases in SQL Server 2012

 SQL Server 2012 New Features Tutorial

SQL SERVER – 2012 Functions – FORMAT() and CONCAT() – An Interesting Usage

 SQL Server – Database Basics

SQL Server – Transaction Logs and Recovery

SQL Server – Locking Basics

 SQL Server – Concurrency Basics

So, enjoy Learning and Networking!

 

 

Categories: Community Tags: ,

And Powershell Bangalore User Group (@psbug) Inaugural Meet in 14Hrs

July 28th, 2012 2 comments

Too much of enthusiasm in the air as we (as we the ITPros and Devs in Bangalore) go Live with our First Powershell Bangalore User Group Meeting. Having around ~100 Registrations this event is going to be Big.  The FB Group for @psbug is already full of fruitful conversations around Powershell and tomorrow it all going in person and we meet in person the guys and share our experience.

First i should give a big applaud to Ravikanth for taking this great initiative and bringing all together to it.  I am excited about this event and as discussed on the Group page if Ravi calls my name also to share how we started learning powershell, i am nervous about it due the butterflies :-)

More to the fun, my friends Manas, Sudeeptha, and Pinal sir are also joining tomorrow, i guess after TechEdIn 2012 this will be a great event.

One important point PSBug is part of our Successful community BITPro, due to the importance and demand i feel it makes sense to have a group dedicated for content around Powershell.

 

This is how my psbug timer looks like now:

 

Here is the code for the same:

Description: http://www.ravichaganti.com/blog/?p=2598

Code:

$timer = New-Object System.Timers.Timer
$timer.Interval = 1000
Register-ObjectEvent -InputObject $timer -EventName Elapsed -Action {
$timespan = New-TimeSpan -End "28 July 2012 14:00:00"
$days = $timespan.days
$hours = $timespan.hours
$Host.ui.rawui.WindowTitle = "The Power Of Shell: $($days) days and $($hours) hours until the first PSBUG bite!"
} | Out-Null 
$timer.start()

Agenda and Venue Details: http://psbug-july282012.eventbrite.com/

What others are talking about the event:

Conversation from the social media: PSBug FB

Twitter: @psbug

Sudeepta writes: sudeeptaganguly.wordpress.com

Announcement: http://www.ravichaganti.com/blog/?p=2584

Bangalore on powershellgroup.org : http://powershellgroup.org/bangalore.india

Let us make this a big succcess together!

Don’t forget

$(UG -eq Learning+Networking)

Happy learning the Shell!!

Categories: Community, Powershell Tags: