Author: way0utwest

  • Analytics or Flying Cars

    Boyhood dreams of flying cars

    When I was a kid I read a lot of science fiction books, all predicting that we would be driving in flying cars or have regular trips into space.  There was this anticipation that we’d have robots helping us with many of the chores of our everyday life and that computers would be much more intelligent that they are now. That hasn’t come true, but the world has dramatically changed since I was 12 years old.

    Reid Hoffman, co-founder of LinkedIn gave a talk recently that looked at the future. He acknowledged that we didn’t have flying cars, but we have had something that has changed our world: data. He looked at the early web, anonymous and slow and the 2.0 model of social interaction and offline identities moving online. It’s hard to know where the next evolution of the web will go, but I think that the dramatic explosion of data will be a part of it.

    We collect so much data, and there is a tremendous call for the analysis and aggregation of that data. We seem to be fascinated, and driven by the regular presentation of information. For a long time that involved numbers, but there is tremendous growth in new presentation techniques that blend data, using colors and shapes to help us understand. It’s amazing how much people even want to manipulate the data, especially when some gesture-based, iPad-like interface is involved.

    For the data professional this is great news. Our skills will be in demand, and there is tremendous opportunity in learning how to better gather, store, analyze, and present data. Our RDBMS systems have grown to encompass an amazing array of tools to assist us, and if you need something that isn’t built in, there are so many vendors providing tools and utilities that make almost anything possible.

    We live in an age of data, one that I find very exciting.

    Steve Jones


    The Voice of the DBA Podcasts

  • Tax Day

    I hate taxes

    In the United States today I usually Tax Day, or the day that personal income taxes are due to be filed with the government. In 2011 you get an extension to Apr 18, but for all practical purposes, this is the day that most people have planned on filing your taxes.

    With that in mind I thought I might take a break from technical discussions and polls  and ask a question that might be let us know how many of you feel about your career this year. The poll for this week is:

    Are you better off today in your career than a year ago?

    Supposedly the economy is doing a little better worldwide, and companies are making more IT investments. I have even heard of a few friends getting bonuses in the past year for performance by their employer. If you look back to 2010, or even 2009, do you feel better about your job and your career? Do you have more security? Do you have better compensation? Are your prospects looking better for the future?

    I am not a technical DBA right now, but my employer is doing well and I think my position is more secure. As I survey the DBA market, it also seems the are more positions available in my area with a wide variety of companies. If I did need to change jobs, I have a lot of confidence that I could find something else.

    Hopefully most of you feel that your career is doing better this year than last, but let us know this Friday.  If it’s not, perhaps someone will give you some advice to help you improve the situation for next year.

    Steve Jones


    The Voice of the DBA Podcasts

  • T-SQL Tuesday #17 – APPLYing Yourself to T-SQL

    TSQL2sDay150x150It’s T-SQL Tuesday again, and this month Matt Velic is the host. His topic this month is the APPLY operator, after a challenge from Adam Machanic that you are not that proficient in T-SQL if you don’t know how to use this operator. I agree with Adam, and I think APPLY was an amazing addition to the T-SQL language.

    If you’re not sure what T-SQL Tuesday is all about, check out Adam’s initial T-SQL idea and post on the monthly blog party. T-SQL Tuesday is the second Tuesday of every month and the host rotates.

    You can also follow T-SQL Tuesday on Twitter with the #tsql2sday hashtag.

    APPLY

    The APPLY operator is one that I wished had been available in SQL 7/2000. There were many times when you were trying to apply a result set to a function and there was no easy way to do this. Most of the time this resulted in some type of cursor/temp table solution to make things work.

    One classic example was in trying to determine the SQL that someone had executed when they were blocking another user. The old sp_who2 gave limited information and often we were query a blocking tree and then start sending SPIDs through dbcc inputbuffer to get an idea of what SQL queries were being run.

    APPLY doesn’t help with DBCC, but it does help in other ways. In a modern twist to this problem, you can take a plan handle and run it through sys.dm_exec_sql_text to get the SQL that was executed

    If I did that for one of the connections I have locally, I could get something like this:

    SELECT *
     FROM sys.dm_exec_sql_text(0x010005003E60AD1C901E7D81000000000000000000000000)

    Which will give you this:

    tsqltues_code2

    Now, if you have a whole list of data, say perhaps a list of everyone connected from sys.dm_exec_connections, you can combine these two together.

    SELECT a.session_id
        , a.num_reads
        , a.num_writes
        , b.text
     FROM sys.dm_exec_connections a
       CROSS APPLY sys.dm_exec_sql_text(a.most_recent_sql_handle) b

    From this, you’ll get some result similar to this one:

    tsqltues_code1

    Note that you can’t join these two items together because this doesn’t work:

    SELECT *
     FROM sys.dm_exec_sql_text

    It returns an error:

    Msg 216, Level 16, State 1, Line 3

    Parameters were not supplied for the function ‘sys.dm_exec_sql_text’.

    You have to pass in a parameter, which means that either you create some cursor or loop to do this, or use the power of APPLY.

  • PAAS

    Will we get a real platform in the clouds or just virtual machines?

    When I hear people talk about the “cloud” I often find that I have a different view of what “cloud” means.  What is a cloud? How is it structured? There are all sorts of definitions, but in my mind I have thought of the cloud as a service I can use, just as I use the web. My browser works with any kind of hardware, and software, as long as it handles the http spec.

    In my mind, that’s what I expect with a cloud database service. It conforms to what I expect in a SQL Server database, allowing me to deploy my data and objects, and expecting that I don’t need to worry about a database name, or configuring Windows logins, or even worrying about scaling up from 4 to 8 CPUs. I’d expect that the cloud would handle this fairly invisibly.

    There’s an acronym called PAAS, which is Platform as a Service, and it’s analogous to SAAS (Software as a service) and IAAS (infrastructure as a service). The idea is that an application platform exists in the cloud and you essentially upload your code, allowing the provisioning, scaling, and other details to be handled by the platform is interesting. This article talks about PASS solving lots of developers’ problems, but I think it’ s a little premature to think that this is the best solution for many types of businesses.

    I do hope that we find a way to smooth the deployment and access for our applications and services for both companies and consumers. It does feel that we spend a lot of time covering up for the inefficiencies in our entire application development and deployment life cycle. The cloud has some promise here, but it has to be more than a Windows host that runs on someone else’s hardware. It has to truly handle much of the complexity and abstract  us away from those details, in a secure, safe way.

    Steve Jones


    The Voice of the DBA Podcasts