The Importance of Reading Comments

  • Thanks for the article, it was an amusing little story and it contains a significant point. Authors often have an entire article along with the script and they often put significant things in the comments that go with the script. It is often very useful to read the comments and anything that goes with the script, especially if you want to really understand how it works or if you encounter problems.

    Your story also emphasizes the importance of having a test environment. Having one has saved me many times.

    ---
    Timothy A Wiseman
    SQL Blog: http://timothyawiseman.wordpress.com/

  • Nice article, Mannie. Yes... I absolutely agree. Reading the comments is important. That's why most of the scripts I post on the forums say "Details are in the comments." 🙂

    --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)

  • Jeff Moden (6/10/2013)


    Nice article, Mannie. Yes... I absolutely agree. Reading the comments is important. That's why most of the scripts I post on the forums say "Details are in the comments." 🙂

    Thanks Jeff. I respect and honor you as a seasoned DBA and have already learned a lot from you but clearly not enough.

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • Your story also emphasizes the importance of having a test environment. Having one has saved me many times.

    I think it is very important to TEST all scripts gotten from the internet first before running it on a live database. I have aslo already learnt that in a very hard way.:-D:-D:-D

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • For me the following are the salient points for the reader:

    - One should understand what every part of a code example is doing before using it.

    - Test in a sandboxed environment (as done by Manie).

    For me the following are the salient points for the author:

    - If there are multiple parts then perhaps there are multiple code files / script blocks.

    - Describe not only the technical solution but, where appropriate, how it must be applied.

    Of course, I have at times failed to do all of these and have been burnt learned from my experiences (hopefully).

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • Manie Verster (6/10/2013)


    You have chosen to link a rather ancient article that covers SQL Server 7.0, 2000, 2005 which is no longer relevant. Under SQL Server 2000 you had to detach a user db to move it as the alter database command was only valid for tempdb files

    Perry, I don't know why you say this is an ancient article because after having had a look at it again I saw SQL Server 2012 at the top of the page??????:hehe::hehe:[/QUOTE]

    Since you feel the need to mock, it might pay you to read properly the article links

    The link here details this!!

    Microsoft KB


    Article ID: 224071 - Last Review: July 16, 2012 - Revision: 19.0

    Applies to

    •Microsoft SQL Server 2005 Standard Edition

    •Microsoft SQL Server 2005 Enterprise Edition

    •Microsoft SQL Server 2005 Developer Edition

    •Microsoft SQL Server 2005 Workgroup Edition

    •Microsoft SQL Server 2005 Express Edition

    •Microsoft SQL Server 2000 Standard Edition

    •Microsoft SQL Server 7.0 Standard Edition

    Keywords: kbsqlsetup kbinfo KB224071

    Manie Verster (6/10/2013)


    I would, however, like to know what is actually the best to do. Move or detach an attach taking in consideration that there is no replication on the database to be moved?

    If you bother to read my article[/url] instead of mocking you'll see that ALTER DATABASE is the supported option. In SQL Server 7.0 and 2000 you had to detach as ALTER DATABASE did not support user databases!!

    This is the correct KB article from Microsoft.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle (6/11/2013)


    Manie Verster (6/10/2013)


    You have chosen to link a rather ancient article that covers SQL Server 7.0, 2000, 2005 which is no longer relevant. Under SQL Server 2000 you had to detach a user db to move it as the alter database command was only valid for tempdb files

    Perry, I don't know why you say this is an ancient article because after having had a look at it again I saw SQL Server 2012 at the top of the page??????:hehe::hehe:[/QUOTE]

    Since you feel the need to mock, it might pay you to read properly the article links

    The link here details this!!

    Microsoft KB


    Article ID: 224071 - Last Review: July 16, 2012 - Revision: 19.0

    Applies to

    •Microsoft SQL Server 2005 Standard Edition

    •Microsoft SQL Server 2005 Enterprise Edition

    •Microsoft SQL Server 2005 Developer Edition

    •Microsoft SQL Server 2005 Workgroup Edition

    •Microsoft SQL Server 2005 Express Edition

    •Microsoft SQL Server 2000 Standard Edition

    •Microsoft SQL Server 7.0 Standard Edition

    Keywords: kbsqlsetup kbinfo KB224071

    Manie Verster (6/10/2013)


    I would, however, like to know what is actually the best to do. Move or detach an attach taking in consideration that there is no replication on the database to be moved?

    If you bother to read my article[/url] instead of mocking you'll see that ALTER DATABASE is the supported option. In SQL Server 7.0 and 2000 you had to detach as ALTER DATABASE did not support user databases!!

    This is the correct KB article from Microsoft.

    If I was mocking anyone then it was myself. It surely was not my intention to mock you or anyone on SSC. You see I have been a developer now for only 13 years and in 2006 I was thrown in at the deep end and told to administer a client's database. You could not fathom the value of knowledge I got from SSC. One guy, Jeff Moden, knows how I argued with him about stuff and in the end I had to acknowledge that I do not have neaar the knowledge neede to argue or in your case mock anyone here. I do not know what article you are talking about that are ancient but clearly not mine so, I apologise for saying the wrong things to you. It was not my intention.

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • Perry,

    Thank you I actually did go and read your article and actually have learnt something new. I also saw another article[/url] that clearly explained the disadvantages of detach/attach.

    I must honestly say that when I read that first article about moving database files I honestly thought the files would move when you run the script! :blush::blush::blush:

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • I didn't think Manie was being mocking, certainly not intentionally. Manie, I appreciate the humility you've shown in being willing to share your own mistakes so that we can learn from them! And Perry, it's great that you've taken the time to try to teach.

  • Reading the comments is especially useful when you are the person who wrote the script in the first place !

  • Manie Verster (6/11/2013)


    Jeff Moden (6/10/2013)


    Nice article, Mannie. Yes... I absolutely agree. Reading the comments is important. That's why most of the scripts I post on the forums say "Details are in the comments." 🙂

    Thanks Jeff. I respect and honor you as a seasoned DBA and have already learned a lot from you but clearly not enough.

    Thanks, Manie. :blush: I'm right there with you. "Seasoned" or not, I learn something new about SQL just about every day.

    Keep up the good work, ol' friend.

    --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)

  • Perry, I hope we are at peace now. I have a feeling I can still learn a lot from you.:-)

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • No problem we're all here to help one another

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Welcome to http://www.likesurprise.com//

    where is the most popular Panthers online shop.

    ((( http://www.likesurprise.com/ )))

    lower price fast shippment with higher quality!!

    WE ACCEPT CREDIT CARD /WESTERN UNION PAYMENT

    YOU MUST NOT MISS IT!!!

  • Welcome to http://www.likesurprise.com//

    where is the most popular Panthers online shop.

    ((( http://www.likesurprise.com/ )))

    lower price fast shippment with higher quality!!

    WE ACCEPT CREDIT CARD /WESTERN UNION PAYMENT

    YOU MUST NOT MISS IT!!!

Viewing 15 posts - 16 through 30 (of 34 total)

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