Beginning T-SQL

  • Hi,

    I am working with SQL Server 2005 since last two years. I haven't come from a programming background. However, I want to learn the features of Transact SQL language. I have two queries regarding T-SQL.

    1. Is is mandatory for a SQL Server DBA to learn T-SQL programming?

    2. How should one start learning about T-SQL? I have come with no programming background. So how would you suggest me to start learning this great feature of SQL Server?

    Thanks in advance.:-)

    Thanks & Regards,
    Sudeepta.
    http://twitter.com/skganguly

  • This subject has been covered at length in another thread. In my opinion a DBA must know TSQL to be 100% competent.

    As to your second question, there are quite a number of books out there about learning TSQL. I learned TSQL way back with Version 6.5 and have been using it as a DBA and designer/developer through to version 10 (2008) so its been some time since I looked at any books of that type. (I actually learned using the Microsoft manual back when they used to proved a whole set of PRINTED manuals!)

    I can recommend SQL Server 2005 unleashed, it covers a lot of stuff that you need to know as a DBA including a fair amount of TSQL you'll need for administering your server.

    The probability of survival is inversely proportional to the angle of arrival.

  • Thanks a lot for your response and guidance. I am looking forward to get the book.

    Thanks once again.:-)

    Thanks & Regards,
    Sudeepta.
    http://twitter.com/skganguly

  • I don't know that you'd have to learn TSQL to be a DBA, but your job is going to be infiinitely more difficult if you don't.

    Three books I'd suggest, especially since you're just getting started:

    Itzik Ben-Gan's T-SQL Fundamentals

    Joseph Sack's Transact-SQL Recipes

    Ross Mistry's SQL Server 2008 Management and Administration

    These three books cover most of what you're going to need to know and don't go too deep on any one area. Start with Itzik's book.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • I agree with Grant, you don't necessarily need to master TSQL up front. The job will be more difficult without TSQL.

    Other than books, you may want to check out a local university to see if you might be able to audit a class on the subject as well. Many university (or community college) courses will also cover some of the things you will see in the GUI in addition to focusing on TSQL.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Performing a number of DBA type duties can be done sans TSQL, but I would never hire someone as a DBA managing large amounts of critical data unless they were fluent in TSQL, and I suspect that is the case for most places.

    The probability of survival is inversely proportional to the angle of arrival.

  • sturner (9/3/2009)


    Performing a number of DBA type duties can be done sans TSQL, but I would never hire someone as a DBA managing large amounts of critical data unless they were fluent in TSQL, and I suspect that is the case for most places.

    Yeah, that's absolutely true in our case. I'm pretty sure you're right about most other places as well. However, there are tons and tons of accidental DBA's. Those guys that just fell into the job because no one else was around to do it. They may get the title and responsibility well before they get the knowledge.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • sturner (9/3/2009)


    Performing a number of DBA type duties can be done sans TSQL, but I would never hire someone as a DBA managing large amounts of critical data unless they were fluent in TSQL, and I suspect that is the case for most places.

    I just want to beat a dead horse.

    I think it depends on the level of DBA position you are looking to hire. If you are already present and are fluent in tsql (which i believe most of us are still mastering much the same as our native language). If i am looking for somebody to help with mundane tasks and expect to hire somebody jr. then the knowledge of tsql doesn't need to be as fluent as if I need somebody that is at the Sr. level to help me inside the data etc.

    If I am looking to hire somebody that is junior level, I full on expect to be training that person and showing them more tsql.

    And as many of us have experienced in the past (ad nauseum in other posts and Grants blog about interview questions) - it is a rare find when we are able to find that Sr. level person who is fluent in tsql.

    Is it important - yes

    Is it possible to find somebody fluent - yes

    Is it in your price range - maybe

    Can somebody break in to the dba biz without being well-versed in TSQL - yes (with caveats).

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I'm probably going against the general grain here but I have a special name for "DBA's" who don't know T-SQL really, really well... "SysOp". My other name for them is "difficult to employ" because unless it's a really large company that can afford people who just know the hardware and some security and people who really understand databases and T-SQL, you'll need to know both.

    Flipping the coin, SQL Developers that know something of the system also make better developers.

    Like Grant said, I suppose you could become a system's DBA without knowing much about T-SQL, but it won't be either an easy thing to do nor will you be very employable. Personally, I won't hire a DBA who doesn't have at least a strong intermediate to advanced knowledge of T-SQL.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Sudeepta (9/3/2009)


    I have come with no programming background.

    Although that may make it a bit difficult for you, it may also provide an extreme advantage for you... you have no bad habits to break. 😉 Most folks with a "programming background" have a really difficult time with SQL because SQL works differently. It works most efficiently by telling it what to do to a column of data. Since most programming languages work on one row at a time, it sometimes takes years for someone with a programming background to learn how to write great SQL because they simply can't make the paradigm shift from thinking in rows to thinking in columns.

    You have no such bad habits. With a bit of dedication on your part, you could become one of the better SQL developers and DBA's. Buy a copy of SQL Server Developer's Edition (<$50 US), install it on your home computer, and make Books Online (the "help" system that comes with it) your best friend. Yeah... there are a lot of good books on the subject but unless you can learn to do your own install, setup users, do a backup, and write some T-SQL, those books will prove useless. Find a good mentor, too. That's the hard part, though... most of them have a "programming background" and might not have made the paradigm shift from row based procedural (RBAR) programming to columnar set based SQL programming. If they tell you that you should use a cursor or While Loop whenever you can't think of a set based method, you've probably selected the wrong mentor. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply