Author: way0utwest

  • Interns

    Google Interns
    Being an intern at Google or Microsoft has to be very cool.

    Today we have an editorial from Aug 8, 2007 that is being republished as Steve is on holiday.

    You wouldn’t think that it would take much to woo interns to Silicon Valley, especially for Google. My guess is that Google and Microsoft get to fight over the top candidates, and neither of them is really a loser. It’s all the other companies out there that end up getting the less highly rated interns.

    Which is cool with me. It would have given me lots of other choices if I were graduating 🙂

    Still, how cool would it be to get to the Bill Gate summer BBQ while in college?

    I had the chance to intern at Virginia Power a long time ago and it turned out to be a great experience. I was an EE graduate student at the time and ended up in the maintenance group learning how to schedule maintenance and giving input for work that was actually being done. Done by someone else, of course. It was, after all, a nuclear power plant. You can’t have interns running around with wrenches tightening reactor bolts. It is rightie-tightie, right?

    However I ended up moving over to the IT group and writing a scheduling application that my old department actually used to manage their work. I stayed in IT, switched to computer engineering, and the rest is history.

    I think interning is a great idea and it gives you the chance to groom someone for your company. It’s a chance for students to learn, do real work, and you to find out who fits and doesn’t fit in your organization. And it brings a new perspective to your group, with the addition of someone that isn’t set in their ways. After the recent Revisit What You Know, maybe that’s a really good thing.

    I think there are less IT people to choose from overall, especially as salaries stagnate a little and the layoffs continue, but there is still a demand for people that’s hard to fill. If your company doesn’t look to hire people right out of college, maybe they should.

  • Contained Databases – Preventing Collation Conflicts

    One of the demos from my Contained Databases talk looks at the issues you can have when your database collation does not match your server collation. I’ll walk through the issue here. I’ll show the issue, and then the fix with contained databases.

    First, let’s create a database and a table:

    -- create db without containment
    CREATE DATABASE ucdb2
     COLLATE Japanese_CS_AS
    ;
    go
    USE ucdb2
    ;
    go
    
    
    -- Create Unicode Table, add a row
    CREATE TABLE MyTable
    ( mychar NVARCHAR(200)
    );
    go
    INSERT MyTable SELECT 'This is a Japanese Row'
    go
    
    

    My server collation is shown here (SQL_Latin1_General_CP1_CI_AS:

    containeddb1

    Now let’s create the exact same table in tempdb.

    -- create temp unicode table
    CREATE TABLE #MyTable
    ( mychar NVARCHAR(200)
    );
    go
    INSERT #MyTable SELECT 'This is a Japanese Row'
    go
    
    

    If I try to work with these two tables together, I will have problems. As an example, let’s just union query these two items together.

    SELECT 
      'udcb2'
    ,  mychar
     FROM MyTable
    UNION ALL
    SELECT 
      'tempdb'
    , mychar
     FROM #MyTable
    ;
    go
    
    

    I get an error, as shown here:

    containeddb2

    The collation error occurs because the query optimizer can’t decide which collation to use. You can easily fix this, as I’ve blogged about before with a collation clause.

    However contained databases mean you don’t have to change code. Let’s do the same thing, this time with a contained database.

    -- create db with containment
    CREATE DATABASE cdb2
     CONTAINMENT = PARTIAL
     COLLATE Japanese_CS_AS
    ;
    go
    USE cdb2
    ;
    go
    
    -- Create Unicode Table, add a row
    CREATE TABLE MyTable
    ( mychar NVARCHAR(200)
    );
    go
    INSERT MyTable SELECT 'This is a Japanese Row'
    go
    
    -- create temp unicode table
    CREATE TABLE #MyTable
    ( mychar NVARCHAR(200)
    );
    go
    INSERT #MyTable SELECT 'This is a Japanese Row'
    go
    
    

    Now if I run the same statement, I see:

    containeddb3

    The contained database has correctly resolved the collation issues.

    You can check the collations with sp_help with the two table names.

  • Learn in the Margins

    notesin the margin
    The margins can provide a little more time in your life if you learn to use them.

    Investing in yourself is key to growing in your career and enjoying the rest of your life. You should invest in your knowledge, and I’ve written about the need to constantly improve your skills over time. I know you need to think about your financial future as well and make sure you are looking forward to the day when you might not want to work full time in technology. I’ve also written that you need to make some personal investments in your health to be sure that you are around to enjoy a long life.

    I saw this post about finding exercise in life’s margins. Taking the stairs, or walking while on the phone. Small things that allow you to fit in some movement around the rest of your life. That’s a great way to improve your health without making drastic changes in your life. Consider a standing desk, something I’m experimenting with, but look to find ways to take care of yourself while balancing the most limited resource you have: time.

    The idea of finding ways to exercise in the margins of your life makes me think this might be a good way to improve your knowledge as well. Are there margins of time in your day when you can learn something? Perhaps you can take 5 less minutes at lunch a few times a week and browse through forums, looking to answer some question on your own and try to improve your T-SQL. Maybe you spend an hour on Sunday morning, browsing through Database Weekly and reading a few blog posts about topics that interest you. Maybe you take the last 10 minutes of the day and read a book on T-SQL. It might take you all year to get through the book, but that’s one more book you’d finish this year. If you have a commute, download the MCM videos from SQLskills and listen on the way.

    Life is busy, and life is hard, and life is often something that happens when you’re making all kinds of other plans. It’s hard to fit in big projects or concentrated efforts to improve your career, but maybe you can find a little time in the margins and find a way to improve your skills without taking too much time away from the rest of your life.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.

  • The Platform as Code

    data center
    Trying to manage all your servers individually is like tracing cables in this kind of setup.

    SQL Server has grown more and more complicated over the two decades that I have worked with the product. At the same time anyone can install it and set up a database with almost no training. There are more and more features and functions to learn, yet it’s become a much easier product to use. It seems as though one person may view the platform as very difficult to use while the next sees is as requiring almost no management. Both of these views can be true, but as we say often about SQL Server: it depends.

    When I started working with SQL Server, it was a cumbersome platform, the network configuration could be tricky and it wasn’t easy for developers to master the named pipe connections that were required. Since then it has become a very easy to set up and use platform, with many system administrators managing servers that almost manage themselves. “Almost” being the key word there.

    Just as with other Microsoft platforms, the days of having a set of procedures that handle your daily tasks and lead you through the solution are gone. The platform handles the simple stuff, the routine issues, but it is almost a requirement that a good system administrator be able to write T-SQL queries and string together segments of code.

    I was reading an interview with Jesse Robbins, the founder of OpsCode, a company focused on infrastructure automation. In the interview, he had a few quotes that struck me as very true. “What has happened over a period of time is that sysadmin skill set has been expanding more and more to include more and more basic infrastructure software development.” The second quote deals with managing more and more servers: ” That is not being built on your back every day, when you’re logging into the same 50 boxes and typing in the same 50 commands. ”

    Those quotes were similar to some of the presentations I saw on System Center 2012 at DevConnections. There is a focus on automation, on scripting, on working with groups of machines at scale, not as individual systems. The administrators, whether on Windows, Exchange, SQL Server, or some other platform need to learn how to better administer their systems with code, not with the GUI.Steve Jones

    SQL Server ConnectionsIf you want to learn more about Systems Center and SQL Server, come to DevConnections in the fall. It’s the best conference to learn about all parts of the Microsoft technology stack. Grant Fritchey and Steve Jones will be there speaking along with lots of other great Microsoft technology specialists.


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.