1 Quick question for all the DBA's

  • I am wondering if someone can help me out. I have become a SQL Server DBA about 7 months ago, but have no work to do. I have a full time position and there are days I just sit on my desk and pretty much read. The last time I actually did something productive was about 2 or 3 weeks ago when I took the backup and restored it on a different server. I mean I am not complaining, but I just need to know what other DBA's do a daily basis. I have talked to my manager many times, but he tells me it's slow and just hang on tight, but this can't be it. I am not learning anything other than on my own when do these silly experiments. I am wondering if I can get some guide or some sort of list of what other dba's do. Sorry it's not a technical question but would definitely appreciate some feedback.

    Thanks a lot!

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Do you have monitoring, baselining for problem comparisons, restore tests, and optimization reviews already in place? If not, you've got your work cut out for you. Best to do it when it's quiet.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Do you have scheduled test restores? Agent alerts? Job failure alerts?

    Have you been practicing restores? Can you recover the system within your SLAs?

    Are you capturing and reviewing performance metrics? Extrapolating metrics to identify future problems? Identifying current performance problems and fixing them?

    Do you have auditing in place? Any mechanism to track schema changes? New logins? Changed permissions? Operations performed by sysadmin accounts?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (7/21/2014)


    Do you have scheduled test restores? Agent alerts? Job failure alerts?

    We do get alerts time to time but its mostly because space issues or sometimes network issues. (its rare)

    Have you been practicing restores? Can you recover the system within your SLAs?

    I have my own environment and I have practiced restores many times and yes hopefully I will be able to restore the system within my SLA.

    Are you capturing and reviewing performance metrics? Extrapolating metrics to identify future problems? Identifying current performance problems and fixing them?

    I am not allowed to make any changes, but I have restored our PROD DBs into my environment. I have also done some stuff to improve performance by creating appropriate indexes and by changing the way queries are written.

    Do you have auditing in place? Any mechanism to track schema changes? New logins? Changed permissions? Operations performed by sysadmin accounts?

    We do have auditing in place, but I haven't seen many alerts. There are couple of people who are responsible for "New logins or change permissions"

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • New Born DBA (7/21/2014)


    ... there are days I just sit on my desk and pretty much read.

    Read about what? If it's not about SQL Server, T-SQL, or setting up one of the "silly" experiments you were talking about, etc, etc, then you're not taking full advantage of being a DBA and might not be doing the job correctly.

    To add to what the others started...

    Do you conduct code reviews? Do you know what a Tally Table is, how to use it, and can teach others? Have you automated everything? Do you know how much hard drive space every system has available to it and when they will run out of space? Can you find a lost CD in one of the systems without have to go to the individual systems? Have you determined all of the people that can promote code to the system? Have you determined who has SA privs and why? Have you found all of the Windows logins on your system that are no longer in active directory? Have you done a security audit to make sure that people don't have privs they no longer need or never should have had? Do you get morning reports that tell you how many times each job ran, whether or not they were successful, when the last time they were changed was, whether or not they're enabled, etc, etc, etc? How about any new logins that were added in the last 24 hours? How about a report the shows the worst queries by reads, cpu, writes, number of executions, etc, etc, and fix one of the top 10 that shows up on one of those lists at least once a week? Can you create a million row, rather complicated test table generation script in less than half an hour and have it build and populate the table in just a second or two? Would you actually pass an audit if one were taken? Do you know exactly how many deadlocks the system has each day, what the cause is, and how to fix them? Have you read the BCP (Business Continuity Plan) and have a fully documented plan of your own actions if the need comes up?

    Do you know everything about SQL Server and T-SQL? Are you smarter than anyone on the Developer Team when it comes to writing T-SQL or tuning a query? I think the answer to that is "probably not".

    Stop wasting time. Study. Prepare to make a difference. Then, make a difference. Take on the personal challenge of trying to reduce the average amount of CPU time by 50%. Once you accomplished that, do it again. 😉

    --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 (7/21/2014)Read about what? If it's not about SQL Server, T-SQL, or setting up one of the "silly" experiments you were talking about, etc, etc, then you're not taking full advantage of being a DBA and might not be doing the job correctly.

    I read mostly about SQL Server since I am still in a learning mode. Recently I became interested in troubleshooting so I started reading Grant Fritchey book "SQL Server 2008 Query Performance Tuning Distilled (Expert's Voice in SQL Server)"

    To add to what the others started...

    Do you conduct code reviews? Do you know what a Tally Table is, how to use it, and can teach others? Have you automated everything? Do you know how much hard drive space every system has available to it and when they will run out of space? Can you find a lost CD in one of the systems without have to go to the individual systems? Have you determined all of the people that can promote code to the system? Have you determined who has SA privs and why? Have you found all of the Windows logins on your system that are no longer in active directory? Have you done a security audit to make sure that people don't have privs they no longer need or never should have had? Do you get morning reports that tell you how many times each job ran, whether or not they were successful, when the last time they were changed was, whether or not they're enabled, etc, etc, etc? How about any new logins that were added in the last 24 hours? How about a report the shows the worst queries by reads, cpu, writes, number of executions, etc, etc, and fix one of the top 10 that shows up on one of those lists at least once a week? Can you create a million row, rather complicated test table generation script in less than half an hour and have it build and populate the table in just a second or two? Would you actually pass an audit if one were taken? Do you know exactly how many deadlocks the system has each day, what the cause is, and how to fix them? Have you read the BCP (Business Continuity Plan) and have a fully documented plan of your own actions if the need comes up?

    The largest DB I have access to is 22GB and maybe the one of the largest in my company with enough memory and CPU assigned so we actually don't see any performance issues. However, by reading Grant book, I have been playing and changing things around which is making queries running faster but its not implemented yet since I work with :ermm: people.

    Do you know everything about SQL Server and T-SQL? Are you smarter than anyone on the Developer Team when it comes to writing T-SQL or tuning a query? I think the answer to that is "probably not".

    I am interested but having some hard time learning TSQL. I mean I can write queries, joins tables etc, but not that much (would love to learn though)

    Stop wasting time.

    This is the only thing I DON'T DO

    Study. Prepare to make a difference. Then, make a difference. Take on the personal challenge of trying to reduce the average amount of CPU time by 50%. Once you accomplished that, do it again. 😉

    Thank you so much for taking your time and providing me some of the things that are important and trust me when I say this "I am on it"

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • New Born DBA (7/21/2014)


    Jeff Moden (7/21/2014)Read about what? If it's not about SQL Server, T-SQL, or setting up one of the "silly" experiments you were talking about, etc, etc, then you're not taking full advantage of being a DBA and might not be doing the job correctly.

    I read mostly about SQL Server since I am still in a learning mode. Recently I became interested in troubleshooting so I started reading Grant Fritchey book "SQL Server 2008 Query Performance Tuning Distilled (Expert's Voice in SQL Server)"

    To add to what the others started...

    Do you conduct code reviews? Do you know what a Tally Table is, how to use it, and can teach others? Have you automated everything? Do you know how much hard drive space every system has available to it and when they will run out of space? Can you find a lost CD in one of the systems without have to go to the individual systems? Have you determined all of the people that can promote code to the system? Have you determined who has SA privs and why? Have you found all of the Windows logins on your system that are no longer in active directory? Have you done a security audit to make sure that people don't have privs they no longer need or never should have had? Do you get morning reports that tell you how many times each job ran, whether or not they were successful, when the last time they were changed was, whether or not they're enabled, etc, etc, etc? How about any new logins that were added in the last 24 hours? How about a report the shows the worst queries by reads, cpu, writes, number of executions, etc, etc, and fix one of the top 10 that shows up on one of those lists at least once a week? Can you create a million row, rather complicated test table generation script in less than half an hour and have it build and populate the table in just a second or two? Would you actually pass an audit if one were taken? Do you know exactly how many deadlocks the system has each day, what the cause is, and how to fix them? Have you read the BCP (Business Continuity Plan) and have a fully documented plan of your own actions if the need comes up?

    The largest DB I have access to is 22GB and maybe the one of the largest in my company with enough memory and CPU assigned so we actually don't see any performance issues. However, by reading Grant book, I have been playing and changing things around which is making queries running faster but its not implemented yet since I work with :ermm: people.

    Do you know everything about SQL Server and T-SQL? Are you smarter than anyone on the Developer Team when it comes to writing T-SQL or tuning a query? I think the answer to that is "probably not".

    I am interested but having some hard time learning TSQL. I mean I can write queries, joins tables etc, but not that much (would love to learn though)

    Stop wasting time.

    This is the only thing I DON'T DO

    Study. Prepare to make a difference. Then, make a difference. Take on the personal challenge of trying to reduce the average amount of CPU time by 50%. Once you accomplished that, do it again. 😉

    Thank you so much for taking your time and providing me some of the things that are important and trust me when I say this "I am on it"

    In that case, it sounds like you might be on the right track. I didn't glean from your post that you were kind of new at being a DBA.

    As for not having performance problems, there are always performance problems. They just might not seem like it with such a small database. The problems will appear with a vengeance if the database gets bigger. Now would be a good time to discover those problems and, perhaps, fix them. At the very least, it will help you to learn what to look for and give you practice in tuning/rewriting sections of stored procedures and identification of problem with embedded and ORM generated code.

    Reading Grant's books are definitely one of the things to do. I do, however, get that reading books has its limits. Some of the things that I mentioned are definitely in line with what a newbie could pull off while learning and would quickly get you up to speed on a lot of the things that you're going to need to do. The others have some great and very important ideas, as well.

    If you really want to start doing deep dives on T-SQL, start looking at the problems in the T-SQL and General forums on this site. Start out by reading what the problem is and trying to solve it on your own. Then, read the rest of the discussions and see how some of the heavy hitters are doing things and study what they're doing. Don't be afraid to post a follow up question concerning any solution that you see. It would, in fact, be good if you started out on such questions with "I'm a newbie trying to learn T-SQL. I understand the .... but I don't understand the .... method that you used in the solution. Could you explain it please"? Chances are that some of them will trip over each other trying to give you a helping hand if you show that you're trying.

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

  • Learn PowerShell.

    Automate all the things.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • New Born DBA (7/21/2014)


    GilaMonster (7/21/2014)


    Do you have scheduled test restores? Agent alerts? Job failure alerts?

    We do get alerts time to time but its mostly because space issues or sometimes network issues. (its rare)

    Not what I asked.

    Have you set up alerts on your systems?

    Have you set up automated restore tests?

    Have you set up job monitoring?

    Will you know if those 'some people' add a new sysadmin user (by mistake, of course)

    Will you know if someone makes unauthorised changes?

    Do you have performance benchmarks? If a user says 'This query is slow today', can you tell how long it ran last week as a comparison?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Jeff Moden (7/21/2014)


    New Born DBA (7/21/2014)


    Jeff Moden (7/21/2014)Read about what? If it's not about SQL Server, T-SQL, or setting up one of the "silly" experiments you were talking about, etc, etc, then you're not taking full advantage of being a DBA and might not be doing the job correctly.

    I read mostly about SQL Server since I am still in a learning mode. Recently I became interested in troubleshooting so I started reading Grant Fritchey book "SQL Server 2008 Query Performance Tuning Distilled (Expert's Voice in SQL Server)"

    To add to what the others started...

    Do you conduct code reviews? Do you know what a Tally Table is, how to use it, and can teach others? Have you automated everything? Do you know how much hard drive space every system has available to it and when they will run out of space? Can you find a lost CD in one of the systems without have to go to the individual systems? Have you determined all of the people that can promote code to the system? Have you determined who has SA privs and why? Have you found all of the Windows logins on your system that are no longer in active directory? Have you done a security audit to make sure that people don't have privs they no longer need or never should have had? Do you get morning reports that tell you how many times each job ran, whether or not they were successful, when the last time they were changed was, whether or not they're enabled, etc, etc, etc? How about any new logins that were added in the last 24 hours? How about a report the shows the worst queries by reads, cpu, writes, number of executions, etc, etc, and fix one of the top 10 that shows up on one of those lists at least once a week? Can you create a million row, rather complicated test table generation script in less than half an hour and have it build and populate the table in just a second or two? Would you actually pass an audit if one were taken? Do you know exactly how many deadlocks the system has each day, what the cause is, and how to fix them? Have you read the BCP (Business Continuity Plan) and have a fully documented plan of your own actions if the need comes up?

    The largest DB I have access to is 22GB and maybe the one of the largest in my company with enough memory and CPU assigned so we actually don't see any performance issues. However, by reading Grant book, I have been playing and changing things around which is making queries running faster but its not implemented yet since I work with :ermm: people.

    Do you know everything about SQL Server and T-SQL? Are you smarter than anyone on the Developer Team when it comes to writing T-SQL or tuning a query? I think the answer to that is "probably not".

    I am interested but having some hard time learning TSQL. I mean I can write queries, joins tables etc, but not that much (would love to learn though)

    Stop wasting time.

    This is the only thing I DON'T DO

    Study. Prepare to make a difference. Then, make a difference. Take on the personal challenge of trying to reduce the average amount of CPU time by 50%. Once you accomplished that, do it again. 😉

    Thank you so much for taking your time and providing me some of the things that are important and trust me when I say this "I am on it"

    In that case, it sounds like you might be on the right track. I didn't glean from your post that you were kind of new at being a DBA.

    As for not having performance problems, there are always performance problems. They just might not seem like it with such a small database. The problems will appear with a vengeance if the database gets bigger. Now would be a good time to discover those problems and, perhaps, fix them. At the very least, it will help you to learn what to look for and give you practice in tuning/rewriting sections of stored procedures and identification of problem with embedded and ORM generated code.

    Reading Grant's books are definitely one of the things to do. I do, however, get that reading books has its limits. Some of the things that I mentioned are definitely in line with what a newbie could pull off while learning and would quickly get you up to speed on a lot of the things that you're going to need to do. The others have some great and very important ideas, as well.

    If you really want to start doing deep dives on T-SQL, start looking at the problems in the T-SQL and General forums on this site. Start out by reading what the problem is and trying to solve it on your own. Then, read the rest of the discussions and see how some of the heavy hitters are doing things and study what they're doing. Don't be afraid to post a follow up question concerning any solution that you see. It would, in fact, be good if you started out on such questions with "I'm a newbie trying to learn T-SQL. I understand the .... but I don't understand the .... method that you used in the solution. Could you explain it please"? Chances are that some of them will trip over each other trying to give you a helping hand if you show that you're trying.

    Thanks a lot for your response. I really appreciate that.:-)

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • Grant Fritchey (7/22/2014)


    Learn PowerShell.

    Automate all the things.

    Would love to, but where should I start?

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • New Born DBA (7/22/2014)


    Grant Fritchey (7/22/2014)


    Learn PowerShell.

    Automate all the things.

    Would love to, but where should I start?

    I haven't started to learn it yet - but a quick google of powershell tutorial came up with plenty of hits.

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • GilaMonster (7/22/2014)Not what I asked.

    Have you set up alerts on your systems?

    Have you set up automated restore tests?

    Have you set up job monitoring?

    Aaha! of course this is not what you asked.

    1) I haven't set up any alerts on the system since all the alerts are in place?(I am hoping that they are in place, but have to figure out how to check them)

    2) Automated restore. Again, will have to learn how to do that.

    3) Job monitoring. You got me there, but I am going to start working on things that you guys have told me.

    Will you know if those 'some people' add a new sysadmin user (by mistake, of course)

    Will you know if someone makes unauthorised changes?

    Unfortunately, everybody has sa priv which does surprise me, but I cant change that since I have already talked to my manager and he likes it the way it is.

    Do you have performance benchmarks? If a user says 'This query is slow today', can you tell how long it ran last week as a comparison?

    I am sure there are monitoring tools available to capture data, but we don't use any monitoring tools.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • New Born DBA (7/22/2014)


    Grant Fritchey (7/22/2014)


    Learn PowerShell.

    Automate all the things.

    Would love to, but where should I start?

    Not to be snarky (I am just now starting to learn PowerShell), at the beginning. Look for tutorials, get books, just start learning it.

  • Thanks everybody for taking their time out and helping me. There are tons of things I need to learn and most of you guys have suggested me with some amazing things which can benefit me in a long run. I already made a list of things I need to work on and things I have to do in future.

    I really appreciate it 🙂

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

Viewing 15 posts - 1 through 15 (of 25 total)

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