SQL Bang UG…Completed A Quarter…Sharing is fun, sharing is learning

430589_10151249803289029_384269882_n       I joined SQL Bangalore User Group (#SQLBangUG) as one of the first 4 members and till date I am part of this “knowledge Hub”, where sharing is fun while learning.

It was Saturday, November 24, 2012 when the first SQLBangUG was hosted at Microsoft Signature Building, Bangalore, India. Vinod Kumar delivered the key note for the event with his unique style of welcoming all and introduced the speakers while explaining the core  purpose of SQLBangalore User Group.

 

"Sharing is fun, sharing is learning"

 

I was lucky enough by getting a chance to present a session on SQL Server 2012 and would like to thank Vinod and Pinal for giving  me an opportunity to deliver a a session at such a big event. Being a learner and a student this forum is going to help me a lot.

The First UG meet sessions were

1: T-SQL Pitfalls  Speaker: Vinod Kumar M, MTC – Technology Architect
2: Top 5 SQL Server 2012 functions Speaker: Manas Ranjan Dash
3: Contained databases Speaker: Sudeepta Ganguly, Sr. Systems Engineer – Atos
4: Column Store Index in SQL Server 2012 Speaker: Pinal Dave, Evangelist – Pluralsight

Also we had two surprise session by International Speaker Lynn Langit, BigData and BI consulting & Raj Chaudhuri from Microsoft, Mumbai on Index and Big Data.

 

66022_500051696693269_1000969640_n386525_500052030026569_538144332_n556795_500052376693201_541434094_n68306_500053216693117_15063029_n14157_500054453359660_704467154_n311241_500054380026334_746315131_n66092_500056346692804_1377774993_n543012_500056250026147_948877610_n63767_500057260026046_1298326439_n

Photo courtesy: Sandip Pani

Pinal Dave from Pluralsight gave away one year free subscription coupon of Pluralsight courses to one of the lucky audience and also he gave couple of his books and monthly coupons of Pluralsight to other attendees.

Sahal blogged about this event and  this was written prior to the event which shows the excitement level of the participants and the enthusiasm to learn something new.

http://www.get-exchange.info/2012/11/20/nosql-ug-meet-sqlbangalore-ug-meet-on-24-nov-2012/

By December 18 the group had added 300 members to its list Smile

 

The Second UG Meet was on Saturday, December 22, 2012

The sessions were as follows

1. Better together: Excel + SQL for Database Developers By Kamlesh Rao
2. Basics of Backups with SQL Server By Balmukund Lakhani, Microsoft
3. Intro to Indexing – Basics rediscovered By Sourabh Agarwal, PFE – Microsoft
4. Knowing sp_server_diagnostics output By Amit Banerjee, PFE, Microsoft
5. Tips and Tricks Session By Vinod Kumar, MTC – Architect

548847_10151382283862803_764516271_n398713_491457330906098_1042803860_n393140_491457207572777_853433763_n406697_491457440906087_1815952124_n66702_491457484239416_1348497391_n483196_492572390794592_826425171_n

Amit Banerjee wrote a blog about the event which is the fastest ever published blog on SQLBang UG http://troubleshootingsql.com/2012/12/22/sql-bangalore-ug-meet/

Also an excellent coverage by our Super Star Balmukund Lakhani in his blog http://sqlserver-help.com/2012/12/23/coverage-report-sql-server-bangalore-user-group-meeting-2-22-december-2012/

 

and we did it! Crossed 400 Mark on 1st Jan 2013 ~ Balmukund Lakhani

 

Also we wished our members on new year day with this unique poster

SQLBangUG_2013

 

The Third UG Meet was on Saturday, Jan 19, 2013 which focused on EXCEL based visualizations

1: Tour of PowerPivot with Excel by Vinod Kumar

2: Advanced Excel Visualizations by S Anand

3: Introduction to PowerView with Excel by Selvakumar

4: Surprise SharePoint Session by Pinal Dave

image814801_10200454388025068_553314515_n14871_498864596821477_2055710638_nimage_thumb18image_thumb13274938_497847073589896_1324110356_n

SQL Bangalore se Balmukund Lakhani without Cameraman

http://sqlserver-help.com/2013/01/22/coverage-report-sql-server-bangalore-user-group-meeting-3-19-january-2013/

We were forced to postpone the SQL user group meeting (scheduled for 23 Feb 2013) by a week due to some issues with the availability of speakers.

Great Discussion and Knowledge Sharing in FB page

 

In between all these sessions the FB page of SQLBang was fully occupied by members where they discussed some live issues and shared great knowledge about SQL Server and the trend is going on with a lot of enthusiasm.

 

Next UG meet on 2nd March 2013

So What are you waiting for… join the SQL Bangalore User Group and experience the power of sharing through learning and be a part of the next UG meet on 2nd March 2013

This UG meeting is about multi-dimensional concepts. This is completely different from the relational engine we are aware off. Register at here

1: Start your journey with Multidimensional using SSAS -by Sudhir Rawat (Microsoft)
2: Introduction to Cubes -by Deepthi Anantharam (Technology Evangelist)
3: SQL Server 2012 Analysis Services – Tabular Mode by Karan Gulati (Microsoft)

Smile Smile Smile Today the group has welcomed its 791th member Smile Smile Smile

 

What & where

 

Facebook: https://www.facebook.com/groups/SQLBangalore/

Events Page: https://www.facebook.com/groups/SQLBangalore/events/

Twitter: @SQLBangalore

Twitter Hash Tag: #SQLBangUG

Download PPT from the Past sessions

https://www.facebook.com/groups/SQLBangalore/files/

 

SQL Bangalore UG se Manas Ranjan Dash

Till next “Keep Smiling”

BDOTNET UG MEET: 26th May 2012 (WindowsAzure & SQLServer)

bdotnet  SQL12_Logo windows-azure

Today we had a UG meet at Microsoft Building,Bangalore. UG Meet means guaranteed technical learning, a great networking opportunity, feedback from masters, unlimited fun, lots of tweets and the count goes on.

The audience experienced two very informative session by two masters 1)Windows Azure by Niraj Bhat(FB|T) & 2)SQL Server Execution Plan by Pinal Dave(B|T) from SQLAuthority. This time also we had a houseful audience like every time and each one went back with some new thoughts , some new ideas and some new concepts. One thing I must say that from today onwards every one who attended the session will “Ask SQL Server” for their doubts , rather then assuming anything:)

Vinod Kumar(B|T) introduced the speakers and said a few words on Windows Azure. He asked multiple questions to audience and gave them a feel of what’s coming up. Also if you know the answers , you can tweet him or put the same on #BDOTNET FB page.

Here goes some points covered in the sessions.

Windows Azure: Big Talk

Windows Azure is an open and flexible cloud platform and used to build , deploy and manage applications across global Microsoft managed Data Centers. It provides you a great application hosting environment.

Niraj told us about the Open Source Apache™ Hadoop which is used to develop open-source software for reliable, scalable, distributed computing.

Microsoft says ~ A Hadoop based service on Azure will offer broader access to Hadoop through easy setup and configuration, simplified programming with JavaScript integration, and integration with familiar tools such as Excel.

Apache Hadoop is a powerful, scalable, distributed computing framework designed to handle the extreme volumes of these unstructured and structured data. The Developer Preview for the Apache Hadoop- based Services for Windows Azure is available at https://www.hadooponazure.com/. Its a software framework to process vast amounts of data scheduling, monitoring, re-execution of processing tasks.

You can follow the steps below for Hadoop On Azure.

  1. workflow
  2. create gather data
  3. copy data to hdfs/asv
  4. mapreduce functions
  5. output to hdfs/asv

Niraj also spoke about Google’s initiative of Parallel Programming MapReduce. MapReduce is a programming model used to process large amount of raw data.

 

SQL Server Execution Plan

How to use petrol efficiently?  Should I sale my car? Should I go for a Bi-Cycle?

Pinal Dave started his session and triggered the current petrol issue which gave a big question mark to everybody. In what way this problem is related to SQL Server execution? Actually he was trying to clear the idea that “to be efficient , you need to use your resource properly”.

Why is my query running so slow?

Is there a problem with the way I use my select statement?

Is my index not proper?

Does the where clause make sense in the performance?

Less resources better performance. Is this true?

Pinal Dave took a session on one of the most discussed topic of SQL server i.e. Execution Plan. He explained the best practices and gave some nice suggestion with a couple of Q&A on execution plan. The demos added flavor and clear the confusion with the execution plan described through the SSMS. When to use indexes and whether the select and where statement make sense in performance tuning or not was the main discussion on the day.

Some of the points need to be considered are

  • What are the indexes we have?
  • Adding columns doesn’t change the execution plan its the where clause that change the plan, (But you need to consider the columns)
  • Nonclustered index already have clustered index in the selection.
  • Order of the index also matters.
  • When you want to tune always compare the execution plans.
  • Check the actual vrs estimated plans
  • Conversion of datatype matters
  • Put N before varchar to make it nvarchar (plain english :) )

In SSMS Shortcut for Display Estimated Execution Plan : CTRL + L
Shortcut for Include Actual Execution Plan : CTRL + M

Pinal also touched the SQL Server 2012 keyword SEQUENCE and Vinod pitch in to clear some doubt on Pinal’s request. Vinod has dedicated a complete article for SEQUENCE.

  • You will not be able to change the datatype of a sequence with alter sequence statements.
  • IDENTITY is different because even the IDENTITY can get reset using the TRUNCATE command, but SEQUENCE has to be reinitialized using the ALTER for the same.
  • Sequence can be used inside a  Insert , Select , Update statement, with Over and Order By and With Default.
  • If you need a unique sequence number to be generated across a single database then sequence can be of great help. IDENTITY can be used to generate a unique number for a given table and not across tables.

QUIZ Time

  1. What is bits  in Windows 7?
  2. What are the different Optimization level? (trivial, full)
  3. What are the difference between WCF and windows service?

Useful Links

https://www.facebook.com/groups/BDotNet/

http://blogs.extremeexperts.com/

http://blog.sqlauthority.com/2010/01/22/sql-server-execution-plan-estimated-io-cost-estimated-cpu-cost-no-unit/

http://ranjandotnet.blogspot.in/2012/05/wcf-servicesvs-windows-service-this.html

Check http://beyondrelational.com/ for my articles, Interview Questions and Just Learned sections.

Till next time Keep Sharing Smile , its free :)

Customized success or failure log of the SQL job in the Windows Event Viewer.

This #JustLearned was published in Beyondrelational.com and for other #JustLearned by me check the link provided at the end of this article.

 

You can check the status of a  SQL job and log the customized success or failure message of the job for the day in the Windows Event Viewer.

IF NOT EXISTS (SELECT TOP 1 RUN_DATE FROM MSDB.DBO.SYSJOBHISTORY WHERE JOB_ID=
(SELECT JOB_ID FROM MSDB.DBO.SYSJOBS WHERE NAME=’S_000W’) AND
STEP_ID = 3 AND RUN_STATUS=1 AND
RUN_DATE=CONVERT(VARCHAR , GETDATE(), 112) ORDER BY RUN_DATE DESC)
BEGIN
EXEC XP_LOGEVENT 60000, ‘S_000W: DAILY JOB NOT COMPLETE’, ERROR
END
ELSE
BEGIN EXEC XP_LOGEVENT 60000, ‘S_000W: DAILY JOB COMPLETED’, INFORMATIONAL
END

Usage

–xp_logevent { error_number , ‘message’ } [ , ‘severity’ ]

For more information

http://msdn.microsoft.com/en-us/library/ms186244.aspx

Also check the uses RAISERROR

For other #JustLearned check the below links

SQL Server Tips – Identify running jobs on remote server

Checking the Job Schedule status of a SQL job

Windows Service Installation with a Service User Account

Dotnet – Its possible to generate the assembly of specific platform

Platform specific code in dotnet

Disabling/Enabling SQL Jobs or Job schedule from remote computer

Windows Service with Windows Timer control doesn’t tick

SQL SERVER – Win a Book a Day

pinalsmall Learning is an extremely important part of life says Pinal Dave and he started his blog to learn and let others learn from it. He has already blogged 1800 articles and the number is growing every day. An inspiration to many SQL aspirants, Pinal share his thoughts everyday and answers each questions raised on his blogs for SQL. I have attended his sessions in BDOTNET events. The best line that describes pinal is…."Pinal is super cool".

His  Blog has already received 1 Million+ Hits in Month of March 2011, May 2011, Jun 2011.

He has started a QUIZ, in which the best part is you read an article and answer a quiz at the end and win daily prizes.

His blog says:
You just have to take a simple quiz at the end of the each blog post, and we will ship two SQL Books every day to a random winner. QUIZ

Already so many winners. I am going to participate…….Are you???

 

Also you can find him in Pinal Dave

#JustLearned 5 Disabling/Enabling SQL Jobs or Job schedule from remote computer

Here is the way to disbale/enable the SQL Jobs or its schedule from remote computer, The script is usning windows authentication and querying the MSDB database.

01.--Main Scripts
02.SQLCMD.EXE -S <servername> -E -dmsdb -h-1  -iQueryToRun_MSDB.sql -o output.txt
03.  
04.--QueryToRun_MSDB.sql (For Disabling SQL Jobs)
05.EXEC sp_update_job @job_name=N'S_AAAA',@enabled=0
06.  
07.--QueryToRun_MSDB.sql (For Enabling SQL Jobs Schedule)
08.EXEC sp_update_jobschedule @job_name = N'S_AAAA', @name =N'SCH_AAAA1' ,@enabled = 1
09.  
10.  
11.--Use @enabled  = 1 for enabling and @enabled  = 0 for disabling.

You can visit MSDN for more learning on this storeprocedure.