Author: way0utwest

  • Braindumps and Certification

    I saw a post recently that said that braindumps were the best way to prepare for certifications. It was posted from a certification vendor, so take it with a grain of salt, but I think a lot of people think this.

    That somewhat torques me off. I understand that certification can help someone get a better job, and it is good for a career. That’s fine, and I understand that if you are out of a job, or searching for a better job, that the price of the exam seems a little steep, and if you fail, you are out a decent amount of money. An exam costs $125 in the US, and that’s not an insignificant amount of money.

    However.

    We have enough people that don’t know what they’re doing. We have lots of people that struggle in their jobs, and often then don’t know what to do. Their bosses and co-workers aren’t happy. The struggle and get stressed, and they complain about their jobs. Stability is lower, software quality slides along the floor, and it’s a bad fit.

    Not everyone falls into this category, but having taken quite a few exams, I’d say that if you have some knowledge of SQL Server, and you work through a lot of exercises from any certification book, you’ll be fine. It’s hard, but it’s supposed to be. You’re supposed to be competent if you pass the exam.

    Finding ways to pass without being competent, or searching for a guarantee, isn’t good for your career. And it’s certainly not good for mine. Every person that passes who doesn’t really understand what they’re doing makes certifications that much more of a joke, and that much less valuable to employers.

    Which is the point for most people. They get the certification so that employers will be *more* likely to pay them more.

    Do yourself a favor. Study for the exam, learn how to handle the objectives, and then take your chances on the exam.

    There are a number of deals for second takes as well, so be on the lookout for those.

  • What Do We Need in SQL Server?

    What should be included in the next release of SQL Server? SQL Server 11 is being worked on now, and there are a number of features that I’m sure will be new, as well as some improvements to old features.

    But what should be changed/added/improved upon? Brad McGehee asked that question in his September Blog question. There are some really interesting ideas in the comments, and I hope that some of these get submitted to Connect for inclusion in SQL 11, or even SQL 12. The product will always need work, and we should all be looking forward to future versions.

    I think the product will evolve in the future, and include more Cloud-like features since SQL Azure is getting a lot of attention and it seems many vendors are looking to push for a more service oriented, cloud-based architecture. However for the foreseeable future, I’d think that the next few versions will continue with the same type of install-an-instance-on-a-server that we’ve been used to.

    If you have ideas, or want to lobby for new features, please feel free to include them in the discussion along with your reasons why they are a priority. And if they’re very important to you, please feel free to submit them on Connect and let us know the URL.

    Steve Jones

  • Table Variables and Transactions

    I actually had a question of the day submitted on SQLServerCentral about table variables and transactions, but the person didn’t have a reference for it. So I had to go digging around to find one. It doesn’t seem to be documented in BOL, but numerous MVPs and MS employees have posted about this behavior (by design) in places.

    Here’s the code I saw:

    DECLARE @MyTable TABLE 

    ( MyIdentityColumn INT IDENTITY(1,1),
    MyCity NVARCHAR(50))
    INSERT INTO @MyTable (MyCity) VALUES (N'Boston');
    BEGIN TRANSACTION IdentityTest
    INSERT INTO @MyTable (MyCity) VALUES (N'London')
    ROLLBACK TRANSACTION IdentityTest
    INSERT INTO @MyTable (MyCity) VALUES (N'New Delhi');
    SELECT * FROM @MyTable mt

    What do you expect from that? What about this code?

    CREATE TABLE TranTest 
    ( MyIdentityColumn INT IDENTITY(1,1),
    MyCity NVARCHAR(50))
    GO
    INSERT INTO
    TranTest (MyCity) VALUES (N'Boston');
    BEGIN TRANSACTION IdentityTest
    INSERT INTO Trantest (MyCity) VALUES (N'London')
    ROLLBACK TRANSACTION IdentityTest
    INSERT INTO TranTest (MyCity) VALUES (N'New Delhi');
    SELECT * FROM TranTest mt

    In the second case, you’d expect two rows, right? Something like this:

    trantest1

    However in the first case you get:

    trantest2

    The insert with “London” isn’t rolled back. This is because the table variable doesn’t participate in transactions. You can see this with this update as well.

    DECLARE @MyTable TABLE (MyIdentityColumn INT IDENTITY(1,1),
    MyCity NVARCHAR(50))
    INSERT INTO @MyTable (MyCity) VALUES (N'Boston');
    BEGIN TRANSACTION IdentityTest
    UPDATE @MyTable SET MyCity = 'Denver'
    ROLLBACK TRANSACTION IdentityTest
    INSERT INTO @MyTable (MyCity) VALUES (N'New Delhi');
    SELECT * FROM @MyTable mt

     

    trantest3

    You might think this is a bug, after all, a transaction is supposed to capture changes and enforce the ACID principles. That is true, but a table variable isn’t a permanent change on the database. It’s a temporary object that exists only in memory, and only for the duration of the batch.

    This means that if you want to persist anything from a table variable, you need to write it to a real table, which will enforce ACID principles.

    Where do you need this? It’s extremely handy for capturing information about potential issues in a transaction, like logging, and returning them outside of the transaction (where/when you can store them in a real table).

  • NoSQL Is Not Everywhere

    How many places really use NoSQL? Facebook, one of the largest sites on the Internet, has had their Cassandra database service receive  a lot of press over the last year. In pointing to them as an example, many technologists use the argument that if Facebook uses Cassandra to run their extremely data intensive business, then it ought to be good enough for the rest of us.

    Cassandra might be great for your business, but is it the best choice? How does that argument apply when Microsoft.com, also one of the largest web sites in the world, serves millions of users a day with SQL Server as the back end? Twitter also uses an RDBMS to store it’s tweets. It uses the MySQL database, an RDBMS, though they are investigating and integrating Cassandra in places.

    The point is that NoSQL databases, like .NET assemblies or J2EE applets are just technologies. They’re just tools used to build an application, and they can be built well, or built poorly. Is Cassandra bad because it didn’t work well for Digg? No, just like those companies that have switched off SQL Server to some other platform aren’t necessarily doing so because SQL Server can’t meet their needs.

    It’s up to the architect to put together a great platform for an application, using whatever tools they choose. Hopefully they are choosing those tools because the fit the problem, or the skills of the developers. I’d be disappointed in an architect that chooses something because it’s new, or discards another technology because of some personal bias.

    Steve Jones