Bug inside my Shrink DB script

  • alimcitp (7/29/2008)


    Thanks for your suggestions but this is not me who written the script this is written by some one else in the company and that is why its really complecated for me to understand this as I am not the SQL Developer. I have written my own script to shrink the logs now so I am not worried about this script any more. Any way thanks for your comments at least you are the first person who answered my post properly.

    Cheers, Ali

    Just a suggestion: Take your ego out of the equation. Gail offered to help, but needed to know more about what was wrong. You didn't answer her question, so she couldn't answer your question.

    If you went to the doctor and told him, "something's wrong", and he asked, "what's wrong", would you say, "thanks for no help" and try to fix it yourself? No, you'd tell him, "I have a horrible pain in the right side of my stomach and I can barely stand up because it hurts to much". Hopefully, you'd tell him this before your appendix exploded inside you and you died horribly. It's the same kind of thing. Don't just say, "it doesn't work". Tell us what's wrong. Are you getting error messages? Is it doing something other than what you want (shrinking the wrong log files/not shrinking any files at all)? Does it do something destructive (corrupt a log file)? Does it do nothing at all? We don't know, so we can't diagnose the problem and help you fix it. Same as a doctor, we need to know the symptoms.

    Sometimes, if someone has a server they don't mind messing up, they might be able to take a script like yours, run it on their server, and see what's wrong. But if nobody has a server they can afford to throw away, and you haven't said what's wrong, it's too high risk for us to run a script like that without knowing, from you, what's wrong with it. What if the problem you were running into was that it corrupted the master database, requiring a server rebuild? We can't know that till you say so, or someone trying to help you runs the script and has to spend a month rebuilding their dev server, at the potential cost of millions of dollars in lost projects.

    We can almost always help on SQL stuff. This page is FULL of problems and solutions to them. But it takes a certain approach to get a solution.

    And what I said about the guy who wrote that script for you still stands. Don't let him anywhere near your databases. When one of his scripts breaks something, and it will, you'll almost certainly get the blame for it, not him, since you're the DBA (or so I assume).

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • GSquared (7/29/2008)


    it's too high risk for us to run a script like that without knowing, from you, what's wrong with it. What if the problem you were running into was that it corrupted the master database, requiring a server rebuild?

    echo that my friend.

    Being a little more friendly and providing responses to questions users ask you will get more help with your problem. We're all here to help each other

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

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

  • maybe you could just create a maintenanc plan for all user db's

  • From what I could see, Gail was trying, very patiently, to give sound advice to someone who, if they really did have all those qualifications, would have known what to do any way.

    This is bread and butter stuff to a good DBA - data consistency, accuracy and recoverability - ESPECIALLY in the financial services industry!!! The FSA have a nasty habit of asking for full data audit trails, and woe betide you if you can't show full recoverability of transactions!

    There, down off of my soap box now.

    10/10 to Gail for patience in the face of adversity 😀

    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein

  • Ali - Your snotty responses would make me stop helping you in every way. This is a forum for peers to assist each other, not demand help when the poster is not supplying relevant and pertinent information.

    That's one of the problems with this forum: people posting a problem, not supplying enough information and expecting others to fix it. While there are plenty of good people here trying to help, the problem poster cannot expect others to read his mind and do his thinking for him.

  • I am not seeking any more suggestions on this. I have written my own script for this task and I am not seeking any help from you lot. Do not act smart or try to be racist.

    Basit Ali Farooq
    MCITP Database Administrator
    Microsoft Certified Professional Developer (Web Applications)
    Microsoft Certified Database Administrator
    Microsoft Certified Systems Engineer
    Microsoft Certified Systems Administrator
    CIW Security Analyst
    Cisco Certified Network Associate

  • I'm sure Steve is going to chime in soon, but I have the advantage of being on the east coast of the US while he's in Denver. 😉

    Gail (Gila Monster) did ask you to be more specific with what you considered to be wrong with the script. The reason that question was asked is it would have guided other forum posters to help you tweak the script to whatever it was you were trying to accomplish. It looks like you figured it out on your own, and that's great, but there was no malice in Gail's post asking such a question.

    Also, because we are a community here, folks try to look out for each other. In other words, if someone sees someone else going down a bad road, they generally try to warn the person. It's like if you know the bridge is out on the road ahead, wouldn't you want to warn your friend? That was the intent of many of the posters on this thread. They weren't trying to act smart and certainly there were no comments that could be construed as racist. If you look on the security threads you will see a lot of my posts that begin with, "Why would you want to do this?" or "This is a bad idea." Why do I say such things? Why don't I solve the question asked and move on? Because providing the right answer to the question asked may not be the proper solution to the problem at hand. That's all the other posters were trying to do.

    K. Brian Kelley
    @kbriankelley

  • Because providing the right answer to the question asked may not be the proper solution to the problem at hand

    Quite.

    If you give the right answer to the wrong question, are you correct?

    Hmmm

    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein

  • Closing the thread on this one. I don't see anyone being rude except the OP and no racism.

Viewing 9 posts - 16 through 23 (of 23 total)

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