Free Month To PluralSight!

Free Month of PluralSight!

Ok, personally this is pretty cool. www.SQLSkills.com is giving away a free month to pluralsight! Well, let me rephrase a bit. They're giving away a free month of PluralSight to people who run a bit of code on their SQL Server(2005 and up) for 24 hours. The code and full post is here. I understand that they're essentially paying us for a 24 hour snippet of data but look at all the rewards? We get 30 days of PluralSight and a free second opinion oh what those wait stats should mean to us. 

They have said that they only have a limited supply. I submitted my own results and I received the code within about 2 minutes of sending the E-Mail. I personally got a subscription to PluralSight during Black Friday where they had a rather large discount for a year. I have one single code that I do not need and I'd like to hear from someone learning that doesn't have a server they can use to take hold of this great offer SQLSkills is hosting. 

I'd like to donate my key to you.

I'll draw the name out of a hat before the end of the day. I'm looking for people who need a key and don't have a server to use. 

I think this is great and would like to commend all of our SQL Blog posters who give away training for free. They've gone a step further and given away access to training that has other peoples training as well for free. 


SQL Saturday OKC 309!

SQL Saturday OKC is coming up!

The event will be August 23rd, 2014!

Now is the time to get signed up. We already have three great precons ready.




All three of these sessions are being done by well respected authors. These are all on an early bird special until July 15th. The normal price is 120, currently they're 99$. We will are excited to host this great event again. If you're not familiar with the SQL Saturday concept, SQLCenturion wrote a rather extensive blog post on his experiences running them here. I have my own take on them from an attendee perspective as well.

I will be submitting to OKC and I hope many other speakers do as well. Given the list we've had in the last few years, I think we'll have a fantastic event once again. I really hope to see you all there.

If you  plan on coming out and would like any local information such as where to find a good restaurant, where is the good theater, or where can I play some putt-putt, feel free to drop a line. I will be at the event and the after party for it. I'd love to meet the people willing to endure this blog. ^.^

While we're on the subject of free training, don't forget to talk your boss into a free lunch or to work on the other free training sites available to you. 

Never stop learning or growing. 


First Presentation Ever And My 50th Post

Last Monday was the first time I've ever presented anything. Honestly, it was the first time really speaking in public in front of a large group. I learned a few things then. This may seem obvious to anyone who's done this even  through high school... but I didn't really do that.

Brent Ozar has a good blog on how to start a blog right here. I decided after reading multiple blogs on SQLServerCentral and other sites that I wanted to start one. I started watching Sean and Jen McCown's Midnight web show, Friday at 11pm central, and going to multiple SQLSaturdays. I decided I wanted to present for the first time.

I did a presentation on fill factor. I chose this topic because I didn't see much around on it and I really wanted to explore what all it meant. I've come to understand a lot more while building the presentation. I'm going to share a few things that helped and didn't along the way.

I started off recording my presentation and giving it to just myself, then I made my poor wife listen to it a few times. It is surprisingly helpful to have someone with no knowledge on the subject sit there. They ask the questions you never expect. That added two slides a bit better explanation and a reminder that I repeat my self way too often. I noticed that I talk a little to fast and I do not transition well. I'm sure that will be easier when the nerves aren't acting up. I made an emergency run to best buy two days before the presentation because I didn't own a web cam so I made an emergency run to best buy. I plan on going back and recording my presentation a few more times until I become a lot more comfortable with it before I try to take this into a SQL Saturday style setting.

I brought along laser pointer presenter device. I was using SQLCenturions. It does the job rather well. The timer alone makes it worth it honestly. I could see that I was 20 minutes ahead of schedule. I also had to borrow my poor daughters laptop. I have a lovely alienware laptop and couldn't use it due to not owning a Display port to anything adapter. It has HDMI out and that doesn't register for the HDMI to VGA adapters. I have recently purchased a   converter. It honestly works rather well.

I found out 5 minutes before my presentation that I had planned it on a 4th gen i7 with 16 GB of ram and a 1TB SSD and was going to go live with a 2nd gen i3, 4 gigs of ram and windows 8 that I finished installing on the way to the event. I was not prepared near well enough. I am very happy I had a backup at all.

Now this all sounds bad and like a bad experience... but it was quite the opposite. I had a fantastic time. I received great feed back that I can actually work on and ideas on how to do so. I felt like I was finally giving back to a community that for so long I've used to train. I would do it again in a heart beat.

I'm way to the left out side of this picture... I'm fine with that. This is the Dell room that Dell has given us to use once a month for free. GDH brings us the pizza and all of these people came to listen to my first time presentation with snow in the forecast. I think it was amazing. First time presenting, on a subject that most don't really use on a daily basis, and we had a rather good turn out.

If anyone else in the OKC area want's to come to any of these meetings, they're free. Check us out at http://www.okcsql.org/.We would be excited to see you all there.

Below are the links to the three things that I referred to above. There may be cheaper and better versions of these... If you know of them, please let me know. I'm still building my travel bag so I can be better prepared. So far it includes:
1)  Logitech HD Pro Webcam C920
2) Logitech Professional Presenter
3) USB 3.0 to HDMI and DVI Dual Screen Adapter
4) A spare laptop cord
5) A tablet with internet access (through my phone works for now)
6) My presentation setup on Amazon's web service... Just in case
7) A spare mouse
and the more ovbious
8) My laptop
9) (days of travel + 10% rounded up) changes of clothes.
10) Spare shoes
11) Enough cash to use a taxi

This is all I have so far. I have been bitten by the presenting bug and hope to do this a lot more.


Do Not Set Maximum Ram To 0 Ever - Mistakes We Make

I'm going down memory lane here and remembering one of the first things I did as a DBA. I was told by one of our other DBA's that if you have 40GB of RAM for a database and it's not working very well, the fix is to modify the max RAM from 40,960 to 1,024 then back to 40,960 after it cleared everything out. I understand now that This isn't the best way to handle it. Queries may fail, everything that was cached will have to cache again, and a slew of other performance issues and possible failed reports.

Here comes the bad part. I had the bright idea at the time that if setting it to 1GB fixed the issue... why not set it to zero? Well SQL doesn't accept zero with any grace. It modifies it to 16 MB of ram. SQL just will not run with that much RAM. SSMS wouldn't load, the website went down, nothing was working. We had to stop all services and login through SQLCMD after starting SQL up in single user mode with the minimal configuration switch. 

Now we have downtime in the middle of production hours. I will say there are better ways to fix this, but the way we fixed it was restoring master from earlier that day that still had the correct setting. I wasn't really familiar with working in a DOS or PowerShell window with SQL at the time. This obviously caused down time and didn't help my reputation any. 

We All Make Mistakes

I now know what not to do. I know to verify things I do not completely understand and cannot logically pick apart. I know how to research more efficiently and I have a better Disaster Recovery plan. We all make mistakes, really we do. No one is perfect. The thing is though, what are we doing to get better? 

This is my request to all of you. Post a story about a mistake you've made and what you did to overcome it. Tell me what you've learned and how you plan on preventing it in the future. I think we could all simply learn from our mistakes or we can help others by letting them learn from ours.

I'm sure someone out there has a good story about deleting a table because they forgot the where clause and the transaction to wrap it in.


What Tables Are In My Filegroups

One issue I've found a bit troublesome is trying to find out what's in a specific Filegroup. Let's say you're trying to clear off a lun or just a drive and you see a file labeled, "iudexes7.ndf". Now unless you built this and have a steal trap for a memory... or just are fantastic at documentation... you probably have no clue what's in this file. If you target the offending database, you can either run the query below as is and gather this data, or add the where clause and target just that file.

Below is a good script for exploring and cleanup.

select sch.name AS SchemaName,tbl.name AS TableName,idx.name AS IndexName,ds.name AS Filegroup,
data_compression_desc,total_pages,total_pages*8/1024 AS SizeInMB,max_column_id_used,fill_factor
from sys.partitions p
inner join sys.allocation_units au  on au.container_id = p.hobt_id
inner join sys.filegroups fg  on fg.data_space_id = au.data_space_id
inner join sys.tables tbl on tbl.object_id = p.object_id
inner join sys.indexes idx on idx.object_id = p.object_id
inner join sys.schemas sch on sch.schema_id = tbl.schema_id
inner join sys.data_spaces ds on ds.data_space_id = au.data_space_id
and idx.index_id = p.index_id
--where ds.name = 'primary'
order by ds.name, idx.name

This is a good way to move files off a specific drive, clean up wasted space or even just help with some space issues related to a specific file. Happy hunting!