Shrink Database

  • Took a guess and got it wrong. I don't have much experience with shrinking databases and had no idea it would cause that much fragmentation.

    http://brittcluff.blogspot.com/

  • SanDroid (8/10/2011)


    <lots of stuff>

    and breathe....

  • Toreador (8/10/2011)


    SanDroid (8/10/2011)


    <lots of stuff>

    and breathe....

    :hehe::w00t::-D

  • hakan.winther (8/10/2011)


    I am surprised that 60% thought it wouldn't increase!

    If the default behavior of dbcc shrinkdatabase was the truncate_only option wouldn't it stay the same? That's what my initial thought was but I ended up changing it to about 50% based on the fact that were too tables. Good question.

  • Excellent question, Ron. I've used this type of demo in presentations before.

  • Steve Jones - SSC Editor (8/10/2011)


    Excellent question, Ron. I've used this type of demo in presentations before.

    Did you use a script that gave the wrong result? 😛 😉

  • I think this is a great question.

    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

  • Have SSC fixed the problem of questions not matching the answers?

  • Great question. Definitely learned something from this one.

    Rob Schripsema
    Propack, Inc.

  • SQLRNNR (8/10/2011)


    I think this is a great question.

    As would I if the error in the script did not cause the wrong result.

    It seems incorrect to give a point to those that did NOT carefully read and understood what the script was doing.

  • SanDroid (8/10/2011)


    SQLRNNR (8/10/2011)


    I think this is a great question.

    As would I if the error in the script did not cause the wrong result.

    It seems incorrect to give a point to those that did NOT carefully read and understood what the script was doing.

    The question was to point out fragmentation that could occur from shrinking the database. Did you know that shrinking your database was detrimental?

    People should know that it is detrimental. If you knew it was detrimental, then why choose any answer that indicates it is not? The question in this case was not to quiz you on your tsql skills but on the concept of creating havoc in your database by shrinking it.

    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

  • SanDroid (8/10/2011)


    As would I if the error in the script did not cause the wrong result.

    It seems incorrect to give a point to those that did NOT carefully read and understood what the script was doing.

    Can you do me a favor and drop it? You've made your point. Whether you're right or wrong continuing to post complaints isn't really going to help. You posted a very good explanation of what you disagree with, which many people don't bother to do and I appreciate that you did that, but I don't know that you're adding anything to the conversation at this point.

  • SanDroid (8/10/2011)


    SQLRNNR (8/10/2011)


    The question was to point out fragmentation that could occur from shrinking the database. Did you know that shrinking your database was detrimental?

    The catgory was Administration and the question title was Shrink Database.

    I went for the answer that matched the real results and the topic. If the topic or anything else had been Fragmentation, then maybe me and 77% of the others that answered would have made a diffierant guess.

    I do not believe a good SQL DB administrator should live in an imaginary world of guesses and maybes.

    They should know the answers to what happens to a database given an exact set of steps.

    The point is you have to change the script to get that result.

    Knowing what realy happens when you execute a script with over 1000 errors in it versus one that does not is a skill I like my DBA's to have.

    It can also get you paid. Not knowing the differance between the scirpt given, and the one that would give the expected result is also good knowledge to have.

  • jbreffni (8/10/2011)


    I got 0.46875 when I ran the script.

    What's up with that?

    What size was your DB files before your started?

    Did you have FULL or SIMPLE recovery option set?

  • SanDroid (8/10/2011)


    SanDroid (8/10/2011)


    SQLRNNR (8/10/2011)


    The question was to point out fragmentation that could occur from shrinking the database. Did you know that shrinking your database was detrimental?

    The catgory was Administration and the question title was Shrink Database.

    I went for the answer that matched the real results and the topic. If the topic or anything else had been Fragmentation, then maybe me and 77% of the others that answered would have made a diffierant guess.

    I do not believe a good SQL DB administrator should live in an imaginary world of guesses and maybes.

    They should know the answers to what happens to a database given an exact set of steps.

    The point is you have to change the script to get that result.

    Knowing what realy happens when you execute a script with over 1000 errors in it versus one that does not is a skill I like my DBA's to have.

    It can also get you paid. Not knowing the differance between the scirpt given, and the one that would give the expected result is also good knowledge to have.

    There was a minor error in the script, and it should have stated an empty, new database. We don't try to trick you and we can't specify every single parameter or setup.

    If you create a new database, with defaults, you get a full recovery model, 2MB database and the script shows 90+% fragmentation.

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

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