DONEPROC

  • ksatpute123 (10/22/2014)


    Raghavendra Mudugal (10/22/2014)


    Thank you for the post, really eye opening.. And really had no idea what this was.

    I read it and without any research, i selected the choice and got it wrong. Just out of curiousity, how where and when we are suppose to use this? Any example available?:-)

    I have already included a use case in the form of api request in the answer:

    http://pekim.github.io/tedious/api-request.html

    I hope the following link can shed more light on use on use of tokens in packet data streams.

    http://msdn.microsoft.com/en-us/library/dd341450.aspx

    That use case does not describe its use. It shows code but does not describe what it is doing. Either that or I just don't understand what it is saying. Besides the link looks like it's for a product called Tedious that has something to do with the TDS protocol which is beyond my understanding.

    Thanks for the question, though, as I got exposed to something completely outside of my day-to-day experience which is a good thing.

    Tom

  • Koen Verbeeck (10/22/2014)


    Never heard of it. Probably will never use it. Misread the documentation and got it wrong.

    Nice question though ๐Ÿ˜€

    +1 It was good to learn about something brand new. Thanks



    Everything is awesome!

  • Woo-hoo! :w00t:I figured it out via some deductive reasoning (and possibly some luck). Like a lot of other people who are posting here, I had never heard of this, either, but some of the answers didn't make sense.

    1) The token value is 0xFE.

    Maybe, maybe not. All of the options except one included it, so it's probably correct.

    2) A DONEPROC token may be followed by another DONEPROC token or a DONEINPROC only if the DONE_MORE bit is set in the Status value.

    Sounds reasonable. Maybe.

    3) A DONEPROC token is sent for each SQL statements within a stored procedure that has been executed.

    Ignoring the grammatical error ("for each SQL statements"), DONEPROC sounds like it would be sent after the stored procedure is complete, so this one sounds false.

    4) The Token Stream Definition parameters are TokenType, Status, CurrCmd, DoneRowCount.

    Sounds reasonable, and matches #5. Maybe.

    5) The Token Stream Specific Rules are TokenType=BIT, Status=USHORT, CurrCmd=USHORT, DoneRowCount=INT

    This doesn't pass the smell test. If this were correct, there could only be two types of tokens, and DoneRowCount is probably a LONG (or at least a UINT), not an INT.

    Eliminating the options that included 3 or 5 left (1,2) and (1,2,4), so I went with (1,2,4) and got it right!

    Thanks for the interesting question with a good combination of possible answers (not just five checkboxes and a question that says "choose the three correct answers"). It would have been nice to have some more information in the answer about when you would use this - the second link is extremely technical (which isn't scary, but it requires a lot of other knowledge on the subject), and the third link doesn't reference DONEPROC at all.

  • Toni-256719 (10/22/2014)


    There is a typo in option #4 that caused me to get it wrong.

    4) The Token Stream Definition parameters are TokenType, Status, CurrCmd, DoneRowCount

    I thought the CurrCmd parameter typo was intentional so I didn't select this option.

    For the QotD, it's always so hard to tell.

    I had this same issue. Read through the documentation, saw CurCmd. Looked at the answers and saw CurrCmd.

    Turns out it was a typo not a deliberate attempt to catch people out :(.

    -------------------------------------------------
    Trainee DBA

  • stephen.long.1 (10/22/2014)


    ...Eliminating the options that included 3 or 5 left (1,2) and (1,2,4), so I went with (1,2,4) and got it right!...

    I also did the same thing..(not in depth... but a quick read) and selected (1,2)... now a days (I guess its been like 5 weeks now) I am enjoying more on the analysis part rather than happiness on selecting the right answer... ๐Ÿ™‚

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • The answer is wrong "currcmd" should be "curcmd". See: http://msdn.microsoft.com/en-us/library/ee320962%28v=sql.105%29.aspx

  • joe.wolfe (10/24/2014)


    The answer is wrong "currcmd" should be "curcmd". See: http://msdn.microsoft.com/en-us/library/ee320962%28v=sql.105%29.aspx%5B/quote%5D

    That's what we call a "typo".

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Missed it due to the typo too.

  • Typo they say..... SQL isn't so forgiving about typos..it's called a syntax error. while these points aren't life or death they are a chance for us normal folk to answer questions posed by the supposed best of the best in our field and somebody's typo shouldn't cost points!

  • Interesting question! Never heard of it and got It wrong, but I learned something new. Thank you!

    /Hรฅkan Winther
    MCITP:Database Developer 2008
    MCTS: SQL Server 2008, Implementation and Maintenance
    MCSE: Data Platform

Viewing 10 posts - 16 through 24 (of 24 total)

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