Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The Importance of Reading Comments


The Importance of Reading Comments

Author
Message
vyengr
vyengr
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 17
This is reminiscent of the "test" they gave perdiocally when I was still in school. The instructions said "Read the entire test before starting." The questions were quite time consuming to answer and it was a timed test. Of course if you did read the whole test before starting you would find an instruction at the very end saying "Answer only Questions 1 and 2 and ignore the rest."
Brandie Tarvin
Brandie Tarvin
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7802 Visits: 8745
vyengr (6/10/2013)
This is reminiscent of the "test" they gave perdiocally when I was still in school. The instructions said "Read the entire test before starting." The questions were quite time consuming to answer and it was a timed test. Of course if you did read the whole test before starting you would find an instruction at the very end saying "Answer only Questions 1 and 2 and ignore the rest."


I remember that thing. The first two instructions indicated that you were to put your name and date on the test (different spots, depending on the test) and that was it.

Annoying but funny.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Manie Verster
Manie Verster
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1308 Visits: 986
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??????HeheHehe

Thanks for the positive feed back and remembering I am not a DBA, I still have a lot to learn and am greatful for a forum like this to learn from.

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?

:-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)
Manie Verster
Manie Verster
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1308 Visits: 986
I remember that thing. The first two instructions indicated that you were to put your name and date on the test (different spots, depending on the test) and that was it.


Many times I sat in that exam room and the only questions I knew was right was my name and the date!!!HeheHeheHeheHehe
You sit there and strike a complete blank even though you have studied so hard and late nights!!

:-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)
simonholzman 14059
simonholzman 14059
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 31
I have a habit of putting a word at the end of the section BEFORE the comment that is not commented out but is invalid (I often use my nickname SIGGY). This stops the script at that point if I hit F5 without selecting the previous section.
timothyawiseman
timothyawiseman
SSC Eights!
SSC Eights! (802 reputation)SSC Eights! (802 reputation)SSC Eights! (802 reputation)SSC Eights! (802 reputation)SSC Eights! (802 reputation)SSC Eights! (802 reputation)SSC Eights! (802 reputation)SSC Eights! (802 reputation)

Group: General Forum Members
Points: 802 Visits: 920
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/
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45143 Visits: 39923
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Manie Verster
Manie Verster
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1308 Visits: 986
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)
Manie Verster
Manie Verster
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1308 Visits: 986

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)
Gary Varga
Gary Varga
SSCrazy Eights
SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)

Group: General Forum Members
Points: 8362 Visits: 6161
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!!!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search