Sunday, July 8, 2012

Baton Rouge SQLSaturday #150 & Tech Day–DBA 1 track

August 4th of this year will be the forth annual Baton Rouge SQL Saturday and Tech Day. Patrick LeBlanc got the ball rolling 4 years ago and now a team of IT professionals from Baton Rouge have continued the effort.

This blog starts a series of blogs over the next few weeks to spotlight the tracks for this FREE event. Of course, nothing like this is possible without sponsors. This year we have Platinum sponsors Sparkhound and USGS Technical Community. So far, Gold Sponsors are Confio and Amedisys (a previous employer).

The first track is the DBA 1 in the main auditorium. MVPs Sean McCown (Dallas) and Wesley Brown (Austin) are 2 of the speakers. It is good to see the Texas crew coming to Louisiana. Jim Murphy (Austin) and Ryan Adams (Dallas) are scheduled in this track as well as Mike Byrd.

8:20AM AlwaysOn - Finally, A usable 'mirror'!

In the past, High Availability and Disaster Recovery (HADR) had many limitations. Clustering and Mirroring are great, but the mirror/secondary database is not very usable since it is not online. Finally, AlwaysOn solves this limitation by merging both multi-node Clustering and mirroring. AlwaysOn also allows the secondary database to remain ONLINE, so we can use it for reporting purposes without resorting to a Snapshot! Come see this lively session with extensive demos of setting up, configuring and testing AlwaysOn. We'll also test automatic fail-over using a real web app to see how well this feature works.

Session Level: Beginner

Jim Murphy

Speaker photoJim Murphy has been using Microsoft SQL Server since version 6.0 back in the 90's. He is the President/CEO of SQLWatchmen, LLC., a managed DBA service provider for smaller companies who do not need a full-time DBA. He runs the Austin SQL Server User Group: CACTUSS Central and sits on the board of SQLPOSSE.com. He has been a professional DBA and developer for over 20 years and has run a consulting company full-time for over a decade.

Contact URL: http://www.sqlwatchmen.com/blogs/jim

9:35AM - Nuts and Bolts of Table Compression

Objective of session is to show with examples when and what and how and if to implement table compression. Session will review table compression as implemented for SQL Server and then dive into many examples including benchmarking. Come to the session to see the results -- they were surprising to me!

Session Level: IntermediateMike Byrd

Speaker photoFormer rocket scientist, retired USAF fighter test pilot; now a database geek. Former CTO for Texas Windstorm Insurance Association (9 years) and now SQL Server guru for Newgistics, Inc. (a direct competitor with FedEx and UPS for ground transportation for small packages) and part-time consultant. Expertise is performance tuning.

10:50AM - Benchmarking, Baselines and Monitoring Storage

Benchmarking, Baselines and Monitoring Storage There are several steps in the life cycle of your storage systems. We have several tools to help us understand our storage systems from initial deployment through its useful life. We will cover: SQLIO, a specific SQL Server benchmarking tool. Iometer, a general IO benchmarking tool and simulator. SQLIOSim a specific SQL Server base lining tool and simulator. TPC style testing focused on TPC-C, TPC-E and TPC-H. Monitoring your system using WMI and virtual file stats. Finally, what it all really means, how to read these results and compare them with each other. With these tools you can plan, deploy and manage your storage for years to come!

Session Level: Beginner

Wesley Brown

Speaker photoWes Brown is a PASS chapter leader and SQL Server MVP. He writes for SQL Server Central and maintains his blog at http://www.sqlserverio.com. Wes is Currently serving as a Database Administrator Consultant for Dell. Previous experiences include Product Manager for SQL Litespeed by Quest software and consultant to fortune 500 companies. He specializes in high availability, disaster recovery and very large database performance tuning. He is a frequent speaker at local user groups and SQLSaturdays.

Contact URL: http://www.sqlserverio.com

1:10PM - How Active Directory affects SQL Server

There are many things that can go wrong with SQL server, and a lot of times they come from outside influencers. Active Directory is one of the largest influencers that can have many interesting and unexpected issues that are not apparent. We'll discuss how the location of your server in AD is important, how security can be compromised, and even AD DNS configuration. By the end of the session you'll have a check list of things to discuss with your domain administrator when you return to work. This includes the biggest perpetrator, Group Policies Objects.

Session Level: Intermediate

Ryan Adams

Speaker photoRyan has worked for a Fortune 100 company for 14 years. He is the sole SQL Server DBA for his group. His primary focus is database design and performance, but also works with SSRS and SSIS. He enjoys being involved in the SQL community and serves on the Board of Directors for the North Texas SQL Server User Group and the PASS Performance Virtual Chapter. He also serves as a Regional Mentor for PASS and holds the following certifications: MCP MCSA MCSE MCDBA MCTS MCITP

Contact URL: http://www.ryanjadams.com

2:25PM - The Backup Tune-up

Have you ever gotten tired of your 1TB database taking 4+ hrs to backup? Are you sick of having your users breathe down your neck for 2hrs because it’s taking too long to restore a DB? Well now you don’t have to worry about that anymore. I’m going to show you some little known tricks, methods, and trace flags you can use to tune your backups just like you would a query. Backups actually have kind of an execution plan that you can access if you know how, and knowing how to get the individual portions of your backup process down will allow you to knock 80% and even more off of your backup and restore time. I’m not holding anything back in this session. This is a method I’ve used for 15yrs to tune my backups and I’ve had great success.

Session Level: Intermediate

Sean McCown

Speaker photoSean McCown is a Certified Master in SQL Server 2008. He is also a SQL Server MVP with 17yrs experience in databases. Sean is also founder and co-owner of the renowned website MidnightDBA.com where he records free SQL Server training videos and co-hosts the popular webshow, DBAs@Midnight.

Contact URL: http://www.MidnightDBA.com

Monday, June 18, 2012

MAXDOP and Cost Threshold for Parallelism – an example for a parallel query

The most popular post on this blog ranked by hits is one about the CXACKET wait stat. There are no comments, so I am not even sure if it was helpful to anyone, but me.

This post will be an example of a query from the AdventureWorks database that runs in parallel by defaults instance settings for SQL Server, but will step you thru changing the thresholds to see differences in query plans when changing these settings. Parallel queries is what ‘can’ cause CXPACKET waits.

First, the query:

SELECT sod.SalesOrderID, sod.OrderQty, 
        p.ProductID, p.Name
    FROM Production.Product p
        INNER MERGE JOIN Sales.SalesOrderDetail sod
            ON sod.ProductID = p.ProductID    


This code uses a query hint, MERGE, to force a certain query plan:


image


You will see the black arrows in a yellow background indicating iterators running in parallel. For a query to be considered for parallelism, the overall cost of the pre-parallel query must be above the Cost Threshold for Parallelism instance setting.  Here is a graphical view from the Object Explorer in Management Studio looking at the properties of the Instance. In this case, the default installation had 5 as the value.


image


The 2 setting will be looking at are Cost Threshold for Parallelism and Max Degree of Parallelism. These values can be obtained from the sp_configure system stored procedure if the “Show Advanced Option” is on. Here is the code for this:



EXEC sp_configure 'show advanced option', '1';
RECONFIGURE;
EXEC sp_configure;


Now, we are going to use another hint to remove running the query in parallel, OPTION (MAXDOP 1) to find the cost before running parallel.



SELECT sod.SalesOrderID, sod.OrderQty, 
        p.ProductID, p.Name
    FROM Production.Product p
        INNER MERGE JOIN Sales.SalesOrderDetail sod
            ON sod.ProductID = p.ProductID    
    OPTION (MAXDOP 1)

image


By doing this, we can see the cost associated with a non-parallel query plan for this query:


image


The Estimated Subtree Cost of this query is 10.7496, which is greater than the Cost Threshold for Parallelism (5) on this instance, thus the optimization engine can see if running parallel will help. Here is the cost after running parallel.


image





So, by running in parallel, the cost is 1/3 the original query. The other factor in parallel queries is the number of scheduler/threads or CPUs used to run the query. If we look at the properties of one of the iterators for a parallel process, we can find the number it used.


image


Here, we can see the iterator Parallelism (Repartition Streams) used 8 threads, which is the number of processors on this machine, to run the query in parallel.


If we change the MAXDOP in the query or instance, we can change the number of threads and cost. Below is a script to change the instance level setting from 0 (all processors) to 2.



EXEC sys.sp_configure N'max degree of parallelism', N'2'
GO
RECONFIGURE WITH OVERRIDE
GO

All running the query again, here are the results.


image




The cost is now 6.38581 and only 2 threads. This shows us that parallelism and the number of threads makes a difference in the cost of the query and how fast it might complete. The Max Degree of Parallelism is a setting that can be changed on the instance as well as using a query hint to control parallelism.


There are good articles on MAXDOP settings on SQLSkills.com that can help explain the changes you might make on the instance level settings.


Thomas

Thursday, June 14, 2012

PASS Data Architecture VC presents Neil Hambly–Improve Data Quality & Integrity using Constraint

Tuesday’s (June 19th, 2012) PASS Data Architecture Virtual Chapter has Neil talks about database design that uses Constraints for Integrity and Performance.

We will also be giving away an Amazon gift card plus someone gets a book - Itzik’s T-SQL Fundamentals.

If you would like to volunteer for this VC, please email PASS_DA_VC@HotMail.com

Subject: Improve Data Quality & Integrity using Constraints

Start Time: Tuesday, June 19th, 2012 12:00 PM US Central Time (6:00 PM GMT)

End Time: Tuesday, June 19th, 2012 1:00 PM US Central Time (7:00 PM GMT)

Presenter: Nail Hambly 

Live Meeting Link: Attendees LiveMeeting

Leverage the power of Constraints to improve both Data Quality and Performance of your databases. Powerful Data Entity & Referential Integrity can be achieved using the different constraints available in SQL Server. Discover how to utilize the full range of constraints available Default, Check, Unique, Foreign and Primary keys. Learn how to use DBCC commands to validate data conforms to
constraints, handle Nulls and gain real-world performance tips.

 

Neil Hambly is a SQL veteran with over 13 years’ expertise in SQL Server from
Version 6.5 through to the very latest 2012 edition. Neil has held Database
roles at major organizations {BBC, ABN AMRO, ACCENTURE} as well as market
leading smaller companies, experienced in DBA, Developer & Architect roles. Neil is an speaker at conferences and user groups. UG Leader of the London Area SQL Server User Group (UK) often seen presenting at UK & international events. Just loves SQL!!!

Add to calendarAdd to calendar

Saturday, May 26, 2012

SQL Saturday #132 Pensacola and Wheeling, WV PASS UG

I have 2 upcoming speaker opportunities in June and am very excited about presenting this material.

June 9th is in the 4th annual SQL Saturday in Pensacola. Karla and Mark Holmes look like they have setup a great event for IT professionals. The schedule is posted here and registration here. There is even a Pre-con on Friday. I spoke last year for the first time in Pensacola, but the Baton Rouge community of IT speakers have been going for all four years.

image

The first session is Execution Plan Beyond Basics. I did this one at the local Baton Rouge SQL Server User Group about 3 months ago, and was not able to get through all the material because there are lots of questions. Especially, questions like ‘If that is a problem, how do you fix it.’ The usual answer is ‘It depends’. The end of the presentation has some suggested tools to help answer these questions: For indexing, the Database Tuning Advisor Wizard and Missing Index suggestions and for better analysis of the query plan, SQLSentry’s Plan Explorer, but nothing beats heads down analysis of the query and database design. I have removed about 3-4 examples, so it can be finished in an hour.

image

The second is a new session on ETL with SSIS 2012. I decided to limit this session to 3 new topics: Change Data Capture control(s), the DQS component and the SSIS Catalog.  There are too many new features to cover them all, so I decided to demo the ones I am using at work with new development. The CDC is really a neat feature, which changes the design of the ETL flow in development of incremental loads.

John Sterret, my favorite pirate, asked me to do a remote Execution Plan Basics session for the Wheeling PASS User Group on June 21st. This one is a beginner level query plan session to get a DBA or developer familiar with reading a plan and understanding why some iterators are used. It is not for DBA beginners, but for developers or DBAs that are having to start tuning queries.

image

Well, that is all for now, but July and August are looking promising for some more remote presentations and a SQL Saturday in Baton Rouge.

God Bless!!!

Thursday, May 17, 2012

SQL Saturday #150 and Tech Day

Baton Rouge’s annual tech event for the IT community is coming up August 4th on the beautiful campus of LSU. The event is blessed to have one of the state’s universities to help us put on a wonderful day of technology. The local user groups help with the Tech Day.

Photo

The call for speakers is open:  http://sqlsaturday.com/150/callforspeakers.aspx

Patrick LeBlanc took the bull by the horns 4 years ago to start this event. That day had 200 attendees, followed by 400 in 2010 and 375 last year. I found this picture of Patrick from Tim Mitchell’s pic gallery from #SQLRally in Dallas last week

Here are some more enjoyable pictures from last year. Sorry Patrick :)

https://plus.google.com/photos/110051938285440518693/albums/5644995123330846385?banner=pwa&authkey=COSS5LS5l_TkXg

What I have found interesting about the group of volunteers, is that more and more are helping out and finding great value with the networking opportunities. Local consultant companies like Antares, Sparkhound, Preficient and Geocent have seen the value in participating in this event. National sponsors like Quest, Red Gate, K2, HP, Microsoft, Telerick, Confio, Idera and Fusion IO help with the funding and man booths.

The day is full of SQL Server goodies (4-5 tracks), but there are additional sessions for .Net Developers, SharePoint gurus, IT Architects and IT management levels.

We hope ya’ll all will join us on August 4th, 2012 as a speaker, attendee, volunteer or cheerleader and come pass a good time, yea cher!!!

Photo  Photo

You might even win prizes…

Photo   Photo

Ever session gave away at least one book based on the topic of the talk.

http://sqlsaturday.com/150/eventhome.aspx

Monday, May 14, 2012

PASS Data Architecture VC presents Mike Fal: SQL Server Table Partitioning

Thursday’s (May 17th, 2012) PASS Data Architecture Virtual Chapter has Mike demonstrating some cool Table Partitioning scripts which I was able to attend at SQL Saturday in Colorado Springs in January of this year.

We will also be giving away an Amazon gift card plus someone gets to choose between Itzik’s T-SQL book or Kalen Delaney’s 2008 Internals.

If you would like to volunteer for this VC, please email PASS_DA_VC@HotMail.com

Subject: Eating the Elephant: SQL Server Table Partitioning

Start Time: Thursday, May 17th, 2012 12:00 PM US Central Time (6:00 PM GMT)

End Time: Thursday, May 17th, 2012 1:00 PM US Central Time (7:00 PM GMT)

Presenter: Mike Fal

Live Meeting Link: https://www.livemeeting.com/cc/UserGroups/join?id=57CCCW&role=attend&pw=H%7DBg5%228qD

Eating The Elephant: SQL Server Table Partitioning

Is your table fat? Do you need to manage a table that has billions of rows within it and are overwhelmed by index rebuilds that take more than 12 hours? SQL Server's table partitioning gives the DBA the tools to manage this beast and support very large tables in a way where index management and data retrieval does not become unwieldy. This presentation will take you step by step through choosing an appropriate partitioning key, setting up the partitioning on the table, and finally maintaining the partitions.

Mike Fal

Mike Fal is a musician turned SQL Server DBA, with 10+ years of experience along with some brief excursions into Oracle and Netezza. He has worked in several different industries, including healthcare, software development, marketing, and manufacturing and has experience supporting databases from 1 GB to 4 TB in size. Mike received his Bachelor's Degree from the University of Colorado at Boulder in 1996 and has been caught playing trombone in public on more than one occasion.

Contact URL: http://www.mikefal.net/

Add to calendarAdd to calendar

Friday, April 27, 2012

SQL Saturday Houston #107 Recap

I enjoyed a long weekend in Houston starting with Kalen Delaney’s Pre-con on Query Tuning. I have learned over the past years that I should concentrate on 2 or 3 items to take from the training. The first was no matter what kind of T-SQL development is done through an application, there is always a performance gotcha with just Stored Procedures or Parameterized Queries or generated SQL code. It seems a DBA will always be needed to discover what’s in the Plan Cache or a query plan that is hindering performance. The second item was tips and tricks while reading query plans. The zoom to fit was great, Last, the ordered property of an operator and the thought that the plan is read from right to left for data and left to right by calls to the APIs.

In the room Friday was my buddy Rob from Blue Cross-Blue Shield, Jim Murphy from Austin and Nancy from the SQLSaturday Houston crew with Malik. I meet @SQLAvenger again and talked about our presentations from this year. I was surprised the crowd attending the Pre-con did not know about the SQLSaturday event the next day, but somehow found out about the 1-day training as they called it. This Pre-Con sold out (50+ attendees) before the discount price ($88) ran out. Thanks to Idera for bringing Kalen in for Idera Ace training.

I was only able to visit for about an hour at the Speaker/Volunteer appreciation dinner before visiting with an old friend from college. I chatted with Jen and Sean McCown (@MidnightDBA), Wesley Brown (@SQLServerIO) from Austin, Christine, Mike from California, Kendal and many more. The Idera Ace program brought about 10-12 additional speakers in town for SQLSaturday which really boosted the variety of sessions.

Saturday started with a quick registration because of Speed PASS. The parking lot was almost full first thing in the morning, which is really encouraging for SQLSaturdays. I started in Tim Mitchell’s What’s New in SSIS 2012.

  I enjoyed hearing about the new DQS component of SSIS.

Next was me with Dimensional Modeling 101. The room was packed with people standing and 3-4 speakers attending which was nice to have to help answer questions. The talk was well received and I tried improving it from the first go thru in Colorado Springs. It was good to read the reviews and change the flow. I was surprised with the comments, and not so surprised with the suggestions for improvement which included adding more descriptions from the Kimball group process. It would definitely be nicer to have another 15 minutes :) I also converted it to SQL Server 2012 – SSIS, SSAS and the AdventureWorks database.

Next, I went to the speaker’s room to visit and relax. At lunch time, I sat with attendees and ask questions about why they came and what their future looks like. It is great to see younger (20-something) IT professionals hungry for learning and advancing. The YES school IT people were at our table and talked about their school, which helps troubled kids get an education. The school was really nice with tech equipment. One room was decked out with Texas A&M which of course I stayed away from.

Next was Bill Pearson talking DAX and PowerPivot.   If you have never meet this Georgia native, you need to at the next SQLSaturday you attend. He talks almost at every one of them, and has started to do Pre-cons. His knowledge of BI runs for many years.

Execution Plan Basics is a session I have done many times, but the session slowed downed because of questions and discussions about clustered indexes and how a primary key does not have to be a clustered index and is not required for the primary key. This got me thinking about a new session which I have heard other people do – Indexes for Developers.

Back in the speaker room, I talked with Jonathon and Louisiana life and family. It was pleasant to rest a second and just visit. Before long I was helping Nancy and crew clean the speaker’s room and hauling trash to the dumpster. Nancy and Sri rapped things up with talk of SQLRally in Dallas and raffle items from the sponsors.   Idera (home office in Houston) was the main sponsor, but I got to spend time talking with Confio (Ignite), Texas Memory Systems and Joes to Pros writer Rick Morelan. Rick and their company gave away lots of books and DVDs which the speakers were able to give during sessions. I had one attendee excited about taking some training home with her for work.

I ended the evening Saturday with an Astros game. They lost, but relaxing at a ballpark is always enjoyable for me. Houston, see ya next year and some of ya’ll all in Baton Rouge for SQL Saturday #105.