Articles for the Month of June 2014

MCSA, Act 1 Exam 70-461

The MCSA is really a play in three acts, one for each test. For SQL Server 2012, Microsoft changed up the whole exam game. Now you have to take three tests, count them three 461, 462 and 463, to get a certification, the Microsoft Certified Solutions Associate [MCSA]. Gone are the good old days when you could take the first exam 461 and then stick Microsoft Certified Professional on your business cards. That was sweet, and in all candor I have done something kinda similar. Unfortunately, these days you will receive nada until you take and pass all three exams. Only then will you receive two logos and a certificate, which I now have ensconced upon my office wall in an exceedingly tasteful and exceedingly stylish frame.

A bit more branding for a lot more work.

So let’s start at the beginning and talk about 461. Unofficially speaking, this test isn’t terrible. Check out the link to see what’s on it http://www.microsoft.com/learning/en-us/exam-70-461.aspx. You just have to make sure you know all the stuff that they tell you on this page. For me the hardest part was learning all of the new stuff on 2012 which I hadn’t gotten around to playing with yet and the XML which no one has asked me to play with for years.

I wish I could comment on the book for it, but I got all motivated and took the test before the book came out. Itzik Ben-Gan is really an impressive guy when it comes to SQL stuff, so I bet it is good. I can tell you this, you can pass the test without it. What I did was took every topic listed in the study guide on Microsoft’s 70-461 site, and made up my own reference from links online. I played around writing code in adventure works too. I ordered the material I studied based on the emphasis that topic had on the test. The topic Work with data has the highest percentage of the material at 27% so I studied that one the most and the rest of them in percentage order. I made sure that I could write the sql code covered and that pretty much did it.

For those of you who wonder what it is like to actually take the test, just follow the process. First off, you make an appointment at a testing site, show up 10 minutes before your time, and sign in. If you bring anything with you other than your two ids and keys, you will have to lock it up there, so empty your pockets and leave all the stuff you usually carry around with you in your car, or as I like to refer to my car, the rolling purse. The proctor will hand you a laminated piece of paper and a dry erase marker and then walk you over to a library carrel with a computer they will sign in. The test is timed, so take a watch as the computer won’t show you what time it is. Whenever I don’t know what time it is, I find a strange fixation to know the time. Yes I get that this makes no sense and a waste brain power, but this is what I am thinking about when I am sitting there. As soon as you hit enter on the last question, sit there for a minute and you will find out if you passed or not. Be kind to the other people taking the test and don’t start banging on the desk because I don’t need your personal issues to mess with my brain, which is still mode locked over not knowing what time it is. You will get a printed copy of your results which show how you did in each section with a Gantt chart. If it is all black you got that section 100% correct. I am dying to know what a blank 1/3 of an inch means, but Microsoft doesn’t really disclose how it is scored, so I guess I’ll never know but I did pass it. Note to self, next time, bring a watch.

Yours Always

Ginger Grant

Data aficionado et SQL Raconteur

 

The Scoop on Sqoop

In the weeks following my talk at Desert Code Camp and SQL Saturday in Detroit about Big Data, I have been receiving inquiries at my blog regarding sqoop, so I thought that I might get more specific on how it works. Sqoop is part of the Apache borg-like collective of tools which was created to use databases, any databases. Lots of people have databases and like them. Databases are really good ways to store data. Just think if Oracle would have been cheaper and faster Hadoop may have never been created because Hadoop was created to solve those problems, I guess at least in this situation resistance was far from futile, but I digress. Let’s say you have some data which you would like to load up into your SQL database. Since you are picking the data to load up into SQL Server, I am expecting you are picking some data which is already structured.

A while ago I worked on a GPS tracking application. We collected data on trucks every 10 seconds, which means that we were collecting a lot of data. To decrease the data in the database, the data was archived off after 30 days. If I was working there now, I would recommend that the data be archived to HDFS. You could store it very cheaply that way and using Sqoop, load the data back again if someone threatened to sue or something worse…
Here’s how you make an archive that work using Sqoop and HDFS
1. Create an HDFS datastore
2. Load the drivers for SQL server, because they only give you mySQL
3. Run the Sqoop command
4. This extracts the data and inserts into HDFS
Ok, let’s say you want the data back. The trickiest part is getting back only the data you are interested in and not everything you have. You can run out of space in SQL server by loading all of this data up, so be careful. First you need to know some information about SQL Server. Run this query on your destination
Select CONNECTIONPROPERTY(‘Net_transport’) as net_transport
, CONNECTIONPROPERTY(‘local_tcp_port’) as tcp
, CONNECTIONPROPERTY(‘Client_net_address’) as client_net_address

If it comes back that you have mixed instead of TCP, go into SQL Server configuration manager to change it to TCP. You will need that information to know what to put here. I am of course assuming that you have already created a SQL user id called Hadoop with a password of bigdata.

sqoop import –connect “jdbc:sqlserver://192.168.138.1:1433;database=AdventureWorks;username=hadoop;password=bigdata” –table

Assuming you kicked this off in the right path and all, congratulations, you have just used Sqoop!

Yours Always

Ginger Grant

Data aficionado et SQL Raconteur